From 3f147fb06a9fa7ce28b650f6b9dbda5a8bfb10c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 13 Sep 2023 17:46:57 +0200 Subject: [PATCH] show how to create the mesh from the soup --- .../corefinement_mesh_non_manifold_intersection.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_mesh_non_manifold_intersection.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_mesh_non_manifold_intersection.cpp index 05a8c8552c0..59027bba9fc 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_mesh_non_manifold_intersection.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/corefinement_mesh_non_manifold_intersection.cpp @@ -43,7 +43,12 @@ int main(int argc, char* argv[]) std::vector< std::array > 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;