Go to the documentation of this file.
50 #ifndef surfaceFeatures_H
51 #define surfaceFeatures_H
97 labelScalar(
const label
n,
const scalar len)
107 static const scalar parallelTolerance;
113 const triSurface& surf_;
122 label externalStart_;
125 label internalStart_;
144 const List<edgeStatus>& edgeStat,
149 void classifyFeatureAngles
152 List<edgeStatus>& edgeStat,
154 const bool geometricTestOnly
160 const List<edgeStatus>& edgeStat,
162 const label unsetVal,
163 const label prevEdgeI,
168 labelScalar walkSegment
171 const List<edgeStatus>& edgeStat,
172 const label startEdgeI,
173 const label startPointi,
174 const label currentFeatI,
185 const scalar includedAngle,
201 const triSurface& surf,
214 const triSurface& surf,
215 const scalar includedAngle,
216 const scalar minLen = 0,
217 const label minElems = 0,
218 const bool geometricTestOnly =
false
230 const triSurface& surf,
233 const scalar mergeTol = 1
e-6,
234 const bool geometricTestOnly =
false
253 return featurePoints_;
259 return featureEdges_;
265 return externalStart_;
271 return internalStart_;
277 return externalStart_;
283 return internalStart_ - externalStart_;
289 return featureEdges_.size() - internalStart_;
295 const bool regionEdges,
296 const bool externalEdges,
297 const bool internalEdges
306 const scalar includedAngle,
307 const bool geometricTestOnly
315 const label minElems,
316 const scalar includedAngle
338 const bool removeInside
345 const plane& cutPlane
355 void checkFlatRegionEdge
359 const scalar includedAngle
370 const scalar includedAngle
400 const scalar minSampleDist = 0.1
414 const scalar minSampleDist = 0.1
429 scalar searchSpanSqr,
460 scalar searchSpanSqr,
void subsetBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status outside box as 'NONE'.
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
label internalStart() const
Start of internal edges.
void nearestFeatEdge(const edgeList &edges, const pointField &points, scalar searchSpanSqr, labelList &edgeLabel) const
Find nearest feature edge to each surface edge. Uses the.
void writeDict(Ostream &os) const
Write as dictionary.
List< edge > edgeList
A List of edges.
Map< label > nearestSamples(const labelList &selectedPoints, const pointField &samples, const scalarField &maxDistSqr) const
Find nearest sample for selected surface points.
A class for handling file names.
labelList selectFeatureEdges(const bool regionEdges, const bool externalEdges, const bool internalEdges) const
Helper function: select a subset of featureEdges_.
List< edgeStatus > toStatus() const
From member feature edges to status per edge.
Map< pointIndexHit > nearestEdges(const labelList &selectedEdges, const edgeList &sampleEdges, const labelList &selectedSampleEdges, const pointField &samplePoints, const scalarField &sampleDist, const scalarField &maxDistSqr, const scalar minSampleDist=0.1) const
Like nearestSamples but now gets nearest point on.
label nExternalEdges() const
Return number of external edges.
Standard boundBox with extra functionality for use in octree.
void writeStats(Ostream &os) const
Write some information.
void operator=(const surfaceFeatures &rhs)
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
const labelList & featurePoints() const
Return feature point list.
Not a classified feature edge.
Triangulated surface description with patch information.
Holds feature edges/points of surface.
void nearestSurfEdge(const labelList &selectedEdges, const pointField &samples, scalar searchSpanSqr, labelList &edgeLabel, labelList &edgeEndPoint, pointField &edgePoint) const
Find nearest surface edge (out of selectedEdges) for.
scalarField samples(nIntervals, Zero)
const labelList & featureEdges() const
Return feature edge list.
ClassName("surfaceFeatures")
surfaceFeatures(const triSurface &surf)
Construct from surface.
void writeObj(const fileName &prefix) const
Write to separate OBJ files (region, external, internal edges,.
label nInternalEdges() const
Return number of internal edges.
OBJstream os(runTime.globalPath()/outputName)
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
void setFromStatus(const List< edgeStatus > &edgeStat, const scalar includedAngle)
Set from status per edge.
labelList trimFeatures(const scalar minLen, const label minElems, const scalar includedAngle)
Delete small sets of edges. Edges are stringed up and any.
const triSurface & surface() const
void excludeBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status inside box as 'NONE'.
List< labelList > labelListList
A List of labelList.
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
const dimensionedScalar e
Elementary charge.
label nRegionEdges() const
Return number of region edges.
void deleteBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb, const bool removeInside) const
Mark edge status as 'NONE' for edges inside/outside box.
void write(const fileName &fName) const
Write as dictionary to file.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void subsetPlane(List< edgeStatus > &edgeStat, const plane &cutPlane) const
If edge does not intersect the plane, mark as 'NONE'.
vector point
Point is a vector.
void findFeatures(const scalar includedAngle, const bool geometricTestOnly)
Find feature edges using provided included angle.
void excludeOpen(List< edgeStatus > &edgeStat) const
Mark edges with a single connected face as 'NONE'.
Minimal example by using system/controlDict.functions:
label externalStart() const
Start of external edges.