Allow PolyConnectivity::delete_edge to mark an edge as deleted, if there are no faces incident.

Added unittest.



git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@834 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2013-06-05 13:58:32 +00:00
parent c99b3fb5b2
commit 45c5dab747
2 changed files with 273 additions and 0 deletions

View File

@@ -464,6 +464,18 @@ void PolyConnectivity::delete_edge(EdgeHandle _eh, bool _delete_isolated_vertice
if (fh0.is_valid()) delete_face(fh0, _delete_isolated_vertices);
if (fh1.is_valid()) delete_face(fh1, _delete_isolated_vertices);
// mark edge deleted if the mesh has a edge status
if ( has_edge_status() )
status(_eh).set_deleted(true);
// mark corresponding halfedges as deleted
// As the deleted edge is boundary,
// all corresponding halfedges will also be deleted.
if ( has_halfedge_status() ) {
status(halfedge_handle(_eh, 0)).set_deleted(true);
status(halfedge_handle(_eh, 1)).set_deleted(true);
}
}
//-----------------------------------------------------------------------------