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
This commit is contained in:
Jane Tournois 2025-03-14 15:53:14 +01:00
parent fcb637bff5
commit b477ebbf30
1 changed files with 3 additions and 2 deletions

View File

@ -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);