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
|
Foam::featureEdgeMesh::featureEdgeMesh
|
||||||
(
|
(
|
||||||
const surfaceFeatures& sFeat,
|
const surfaceFeatures& sFeat,
|
||||||
@ -618,36 +619,19 @@ Foam::featureEdgeMesh::edgeStatus Foam::featureEdgeMesh::classifyEdge
|
|||||||
void Foam::featureEdgeMesh::nearestFeatureEdge
|
void Foam::featureEdgeMesh::nearestFeatureEdge
|
||||||
(
|
(
|
||||||
const pointField& samples,
|
const pointField& samples,
|
||||||
scalarField searchDistSqr,
|
const scalarField& searchDistSqr,
|
||||||
labelList& edgeLabel,
|
List<pointIndexHit>& info
|
||||||
pointField& edgePoint,
|
|
||||||
List<vectorField>& adjacentNormals
|
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
edgeLabel.setSize(samples.size());
|
info.setSize(samples.size());
|
||||||
edgePoint.setSize(samples.size());
|
|
||||||
adjacentNormals.setSize(samples.size());
|
|
||||||
|
|
||||||
forAll(samples, i)
|
forAll(samples, i)
|
||||||
{
|
{
|
||||||
const point& sample = samples[i];
|
info[i] = edgeTree().findNearest
|
||||||
|
|
||||||
pointIndexHit pHit = edgeTree().findNearest
|
|
||||||
(
|
(
|
||||||
sample,
|
samples[i],
|
||||||
searchDistSqr[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
|
void nearestFeatureEdge
|
||||||
(
|
(
|
||||||
const pointField& samples,
|
const pointField& samples,
|
||||||
scalarField searchDistSqr,
|
const scalarField& searchDistSqr,
|
||||||
labelList& edgeLabel,
|
List<pointIndexHit>& info
|
||||||
pointField& edgePoint,
|
|
||||||
List<vectorField>& adjacentNormals
|
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
@ -279,7 +277,7 @@ public:
|
|||||||
// Write
|
// Write
|
||||||
|
|
||||||
//- Write all components of the featureEdgeMesh as obj files
|
//- 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
|
// //- ReadData function required for regIOobject read operation
|
||||||
// virtual bool readData(Istream&);
|
// virtual bool readData(Istream&);
|
||||||
|
|||||||
Reference in New Issue
Block a user