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,
193 const scalar includedAngle,
195 const point& leftPoint
210 const triSurface& surf,
223 const triSurface& surf,
224 const scalar includedAngle,
225 const scalar minLen = 0,
226 const label minElems = 0,
227 const bool geometricTestOnly =
false
242 const scalar mergeTol = 1
e-6,
243 const bool geometricTestOnly =
false
262 return featurePoints_;
268 return featureEdges_;
274 return externalStart_;
280 return internalStart_;
286 return externalStart_;
292 return internalStart_ - externalStart_;
298 return featureEdges_.
size() - internalStart_;
304 const bool regionEdges,
305 const bool externalEdges,
306 const bool internalEdges
315 const scalar includedAngle,
316 const bool geometricTestOnly
324 const label minElems,
325 const scalar includedAngle
347 const bool removeInside
354 const plane& cutPlane
367 void checkFlatRegionEdge
371 const scalar includedAngle
382 const scalar includedAngle
412 const scalar minSampleDist = 0.1
426 const scalar minSampleDist = 0.1
441 scalar searchSpanSqr,
472 scalar searchSpanSqr,
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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,...
void size(const label n)
Older name for setAddressableSize.
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 excludeNonManifold(List< edgeStatus > &edgeStat) const
Mark edges with >2 connected faces as 'NONE'.
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.
surfaceFeatures(const triSurface &surf)
Construct from surface.
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< edge > edgeList
List of edge.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
line< point, const point & > linePointRef
A line using referred points.
vector point
Point is a vector.
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
vectorField pointField
pointField is a vectorField.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
scalarField samples(nIntervals, Zero)