mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: searchableSurface: handle multiple surfaces. Fixes #1034
This commit is contained in:
@ -516,8 +516,11 @@ void Foam::searchableSurfacesQueries::findNearest
|
||||
// - current surface : info+normal1
|
||||
forAll(near, i)
|
||||
{
|
||||
if (info[i].hit() && normal[i] != vector::zero)
|
||||
if (info[i].hit())
|
||||
{
|
||||
if (normal[i] != vector::zero)
|
||||
{
|
||||
// Have previous hit. Find intersection
|
||||
if (mag(normal[i]&normal1[i]) < 1.0-1e-6)
|
||||
{
|
||||
plane pl0(near[i], normal[i], false);
|
||||
@ -548,6 +551,14 @@ void Foam::searchableSurfacesQueries::findNearest
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// First hit
|
||||
near[i] = info[i].hitPoint();
|
||||
normal[i] = normal1[i];
|
||||
constraint[i].applyConstraint(normal1[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Step to next surface
|
||||
|
||||
Reference in New Issue
Block a user