mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: surfaceFeatures: survive zero length edge. Fixes #616.
This commit is contained in:
@ -243,12 +243,16 @@ void Foam::surfaceFeatures::calcFeatPoints
|
|||||||
|
|
||||||
if (edgeStat[edgeI] != NONE)
|
if (edgeStat[edgeI] != NONE)
|
||||||
{
|
{
|
||||||
edgeVecs.append(edges[edgeI].vec(localPoints));
|
vector vec = edges[edgeI].vec(localPoints);
|
||||||
edgeVecs.last() /= mag(edgeVecs.last());
|
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);
|
featurePoints.append(pointi);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user