From 3d150e9aea85cfa6964b4ff184cbbda4c29c4421 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 25 Nov 2013 10:15:54 +0000 Subject: [PATCH] changed an assert condition in FlipF that could lead to a failure in the case of quad mesh navigation over polygonal faces. --- vcg/simplex/face/pos.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcg/simplex/face/pos.h b/vcg/simplex/face/pos.h index 8c71f1a5..a4047184 100644 --- a/vcg/simplex/face/pos.h +++ b/vcg/simplex/face/pos.h @@ -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));