From 7c37f033e19d20bb95eb1585c625b69b5ca15ffe Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 11 Mar 2008 14:16:40 +0000 Subject: [PATCH] Added check on deleted faces in RemoveDegenerateFace --- vcg/complex/trimesh/clean.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/vcg/complex/trimesh/clean.h b/vcg/complex/trimesh/clean.h index 79790cdd..64e469b2 100644 --- a/vcg/complex/trimesh/clean.h +++ b/vcg/complex/trimesh/clean.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.57 2008/03/06 08:37:16 cignoni +added HasConsistentPerWedgeTexCoord + Revision 1.56 2008/01/24 11:52:05 cignoni corrected small bug in RemoveDuplicateVertex @@ -455,12 +458,15 @@ private: int count_fd = 0; for(fi=m.face.begin(); fi!=m.face.end();++fi) - if((*fi).V(0) == (*fi).V(1) || - (*fi).V(0) == (*fi).V(2) || - (*fi).V(1) == (*fi).V(2) ) + if(!(*fi).IsD()) { - count_fd++; - Allocator::DeleteFace(m,*fi); + if((*fi).V(0) == (*fi).V(1) || + (*fi).V(0) == (*fi).V(2) || + (*fi).V(1) == (*fi).V(2) ) + { + count_fd++; + Allocator::DeleteFace(m,*fi); + } } return count_fd; }