Go to the documentation of this file.
56 #ifndef extendedEdgeMesh_H
57 #define extendedEdgeMesh_H
70 class surfaceFeatures;
71 class searchableSurface;
74 class extendedEdgeMesh;
75 Istream&
operator>>(Istream&, extendedEdgeMesh&);
76 Ostream&
operator<<(Ostream&,
const extendedEdgeMesh&);
230 template<
class Patch>
366 scalar searchDistSqr,
374 scalar searchDistSqr,
398 scalar searchRadiusSqr,
406 const scalar searchRadiusSqr,
515 virtual void clear();
556 const scalar mergeDist,
600 label& pointConcaveStart,
601 label& pointMixedStart,
602 label& pointNonFeatStart,
604 label& edgeInternalStart,
605 label& edgeFlatStart,
606 label& edgeOpenStart,
607 label& edgeMultipleStart
void add(const extendedEdgeMesh &)
Add extendedEdgeMesh. No filtering of duplicates.
const labelListList & normalDirections() const
labelList regionEdges_
Feature edges which are on the boundary between regions.
static void sortedOrder(const List< extendedEdgeMesh::pointStatus > &pointStat, const List< extendedEdgeMesh::edgeStatus > &edgeStat, labelList &sortedToOriginalPoint, labelList &sortedToOriginalEdge, label &pointConcaveStart, label &pointMixedStart, label &pointNonFeatStart, label &edgeInternalStart, label &edgeFlatStart, label &edgeOpenStart, label &edgeMultipleStart)
Determine the ordering.
const labelListList & featurePointNormals() const
Return the indices of the normals that are adjacent to the.
static autoPtr< extendedEdgeMesh > New(const fileName &, const word &ext)
Select constructed from filename (explicit extension)
A class for handling words, derived from string.
A class for handling file names.
void allNearestFeatureEdges(const point &sample, const scalar searchRadiusSqr, List< pointIndexHit > &info) const
Find all the feature edges within searchDistSqr of sample.
const PtrList< indexedOctree< treeDataEdge > > & edgeTreesByType() const
Demand driven construction of octree for boundary edges by type.
label concaveStart_
Index of the start of the concave feature points.
void nearestFeatureEdgeByType(const point &sample, const scalarField &searchDistSqr, List< pointIndexHit > &info) const
Find the nearest point on each type of feature edge.
PtrList< indexedOctree< treeDataEdge > > edgeTreesByType_
Individual search trees for each type of edge.
bool mergePointsAndSort(const scalar mergeDist, labelList &pointMap, labelList &edgeMap)
Geometric merge points. Returns true if any points merged.
const labelList & regionEdges() const
Return the feature edges which are on the boundary between.
static const Foam::NamedEnum< edgeStatus, 6 > edgeStatusNames_
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
const labelListList & featurePointEdges() const
Return the edge labels for a given feature point. Edges are.
const indexedOctree< treeDataEdge > & edgeTree() const
Demand driven construction of octree for boundary edges.
label multipleStart() const
Return the index of the start of the multiply-connected feature.
label mixedStart_
Index of the start of the mixed type feature points.
const List< sideVolumeType > & normalVolumeTypes() const
Return.
bool featurePoint(label ptI) const
Return whether or not the point index is a feature point.
PackedList< 2 > edgeBaffles(label edgeI) const
Return the baffle faces of a specified edge.
A HashTable with keys but without contents.
List< sideVolumeType > normalVolumeTypes_
Type per normal: which side of normal to mesh.
autoPtr< indexedOctree< treeDataPoint > > pointTree_
Search tree for all feature points.
A simple container for copying or transferring objects of type <T>.
static bool canRead(const fileName &, const bool verbose=false)
Can we read this file format?
static const Foam::NamedEnum< pointStatus, 4 > pointStatusNames_
pointStatus getPointStatus(label ptI) const
Return the pointStatus of a specified point.
const vectorField & edgeDirections() const
Return the edgeDirection vectors.
static edgeStatus classifyEdge(const List< vector > &norms, const labelList &edNorms, const vector &fC0tofC1)
Classify the type of feature edge. Requires face centre 0 to face.
scalarField samples(nIntervals, 0)
label nonFeatureStart() const
Return the index of the start of the non-feature points.
TypeName("extendedEdgeMesh")
Runtime type information.
label concaveStart() const
Return the index of the start of the concave feature points.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
static wordHashSet readTypes()
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.
~extendedEdgeMesh()
Destructor.
static bool canReadType(const word &ext, const bool verbose=false)
Can we read this file format?
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
vectorField edgeDirections_
Flat and open edges require the direction of the edge.
void setFromStatus(const List< extendedEdgeMesh::pointStatus > &pointStat, const List< extendedEdgeMesh::edgeStatus > &edgeStat, labelList &sortedToOriginalPoint, labelList &sortedToOriginalEdge)
Order according to point and edge status.
sideVolumeType
Normals point to the outside.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Holds feature edges/points of surface.
Non-pointer based hierarchical recursive searching.
declareRunTimeSelectionTable(autoPtr, extendedEdgeMesh, fileExtension,(const fileName &name),(name))
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label multipleStart_
Index of the start of the multiply-connected feature edges.
virtual void clear()
Clear all storage.
static scalar cosNormalAngleTol_
Angular closeness tolerance for treating normals as the same.
autoPtr< indexedOctree< treeDataEdge > > edgeTree_
Search tree for all edges.
void nearestFeaturePoint(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
Ostream & operator<<(Ostream &, const edgeMesh &)
static label nPointTypes
Number of possible point types (i.e. number of slices)
void select(const searchableSurface &surf, const volumeType volType, labelList &pMap, labelList &eMap)
Remove outside/inside edges. volType denotes which side to keep.
static label externalStart_
Index of the start of the external feature edges - static as 0.
label internalStart() const
Return the index of the start of the internal feature edges.
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
vector edgeDirection(label edgeI, label ptI) const
Return the direction of edgeI, pointing away from ptI.
labelListList edgeNormals_
Indices of the normals that are adjacent to the feature edges.
static const Foam::NamedEnum< sideVolumeType, 4 > sideVolumeTypeNames_
label mixedStart() const
Return the index of the start of the mixed type feature points.
vectorField normals_
Normals of the features, to be referred to by index by both feature.
label internalStart_
Index of the start of the internal feature edges.
static label convexStart_
Index of the start of the convex feature points - static as 0.
labelListList normalDirections_
Starting directions for the edges.
label openStart() const
Return the index of the start of the open feature edges.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Xfer< extendedEdgeMesh > xfer()
Transfer contents to the Xfer container.
Description of feature edges and points.
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format type?
const indexedOctree< treeDataPoint > & pointTree() const
Demand driven construction of octree for feature points.
friend Istream & operator>>(Istream &is, sideVolumeType &vt)
void sortPointsAndEdges(const Patch &, const labelList &featureEdges, const labelList ®ionFeatureEdges, const labelList &feaurePoints)
extendedEdgeMesh()
Construct null.
static label nEdgeTypes
Number of possible feature edge types (i.e. number of slices)
void autoMap(const pointField &, const edgeList &, const labelList &pointMap, const labelList &edgeMap)
Update with derived geometry.
void trim(const searchableSurface &surf, const volumeType volType, labelList &pointMap, labelList &edgeMap)
Trim to surface. Keep volType side. Return map from current back.
virtual void writeStats(Ostream &os) const
Dump some information.
label externalStart() const
Return the index of the start of the external feature edges.
Istream & operator>>(Istream &, edgeMesh &)
void flipNormals()
Flip normals. All concave become convex, all internal external.
void nearestFeatureEdge(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
pointStatus classifyFeaturePoint(label ptI) const
Classify the type of feature point. Requires valid stored member.
void cut(const searchableSurface &, labelList &pMap, labelList &eMap, labelList &pointsFromEdge, labelList &oldEdge, labelList &surfTri)
Cut edges with surface. Return map from cut points&edges back.
labelListList featurePointEdges_
Indices of feature edges attached to feature points. The edges are.
static wordHashSet writeTypes()
label flatStart_
Index of the start of the flat feature edges.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label nonFeatureStart_
Index of the start of the non-feature points.
void writeObj(const fileName &prefix) const
Write all components of the extendedEdgeMesh as obj files.
label convexStart() const
Return the index of the start of the convex feature points.
void allNearestFeaturePoints(const point &sample, scalar searchRadiusSqr, List< pointIndexHit > &info) const
Find all the feature points within searchDistSqr of sample.
label openStart_
Index of the start of the open feature edges.
Points connected by edges.
void transfer(extendedEdgeMesh &)
Transfer the contents of the argument and annul the argument.
word name(const complex &)
Return a string representation of a complex.
label flatStart() const
Return the index of the start of the flat feature edges.
friend Ostream & operator<<(Ostream &os, const sideVolumeType &vt)
labelListList featurePointNormals_
Indices of the normals that are adjacent to the feature points.
edgeStatus getEdgeStatus(label edgeI) const
Return the edgeStatus of a specified edge.
A list of faces which address into the list of points.
bool read(const fileName &, const word &ext)
Read from file. Chooses reader based on explicit extension.