handle the case of degenerate volumes in the link condition

a volume is degenerate if it consists only of twice the same face
with opposite orientation
This commit is contained in:
Sébastien Loriot 2018-09-04 10:09:08 +02:00
parent f6aa83e09c
commit e474d61fa7
2 changed files with 13 additions and 1 deletions

View File

@ -1421,10 +1421,15 @@ bool
//CGAL_ECMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ;
return false ;
}
if ( next(v0_v1, g) == opposite(prev(v1_v0, g), g) &&
prev(v0_v1, g) == opposite(next(v1_v0, g), g) )
{
//CGAL_ECMS_TRACE(3," degenerate volume." ) ;
return false ;
}
}
}
return true ;
}

View File

@ -506,6 +506,13 @@ bool EdgeCollapse<M,SP,VIM,VPM,EIM,ECTM,CF,PF,V>::Is_collapse_topologically_vali
rR = false ;
CGAL_SMS_TRACE(3," p-q belongs to a tetrahedron. NON-COLLAPSABLE edge." ) ;
}
if ( next(aProfile.v0_v1(), mSurface) == opposite(prev(aProfile.v1_v0(), mSurface), mSurface) &&
prev(aProfile.v0_v1(), mSurface) == opposite(next(aProfile.v1_v0(), mSurface), mSurface) )
{
CGAL_SMS_TRACE(3," degenerate volume." ) ;
return false ;
}
}
}
}