Commit 051d1d66 authored by mattijs's avatar mattijs
Browse files

ENH: surfaceFeatures: survive zero length edge. Fixes #616.

parent b5dc2a5e
......@@ -243,12 +243,16 @@ void Foam::surfaceFeatures::calcFeatPoints
if (edgeStat[edgeI] != NONE)
{
edgeVecs.append(edges[edgeI].vec(localPoints));
edgeVecs.last() /= mag(edgeVecs.last());
vector vec = edges[edgeI].vec(localPoints);
scalar magVec = mag(vec);
if (magVec > SMALL)
{
edgeVecs.append(vec/magVec);
}
}
}
if (mag(edgeVecs[0] & edgeVecs[1]) < minCos)
if (edgeVecs.size() == 2 && mag(edgeVecs[0] & edgeVecs[1]) < minCos)
{
featurePoints.append(pointi);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment