Go to the documentation of this file.
47 #ifndef surfaceFeatures_H
48 #define surfaceFeatures_H
148 const bool geometricTestOnly
156 const label unsetVal,
157 const label prevEdgeI,
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
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,
static pointIndexHit edgeNearest(const point &start, const point &end, const point &sample)
Return nearest point on edge (start..end). Also classify nearest:
const triSurface & surf_
Reference to surface.
label internalStart() const
Start of internal edges.
void writeDict(Ostream &) const
Write as dictionary.
static const scalar parallelTolerance
Tolerance for determining whether two vectors are parallel.
void nearestFeatEdge(const edgeList &edges, const pointField &points, scalar searchSpanSqr, labelList &edgeLabel) const
Find nearest feature edge to each surface edge. Uses the.
label externalStart_
Start of external edges in featureEdges_.
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.
void calcFeatPoints(const List< edgeStatus > &edgeStat, const scalar minCos)
Construct feature points where more than 2 feature edges meet.
labelList featureEdges_
Labels of edges that are features.
const labelList & featurePoints() const
Return feature point list.
surfaceFeatures(const triSurface &)
Construct from surface.
scalarField samples(nIntervals, 0)
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
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.
const labelList & featureEdges() const
Return feature edge list.
ClassName("surfaceFeatures")
label nextFeatEdge(const List< edgeStatus > &edgeStat, const labelList &featVisited, const label unsetVal, const label prevEdgeI, const label vertI) const
Choose next unset feature edge.
void operator=(const surfaceFeatures &)
A list of keyword definitions, which are a keyword followed by any number of values (e....
labelScalar walkSegment(const bool mark, const List< edgeStatus > &edgeStat, const label startEdgeI, const label startPointI, const label currentFeatI, labelList &featVisited)
Walk connected feature edges. Marks edges in featVisited.
void writeObj(const fileName &prefix) const
Write to separate OBJ files (region, external, internal edges,.
label nInternalEdges() const
Return number of internal edges.
const double e
Elementary charge.
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
labelList featurePoints_
Labels of points that are features.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Label and scalar; used in path walking.
labelScalar(const label n, const scalar len)
label nRegionEdges() const
Return number of region edges.
label internalStart_
Start of internal edges in featureEdges_.
void write(const fileName &fName) const
Write as dictionary to file.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void classifyFeatureAngles(const labelListList &edgeFaces, List< edgeStatus > &edgeStat, const scalar minCos, const bool geometricTestOnly) const
Classify the angles of the feature edges.
void findFeatures(const scalar includedAngle, const bool geometricTestOnly)
Find feature edges using provided included angle.
label externalStart() const
Start of external edges.