From 85bce9bb2328b7afd071962bdd46b57b37091c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 22 Jul 2024 09:54:55 +0200 Subject: [PATCH] be resilient to isolated vertices --- Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h b/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h index c0076cfbca59..05af1c535422 100644 --- a/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h +++ b/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h @@ -205,6 +205,7 @@ void polygon_mesh_to_nef_3(const PolygonMesh& P, SNC_structure& S, FaceIndexMap PolygonMesh, SNC_structure,HalfedgeIndexMap> index_adder(P,himap); for(vertex_descriptor pv : vertices(P) ) { + if (halfedge(pv, P) == boost::graph_traits::null_halfedge()) continue; // skip isolated vertices typename boost::property_traits::reference npv = get(pmap,pv); Vertex_handle nv = S.new_vertex();