mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Modified nearestFeatureEdge arguments to take standard, sample, distSqr, pointHitIndex. Querying object will use the edge index to lookup supplementary information.
This commit is contained in:
@ -117,6 +117,7 @@ Foam::featureEdgeMesh::featureEdgeMesh(const IOobject& io)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::featureEdgeMesh::featureEdgeMesh
|
||||
(
|
||||
const surfaceFeatures& sFeat,
|
||||
@ -618,36 +619,19 @@ Foam::featureEdgeMesh::edgeStatus Foam::featureEdgeMesh::classifyEdge
|
||||
void Foam::featureEdgeMesh::nearestFeatureEdge
|
||||
(
|
||||
const pointField& samples,
|
||||
scalarField searchDistSqr,
|
||||
labelList& edgeLabel,
|
||||
pointField& edgePoint,
|
||||
List<vectorField>& adjacentNormals
|
||||
const scalarField& searchDistSqr,
|
||||
List<pointIndexHit>& info
|
||||
) const
|
||||
{
|
||||
edgeLabel.setSize(samples.size());
|
||||
edgePoint.setSize(samples.size());
|
||||
adjacentNormals.setSize(samples.size());
|
||||
info.setSize(samples.size());
|
||||
|
||||
forAll(samples, i)
|
||||
{
|
||||
const point& sample = samples[i];
|
||||
|
||||
pointIndexHit pHit = edgeTree().findNearest
|
||||
info[i] = edgeTree().findNearest
|
||||
(
|
||||
sample,
|
||||
samples[i],
|
||||
searchDistSqr[i]
|
||||
);
|
||||
|
||||
if (!pHit.hit())
|
||||
{
|
||||
edgeLabel[i] = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
edgeLabel[i] = pHit.index();
|
||||
edgePoint[i] = pHit.hitPoint();
|
||||
adjacentNormals[i] = edgeNormals(edgeLabel[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -224,10 +224,8 @@ public:
|
||||
void nearestFeatureEdge
|
||||
(
|
||||
const pointField& samples,
|
||||
scalarField searchDistSqr,
|
||||
labelList& edgeLabel,
|
||||
pointField& edgePoint,
|
||||
List<vectorField>& adjacentNormals
|
||||
const scalarField& searchDistSqr,
|
||||
List<pointIndexHit>& info
|
||||
) const;
|
||||
|
||||
// Access
|
||||
@ -279,7 +277,7 @@ public:
|
||||
// Write
|
||||
|
||||
//- Write all components of the featureEdgeMesh as obj files
|
||||
void writeObj(const fileName& fName) const;
|
||||
void writeObj(const fileName& prefix) const;
|
||||
|
||||
// //- ReadData function required for regIOobject read operation
|
||||
// virtual bool readData(Istream&);
|
||||
|
||||
Reference in New Issue
Block a user