45 #ifndef surfaceFeatures_H 46 #define surfaceFeatures_H 91 labelScalar(
const label n,
const scalar len)
101 static const scalar parallelTolerance;
116 label externalStart_;
119 label internalStart_;
143 void classifyFeatureAngles
148 const bool geometricTestOnly
156 const label unsetVal,
157 const label prevEdgeI,
162 labelScalar walkSegment
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,
429 const bool removeInside,
437 const plane& cutPlane,
449 const scalar includedAngle,
458 const scalar includedAngle,
A class for handling file names.
label nRegionEdges() const
Return number of region edges.
void write(const fileName &fName) const
Write as dictionary to file.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void selectCutEdges(const triSurface &surf, const plane &cutPlane, List< surfaceFeatures::edgeStatus > &edgeStat)
Select edges that are intersected by the given plane.
void size(const label)
Override size to be inconsistent with allocated storage.
surfaceFeatures::edgeStatus checkNonManifoldEdge(const triSurface &surf, const scalar tol, const scalar includedAngle, const label edgei)
Divide into multiple normal bins.
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 selectBox(const triSurface &surf, const boundBox &bb, const bool removeInside, List< surfaceFeatures::edgeStatus > &edgeStat)
Select edges inside or outside bounding box.
A bounding box defined in terms of the points at its extremities.
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.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
const labelList & featureEdges() const
Return feature edge list.
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
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.
void selectManifoldEdges(const triSurface &surf, const scalar tol, const scalar includedAngle, List< surfaceFeatures::edgeStatus > &edgeStat)
Select manifold edges.
scalarField samples(nIntervals, 0)
labelList trimFeatures(const scalar minLen, const label minElems, const scalar includedAngle)
Delete small sets of edges. Edges are stringed up and any.
void operator=(const surfaceFeatures &)
void setFromStatus(const List< edgeStatus > &edgeStat, const scalar includedAngle)
Set from status per edge.
const triSurface & surface() const
surfaceFeatures(const triSurface &)
Construct from surface.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const labelList & featurePoints() const
Return feature point list.
ClassName("surfaceFeatures")
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.
void writeDict(Ostream &) const
Write as dictionary.
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 doubleScalar e
Elementary charge.
label internalStart() const
Start of internal edges.
Triangulated surface description with patch information.
Holds feature edges/points of surface.
label nExternalEdges() const
Return number of external edges.