show how to create the mesh from the soup

This commit is contained in:
Sébastien Loriot 2023-09-13 17:46:57 +02:00
parent 07580f1a58
commit 3f147fb06a
1 changed files with 6 additions and 1 deletions

View File

@ -43,7 +43,12 @@ int main(int argc, char* argv[])
std::vector< std::array<std::size_t, 3> > polygons;
visitor.extract_intersection(points, polygons);
CGAL::IO::write_polygon_soup("inter.off", points, polygons, CGAL::parameters::stream_precision(17));
CGAL::IO::write_polygon_soup("inter_soup.off", points, polygons, CGAL::parameters::stream_precision(17));
// make the soup topologically manifold (but geometrically self-intersecting)
PMP::orient_polygon_soup(points, polygons);
// fill a mesh with the intersection
PMP::polygon_soup_to_polygon_mesh(points, polygons, out);
CGAL::IO::write_polygon_mesh("inter.off", out, CGAL::parameters::stream_precision(17));
}
return 0;