mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: triSurfaceMesh: always assign normal
This commit is contained in:
@ -827,6 +827,8 @@ void Foam::triSurfaceMesh::getNormal
|
||||
vectorField& normal
|
||||
) const
|
||||
{
|
||||
const triSurface& s = static_cast<const triSurface&>(*this);
|
||||
|
||||
normal.setSize(info.size());
|
||||
|
||||
if (minQuality_ >= 0)
|
||||
@ -834,7 +836,6 @@ void Foam::triSurfaceMesh::getNormal
|
||||
// Make sure we don't use triangles with low quality since
|
||||
// normal is not reliable.
|
||||
|
||||
const triSurface& s = static_cast<const triSurface&>(*this);
|
||||
const labelListList& faceFaces = s.faceFaces();
|
||||
|
||||
forAll(info, i)
|
||||
@ -842,6 +843,7 @@ void Foam::triSurfaceMesh::getNormal
|
||||
if (info[i].hit())
|
||||
{
|
||||
label faceI = info[i].index();
|
||||
normal[i] = s[faceI].normal(points());
|
||||
|
||||
scalar qual = s[faceI].tri(points()).quality();
|
||||
|
||||
@ -861,11 +863,8 @@ void Foam::triSurfaceMesh::getNormal
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
normal[i] = s[faceI].normal(points());
|
||||
}
|
||||
normal[i] /= mag(normal[i]);
|
||||
|
||||
normal[i] /= mag(normal[i]) + VSMALL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -885,7 +884,7 @@ void Foam::triSurfaceMesh::getNormal
|
||||
//normal[i] = faceNormals()[faceI];
|
||||
|
||||
//- Uncached
|
||||
normal[i] = triSurface::operator[](faceI).normal(points());
|
||||
normal[i] = s[faceI].normal(points());
|
||||
normal[i] /= mag(normal[i]) + VSMALL;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user