From c21231cef8129345af35f80303966c19bdcbf3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 27 Feb 2023 15:50:42 +0100 Subject: [PATCH] early exit if CDT is not 2D --- .../CGAL/Polygon_mesh_processing/remesh_planar_patches.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h index c35166721d1..9b68423070a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h @@ -515,6 +515,8 @@ bool add_triangle_faces(const std::vector< std::pair > } CGAL_assertion(cdt.number_of_vertices() == nbv); + if (cdt.dimension()!=2) return false; + mark_face_triangles(cdt); for (typename CDT::Finite_faces_iterator fit=cdt.finite_faces_begin(), @@ -1556,7 +1558,7 @@ bool remesh_almost_planar_patches(const TriangleMeshIn& tm_in, return Planar_segmentation::decimate_impl(tm_in, tm_out, std::make_pair(nb_corners, nb_patches), vertex_corner_map, ecm, face_patch_map, vpm_in, vpm_out, - do_not_triangulate_faces + do_not_triangulate_faces, get_parameter(np_out, internal_np::vertex_corner_map), get_parameter(np_out, internal_np::face_patch)); }