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_;
143 const List<edgeStatus>& edgeStat,
148 void classifyFeatureAngles
151 List<edgeStatus>& edgeStat,
153 const bool geometricTestOnly
159 const List<edgeStatus>& edgeStat,
161 const label unsetVal,
162 const label prevEdgeI,
167 labelScalar walkSegment
170 const List<edgeStatus>& edgeStat,
171 const label startEdgeI,
172 const label startPointi,
173 const label currentFeatI,
184 const scalar includedAngle,
200 const triSurface& surf,
213 const triSurface& surf,
214 const scalar includedAngle,
215 const scalar minLen = 0,
216 const label minElems = 0,
217 const bool geometricTestOnly =
false 229 const triSurface& surf,
232 const scalar mergeTol = 1
e-6,
233 const bool geometricTestOnly =
false 244 inline const triSurface&
surface()
const 252 return featurePoints_;
258 return featureEdges_;
264 return externalStart_;
270 return internalStart_;
276 return externalStart_;
282 return internalStart_ - externalStart_;
288 return featureEdges_.size() - internalStart_;
294 const bool regionEdges,
295 const bool externalEdges,
296 const bool internalEdges
305 const scalar includedAngle,
306 const bool geometricTestOnly
314 const label minElems,
315 const scalar includedAngle
337 const bool removeInside
344 const plane& cutPlane
354 void checkFlatRegionEdge
358 const scalar includedAngle
369 const scalar includedAngle
399 const scalar minSampleDist = 0.1
413 const scalar minSampleDist = 0.1
428 scalar searchSpanSqr,
459 scalar searchSpanSqr,
A class for handling file names.
void deleteBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb, const bool removeInside) const
Mark edge status as 'NONE' for edges inside/outside box.
label nRegionEdges() const
Return number of region edges.
void write(const fileName &fName) const
Write as dictionary to file.
List< edge > edgeList
List of edge.
scalarField samples(nIntervals, Zero)
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
label externalStart() const
Start of external edges.
Map< label > nearestSamples(const labelList &selectedPoints, const pointField &samples, const scalarField &maxDistSqr) const
Find nearest sample for selected surface points.
void subsetBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status outside box as 'NONE'.
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.
const labelList & featureEdges() const
Return feature edge list.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
List< labelList > labelListList
List of labelList.
void writeObj(const fileName &prefix) const
Write to separate OBJ files (region, external, internal edges,.
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.
Not a classified feature edge.
labelList trimFeatures(const scalar minLen, const label minElems, const scalar includedAngle)
Delete small sets of edges. Edges are stringed up and any.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
line< point, const point & > linePointRef
A line using referred points.
void setFromStatus(const List< edgeStatus > &edgeStat, const scalar includedAngle)
Set from status per edge.
void operator=(const surfaceFeatures &rhs)
void writeStats(Ostream &os) const
Write some information.
const triSurface & surface() const
void excludeBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status inside box as 'NONE'.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const labelList & featurePoints() const
Return feature point list.
OBJstream os(runTime.globalPath()/outputName)
ClassName("surfaceFeatures")
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
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 nearestSurfEdge(const labelList &selectedEdges, const pointField &samples, scalar searchSpanSqr, labelList &edgeLabel, labelList &edgeEndPoint, pointField &edgePoint) const
Find nearest surface edge (out of selectedEdges) for.
surfaceFeatures(const triSurface &surf)
Construct from surface.
void excludeOpen(List< edgeStatus > &edgeStat) const
Mark edges with a single connected face as 'NONE'.
void nearestFeatEdge(const edgeList &edges, const pointField &points, scalar searchSpanSqr, labelList &edgeLabel) const
Find nearest feature edge to each surface edge. Uses the.
Standard boundBox with extra functionality for use in octree.
void writeDict(Ostream &os) const
Write as dictionary.
label nInternalEdges() const
Return number of internal edges.
List< label > labelList
A List of labels.
label internalStart() const
Start of internal edges.
Holds feature edges/points of surface.
label nExternalEdges() const
Return number of external edges.