45 #ifndef surfaceFeatures_H
46 #define surfaceFeatures_H
91 labelScalar(
const label n,
const scalar len)
101 static const scalar parallelTolerance;
107 const triSurface& surf_;
116 label externalStart_;
119 label internalStart_;
138 const List<edgeStatus>& edgeStat,
143 void classifyFeatureAngles
146 List<edgeStatus>& edgeStat,
148 const bool geometricTestOnly
154 const List<edgeStatus>& edgeStat,
156 const label unsetVal,
157 const label prevEdgeI,
162 labelScalar walkSegment
165 const List<edgeStatus>& edgeStat,
166 const label startEdgeI,
167 const label startPointi,
168 const label currentFeatI,
198 const scalar includedAngle,
199 const scalar minLen = 0,
200 const label minElems = 0,
201 const bool geometricTestOnly =
false
216 const scalar mergeTol = 1
e-6,
217 const bool geometricTestOnly =
false
236 return featurePoints_;
242 return featureEdges_;
248 return externalStart_;
254 return internalStart_;
260 return externalStart_;
266 return internalStart_ - externalStart_;
272 return featureEdges_.size() - internalStart_;
278 const bool regionEdges,
279 const bool externalEdges,
280 const bool internalEdges
289 const scalar includedAngle,
290 const bool geometricTestOnly
298 const label minElems,
299 const scalar includedAngle
309 const scalar includedAngle
339 const scalar minSampleDist = 0.1
353 const scalar minSampleDist = 0.1
368 scalar searchSpanSqr,
399 scalar searchSpanSqr,
427 const triSurface& surf,
429 const bool removeInside,
430 List<surfaceFeatures::edgeStatus>& edgeStat
436 const triSurface& surf,
437 const plane& cutPlane,
438 List<surfaceFeatures::edgeStatus>& edgeStat
447 const triSurface& surf,
449 const scalar includedAngle,
456 const triSurface& surf,
458 const scalar includedAngle,
459 List<surfaceFeatures::edgeStatus>& edgeStat
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 any number of values (e....
A class for handling file names.
Holds feature edges/points of surface.
void findFeatures(const scalar includedAngle, const bool geometricTestOnly)
Find feature edges using provided included angle.
surfaceFeatures(const triSurface &)
Construct from surface.
labelList selectFeatureEdges(const bool regionEdges, const bool externalEdges, const bool internalEdges) const
Helper function: select a subset of featureEdges_.
const labelList & featureEdges() const
Return feature edge list.
void setFromStatus(const List< edgeStatus > &edgeStat, const scalar includedAngle)
Set from status per edge.
void write(const fileName &fName) const
Write as dictionary to file.
const labelList & featurePoints() const
Return feature point list.
ClassName("surfaceFeatures")
label nRegionEdges() const
Return number of region edges.
label nExternalEdges() const
Return number of external edges.
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 writeDict(Ostream &) const
Write as dictionary.
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.
label internalStart() const
Start of internal edges.
label externalStart() const
Start of external edges.
const triSurface & surface() const
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.
void operator=(const surfaceFeatures &)
labelList trimFeatures(const scalar minLen, const label minElems, const scalar includedAngle)
Delete small sets of edges. Edges are stringed up and any.
Triangulated surface description with patch information.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
PointIndexHit< point > pointIndexHit
surfaceFeatures::edgeStatus checkNonManifoldEdge(const triSurface &surf, const scalar tol, const scalar includedAngle, const label edgei)
Divide into multiple normal bins.
void selectBox(const triSurface &surf, const boundBox &bb, const bool removeInside, List< surfaceFeatures::edgeStatus > &edgeStat)
Select edges inside or outside bounding box.
vector point
Point is a vector.
List< labelList > labelListList
A List of labelList.
void selectManifoldEdges(const triSurface &surf, const scalar tol, const scalar includedAngle, List< surfaceFeatures::edgeStatus > &edgeStat)
Select manifold edges.
void selectCutEdges(const triSurface &surf, const plane &cutPlane, List< surfaceFeatures::edgeStatus > &edgeStat)
Select edges that are intersected by the given plane.
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
scalarField samples(nIntervals, 0)