changed an assert condition in FlipF that could lead to a failure in the case of quad mesh navigation over polygonal faces.

This commit is contained in:
Paolo Cignoni 2013-11-25 10:15:54 +00:00
parent a29df708da
commit 3d150e9aea
1 changed files with 2 additions and 1 deletions

View File

@ -190,10 +190,11 @@ public:
void FlipF()
{
assert( f->FFp(z)->FFp(f->FFi(z))==f ); // two manifoldness check
// Check that pos vertex is one of the current z-th edge and it is different from the vert opposite to the edge.
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V((z))==v));
FaceType *nf=f->FFp(z);
int nz=f->FFi(z);
assert(nf->V(f->Prev(nz))!=v && (nf->V(f->Next(nz))==v || nf->V((nz))==v));
assert(nf->V(nf->Prev(nz))!=v && (nf->V(nf->Next(nz))==v || nf->V((nz))==v));
f=nf;
z=nz;
assert(f->V(f->Prev(z))!=v && (f->V(f->Next(z))==v || f->V(z)==v));