Added unittest, to check if halfedges were marked as deleted, if the edges are deleted
Fixed delete_face function, not marking halfedges as deleted, if the edge gets deleted. (Thanks to Maxime Quiblier for the bug report) git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@622 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -507,6 +507,7 @@ void PolyConnectivity::delete_face(FaceHandle _fh, bool _delete_isolated_vertice
|
||||
|
||||
|
||||
// delete all collected (half)edges
|
||||
// these edges were all boundary
|
||||
// delete isolated vertices (if _delete_isolated_vertices is true)
|
||||
if (!deleted_edges.empty())
|
||||
{
|
||||
@@ -534,6 +535,15 @@ void PolyConnectivity::delete_face(FaceHandle _fh, bool _delete_isolated_vertice
|
||||
// mark edge deleted
|
||||
status(*del_it).set_deleted(true);
|
||||
|
||||
|
||||
// mark corresponding halfedges as deleted
|
||||
// As the deleted edge is boundary,
|
||||
// all corresponding halfedges will also e deleted.
|
||||
if ( has_halfedge_status() ) {
|
||||
status(h0).set_deleted(true);
|
||||
status(h1).set_deleted(true);
|
||||
}
|
||||
|
||||
// update v0
|
||||
if (halfedge_handle(v0) == h1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user