0

When importing CAD file like STL format file, sometimes, some of the facets are reversed so their normal vectors are directing inside the volume while others going outside. the "recalculate outside" comes in to fix the situation. But, I am wondering how I can implement the function with CGAL. It would be appreciated if some guy show me the way about hint or code snippet.

Thanks in advance.

Seong
  • 556
  • 4
  • 18

1 Answers1

0

The Polygon Mesh Processing package introduced in CGAL 4.7 might help here.

In particular I think the function orient_polygon_soup() is what you need. Here is an example of how to use it. You might also need the function polygon_soup_to_polygon_mesh()

sloriot
  • 6,070
  • 18
  • 27
  • Thanks a lot. It did work. By the way, CGAL::Polygon_mesh_processing::is_outward_oriented(mesh) function looks like working for the closed surface. – Seong Oct 02 '15 at 07:45