From 92d0270066c6c8133a9d4bc9d3a66ebadbd46a8b Mon Sep 17 00:00:00 2001 From: Martin Heistermann Date: Mon, 7 Apr 2025 16:38:28 +0200 Subject: [PATCH] PolyConnectivity: Support edge split in the presence of valence-1 vertices. --- src/OpenMesh/Core/Mesh/PolyConnectivity.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc index 6aa80ba6..06e91bc3 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc @@ -1113,9 +1113,14 @@ void PolyConnectivity::split_edge(EdgeHandle _eh, VertexHandle _vh) set_next_halfedge_handle(new_e, h0); set_next_halfedge_handle(h1, opposite_halfedge_handle(new_e)); - set_next_halfedge_handle(ph0, new_e); - set_next_halfedge_handle(opposite_halfedge_handle(new_e), nh1); - + if (ph0 == h1) { + // valence one vfrom with p(h0) = opp(h0): + set_next_halfedge_handle(opposite_halfedge_handle(new_e), new_e); + } else { + // regular case + set_next_halfedge_handle(ph0, new_e); + set_next_halfedge_handle(opposite_halfedge_handle(new_e), nh1); + } // set_prev_halfedge_handle(new_e, ph0); // set_prev_halfedge_handle(opposite_halfedge_handle(new_e), h1);