From de7961fab77975d0ca3d1364ce8224c71bc6a921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 2 Jan 2012 09:26:54 +0000 Subject: [PATCH] Fixed bug in split edge function for polymeshes, setting incorrect to pointers git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@481 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/Mesh/PolyConnectivity.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc index 787465db..54c087e8 100644 --- a/src/OpenMesh/Core/Mesh/PolyConnectivity.cc +++ b/src/OpenMesh/Core/Mesh/PolyConnectivity.cc @@ -1006,16 +1006,17 @@ void PolyConnectivity::split_edge(EdgeHandle _eh, VertexHandle _vh) 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); +// set_prev_halfedge_handle(new_e, ph0); +// set_prev_halfedge_handle(opposite_halfedge_handle(new_e), h1); - set_prev_halfedge_handle(nh1, opposite_halfedge_handle(new_e)); - set_prev_halfedge_handle(h0, new_e); +// set_prev_halfedge_handle(nh1, opposite_halfedge_handle(new_e)); +// set_prev_halfedge_handle(h0, new_e); if (!boundary0) { set_face_handle(new_e, face_handle(h0)); - } else + } + else { set_boundary(new_e); } @@ -1024,13 +1025,18 @@ void PolyConnectivity::split_edge(EdgeHandle _eh, VertexHandle _vh) { set_face_handle(opposite_halfedge_handle(new_e), face_handle(h1)); } + else { set_boundary(opposite_halfedge_handle(new_e)); } + + set_halfedge_handle( _vh, h0 ); + adjust_outgoing_halfedge( _vh ); if (halfedge_handle(vfrom) == h0) { set_halfedge_handle(vfrom, new_e); + adjust_outgoing_halfedge( vfrom ); } }