From b477ebbf3035190fcf924efec7c2f76d7c236a88 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 14 Mar 2025 15:53:14 +0100 Subject: [PATCH] move `remove_from_complex(e)` after checking orientation otherwise it may happen that `e` is removed from complex, then Vertex_handle() is returned to cancel split, and `e` is not re-added to the complex --- .../CGAL/Tetrahedral_remeshing/internal/split_long_edges.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h index ba8da5bf4f1..d531a2093b7 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h @@ -78,8 +78,6 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, // remove complex edge before splitting const Curve_index curve_index = (dimension == 1) ? c3t3.curve_index(e) : Curve_index(); - if (dimension == 1) - c3t3.remove_from_complex(e); struct Cell_info { Subdomain_index subdomain_index_; @@ -126,6 +124,9 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, } while (circ != end); + if (dimension == 1) + c3t3.remove_from_complex(e); + for(Cell_handle c : inc_cells) { const int index_v1 = c->index(v1);