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,
215 const scalar includedAngle,
216 const scalar minLen = 0,
217 const label minElems = 0,
218 const bool geometricTestOnly =
false
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,
Minimal example by using system/controlDict.functions:
A HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
Holds feature edges/points of surface.
void findFeatures(const scalar includedAngle, const bool geometricTestOnly)
Find feature edges using provided included angle.
labelList selectFeatureEdges(const bool regionEdges, const bool externalEdges, const bool internalEdges) const
Helper function: select a subset of featureEdges_.
void setFromStatus(const List< edgeStatus > &edgeStat, const scalar includedAngle)
Set from status per edge.
const triSurface & surface() const
void excludeOpen(List< edgeStatus > &edgeStat) const
Mark edges with a single connected face as 'NONE'.
void subsetPlane(List< edgeStatus > &edgeStat, const plane &cutPlane) const
If edge does not intersect the plane, mark as 'NONE'.
ClassName("surfaceFeatures")
label nRegionEdges() const
Return number of region edges.
label nExternalEdges() const
Return number of external edges.
void operator=(const surfaceFeatures &rhs)
void writeObj(const fileName &prefix) const
Write to separate OBJ files (region, external, internal edges,.
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.
List< edgeStatus > toStatus() const
From member feature edges to status per edge.
void subsetBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status outside box as 'NONE'.
@ NONE
Not a classified feature edge.
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.
void deleteBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb, const bool removeInside) const
Mark edge status as 'NONE' for edges inside/outside box.
void writeDict(Ostream &os) const
Write as dictionary.
label internalStart() const
Start of internal edges.
label externalStart() const
Start of external edges.
void writeStats(Ostream &os) const
Write some information.
Map< label > nearestSamples(const labelList &selectedPoints, const pointField &samples, const scalarField &maxDistSqr) const
Find nearest sample for selected surface points.
void nearestFeatEdge(const edgeList &edges, const pointField &points, scalar searchSpanSqr, labelList &edgeLabel) const
Find nearest feature edge to each surface edge. Uses the.
label nInternalEdges() const
Return number of internal edges.
const labelList & featureEdges() const
Return feature edge list.
const labelList & featurePoints() const
Return feature point list.
labelList trimFeatures(const scalar minLen, const label minElems, const scalar includedAngle)
Delete small sets of edges. Edges are stringed up and any.
void excludeBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status inside box as 'NONE'.
Standard boundBox with extra functionality for use in octree.
Triangulated surface description with patch information.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
OBJstream os(runTime.globalPath()/outputName)
List< label > labelList
A List of labels.
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
vector point
Point is a vector.
List< labelList > labelListList
A List of labelList.
scalarField samples(nIntervals, Zero)