From f03f2176dd2f52c0ea879e1f8fa6f4634aa2cb3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 23 May 2018 09:07:13 +0200 Subject: [PATCH] do no collapse constrained edges At the same time I removed halfedge_and_opp_removed since we don't know prior to the collapse which edges are removed. The only thing done by the function is to reset the status. This is not an issue to remove it because halfedge_added is called each time a new edge is created, thus a previous status cannot be recovered by error. --- .../internal/Isotropic_remeshing/remesh_impl.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index f927d676e89..d3804bc8613 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -764,12 +764,6 @@ namespace internal { if (!mesh_border_case_opp) merge_status(en_p, s_epo_p, s_ep_p); - halfedge_and_opp_removed(he); - if (!mesh_border_case) - halfedge_and_opp_removed(prev(he, mesh_)); - if (!mesh_border_case_opp) - halfedge_and_opp_removed(prev(opposite(he, mesh_), mesh_)); - //constrained case bool constrained_case = is_constrained(va) || is_constrained(vb); if (constrained_case) @@ -786,7 +780,7 @@ namespace internal { //perform collapse Point target_point = get(vpmap_, vb); - vertex_descriptor vkept = CGAL::Euler::collapse_edge(e, mesh_); + vertex_descriptor vkept = CGAL::Euler::collapse_edge(e, mesh_, ecmap_); put(vpmap_, vkept, target_point); ++nb_collapses; @@ -1826,12 +1820,6 @@ private: set_status(h, s); } - void halfedge_and_opp_removed(const halfedge_descriptor& h) - { - set_status(h,MESH); - set_status(opposite(h, mesh_),MESH); - } - std::size_t nb_valid_halfedges() const { return static_cast(