mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Add findAllNearestEdges to conformationSurfaces (calls extendedFeatureEdgeMesh)
This commit is contained in:
@ -729,6 +729,48 @@ void Foam::conformationSurfaces::findEdgeNearestByType
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Foam::conformationSurfaces::findAllNearestEdges
|
||||||
|
(
|
||||||
|
const point& sample,
|
||||||
|
const scalar searchRadiusSqr,
|
||||||
|
List<List<pointIndexHit> >& edgeHitsByFeature,
|
||||||
|
List<label>& featuresHit
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
// Initialise
|
||||||
|
//featuresHit.setSize(features_.size());
|
||||||
|
//featuresHit = -1;
|
||||||
|
//edgeHitsByFeature.setSize(features_.size());
|
||||||
|
|
||||||
|
// Work arrays
|
||||||
|
List<pointIndexHit> hitInfo(extendedFeatureEdgeMesh::nEdgeTypes);
|
||||||
|
|
||||||
|
forAll(features_, testI)
|
||||||
|
{
|
||||||
|
features_[testI].allNearestFeatureEdges
|
||||||
|
(
|
||||||
|
sample,
|
||||||
|
searchRadiusSqr,
|
||||||
|
hitInfo
|
||||||
|
);
|
||||||
|
|
||||||
|
bool anyHit = false;
|
||||||
|
forAll(hitInfo, hitI)
|
||||||
|
{
|
||||||
|
if (hitInfo[hitI].hit())
|
||||||
|
{
|
||||||
|
anyHit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anyHit)
|
||||||
|
{
|
||||||
|
edgeHitsByFeature.append(hitInfo);
|
||||||
|
featuresHit.append(testI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::conformationSurfaces::writeFeatureObj(const fileName& prefix) const
|
void Foam::conformationSurfaces::writeFeatureObj(const fileName& prefix) const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -270,7 +270,17 @@ public:
|
|||||||
const point& sample,
|
const point& sample,
|
||||||
scalar nearestDistSqr,
|
scalar nearestDistSqr,
|
||||||
List<pointIndexHit>& edgeHit,
|
List<pointIndexHit>& edgeHit,
|
||||||
List<label>& featureHit
|
List<label>& featuresHit
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Find the nearest points on each feature edge that is within
|
||||||
|
// a given distance from the sample point
|
||||||
|
void findAllNearestEdges
|
||||||
|
(
|
||||||
|
const point& sample,
|
||||||
|
const scalar searchRadiusSqr,
|
||||||
|
List<List<pointIndexHit> >& edgeHitsByFeature,
|
||||||
|
List<label>& featuresHit
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Find which patch is intersected by the line from one point to
|
//- Find which patch is intersected by the line from one point to
|
||||||
|
|||||||
Reference in New Issue
Block a user