diff --git a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h index 9cfbf8ae5f2..b764dfacf03 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h @@ -590,7 +590,22 @@ class SNC_simplify_base : public SNC_decorator { SHalfloop_handle sl; CGAL_forall_shalfloops(sl, *this->sncp()) { SM_decorator SD(&*sl->incident_sface()->center_vertex()); - SD.store_sm_boundary_object( sl, sl->incident_sface()); + //I added the following 'if' because even if the map has been cleared, when merging edges + //if one sloop is created and the vertex not simplified, then the map is updated. + //In the example below, the edge e is removed and a sloop is create on the sphere map + //of a vertex v. But since three edges are still incident to v, v is not simplified. + //There is one point where the distance between two non-edge-adjacent facets is 0. + // + // | | + // | | \ | / | | + // | / \ | / | / + // | / \|/ | / + // | / / | / + // | / / e | / + // |/______/_______|/ + // + if (!SD.map()->is_sm_boundary_object(sl)) + SD.store_sm_boundary_object( sl, sl->incident_sface()); } }