added test to skip degenerate triangles in curvature computation

This commit is contained in:
Paolo Cignoni 2008-12-12 15:08:36 +00:00
parent 4e2808a64e
commit 8ef495be20
1 changed files with 670 additions and 667 deletions

View File

@ -455,6 +455,9 @@ public:
angle1 = math::Abs(Angle( (*fi).P(0)-(*fi).P(1),(*fi).P(2)-(*fi).P(1) ));
angle2 = M_PI-(angle0+angle1);
// Skip degenerate triangles.
if(angle0==0 || angle1==0 || angle1==0) continue;
e01v = ( (*fi).V(1)->cP() - (*fi).V(0)->cP() ) ;
e12v = ( (*fi).V(2)->cP() - (*fi).V(1)->cP() ) ;
e20v = ( (*fi).V(0)->cP() - (*fi).V(2)->cP() ) ;