ENH: autoSnapDriverFeature: protect for zero sized faces

This commit is contained in:
mattijs
2013-04-09 12:09:55 +01:00
parent 134f9ff418
commit b15cf81217

View File

@ -767,7 +767,7 @@ void Foam::autoSnapDriver::binFeatureFace
) const ) const
{ {
// What to do with very far attraction? For now just ignore the face // What to do with very far attraction? For now just ignore the face
if (magSqr(faceDisp) < sqr(snapDist)) if (magSqr(faceDisp) < sqr(snapDist) && mag(faceSurfaceNormal) > VSMALL)
{ {
const point pt = fc + faceDisp; const point pt = fc + faceDisp;