mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: triSurfaceSearch: findLineAll returns 1 hit if line goes through a surface point
This commit is contained in:
@ -54,6 +54,29 @@ bool Foam::triSurfaceSearch::checkUniqueHit
|
||||
if (nearType == 1)
|
||||
{
|
||||
// near point
|
||||
|
||||
const label nearPointI = f[nearLabel];
|
||||
|
||||
const labelList& pointFaces =
|
||||
surface().pointFaces()[surface().meshPointMap()[nearPointI]];
|
||||
|
||||
forAll(pointFaces, pI)
|
||||
{
|
||||
const label pointFaceI = pointFaces[pI];
|
||||
|
||||
if (pointFaceI != currHit.index())
|
||||
{
|
||||
forAll(hits, hI)
|
||||
{
|
||||
const pointIndexHit& hit = hits[hI];
|
||||
|
||||
if (hit.index() == pointFaceI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (nearType == 2)
|
||||
{
|
||||
|
||||
@ -74,6 +74,9 @@ class triSurfaceSearch
|
||||
|
||||
//- Check whether the current hit on the surface which lies on lineVec
|
||||
// is unique.
|
||||
// point : return 1 unique hit
|
||||
// edge : return 1 hit if in the cone of the edge faces
|
||||
// : return 2 hits if outside or on the cone.
|
||||
bool checkUniqueHit
|
||||
(
|
||||
const pointIndexHit& currHit,
|
||||
|
||||
Reference in New Issue
Block a user