fix "relink failed" condition

closes #1244

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1220 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Matthias Möller
2015-02-10 14:15:25 +00:00
parent 81a7ee7341
commit 74942b5eb7
2 changed files with 9 additions and 6 deletions

View File

@@ -176,17 +176,19 @@ PolyConnectivity::add_face(const VertexHandle* _vertex_handles, size_t _vhs_size
do
boundary_prev =
opposite_halfedge_handle(next_halfedge_handle(boundary_prev));
while (!is_boundary(boundary_prev) || boundary_prev==inner_prev);
while (!is_boundary(boundary_prev));
boundary_next = next_halfedge_handle(boundary_prev);
assert(is_boundary(boundary_prev));
assert(is_boundary(boundary_next));
// ok ?
if (boundary_next == inner_next)
if (boundary_prev == inner_prev)
{
omerr() << "PolyMeshT::add_face: patch re-linking failed\n";
return InvalidFaceHandle;
}
assert(is_boundary(boundary_prev));
assert(is_boundary(boundary_next));
// other halfedges' handles
patch_start = next_halfedge_handle(inner_prev);
patch_end = prev_halfedge_handle(inner_next);