56 #ifndef extendedEdgeMesh_H 57 #define extendedEdgeMesh_H 71 class surfaceFeatures;
76 class extendedEdgeMesh;
78 Istream&
operator>>(Istream&, extendedEdgeMesh&);
79 Ostream&
operator<<(Ostream&,
const extendedEdgeMesh&);
213 template<
class Patch>
352 scalar searchDistSqr,
360 scalar searchDistSqr,
384 scalar searchRadiusSqr,
392 const scalar searchRadiusSqr,
501 virtual void clear();
526 const bool verbose =
true extendedEdgeMesh()
Construct null.
label nonFeatureStart() const
Return the index of the start of the non-feature points.
pointStatus getPointStatus(label ptI) const
Return the pointStatus of a specified point.
static autoPtr< extendedEdgeMesh > New(const fileName &, const word &ext)
Select constructed from filename (explicit extension)
label convexStart() const
Return the index of the start of the convex feature points.
const labelListList & featurePointNormals() const
Return the indices of the normals that are adjacent to the.
A HashTable with keys but without contents.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
static wordHashSet readTypes()
vectorField normals_
Normals of the features, to be referred to by index by both feature.
declareRunTimeSelectionTable(autoPtr, extendedEdgeMesh, fileExtension,(const fileName &name),(name))
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
const labelListList & normalDirections() const
void nearestFeaturePoint(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format type?
TypeName("extendedEdgeMesh")
Runtime type information.
void sortPointsAndEdges(const Patch &, const labelList &featureEdges, const labelList ®ionFeatureEdges, const labelList &feaurePoints)
PtrList< indexedOctree< treeDataEdge > > edgeTreesByType_
Individual search trees for each type of edge.
label mixedStart_
Index of the start of the mixed type feature points.
const List< sideVolumeType > & normalVolumeTypes() const
Return.
virtual void writeStats(Ostream &os) const
Dump some information.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Description of feature edges and points.
label multipleStart() const
Return the index of the start of the multiply-connected feature.
label openStart_
Index of the start of the open feature edges.
static const Foam::NamedEnum< sideVolumeType, 4 > sideVolumeTypeNames_
virtual void clear()
Clear all storage.
bool featurePoint(label ptI) const
Return whether or not the point index is a feature point.
static const Foam::NamedEnum< edgeStatus, 6 > edgeStatusNames_
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
label concaveStart_
Index of the start of the concave feature points.
label openStart() const
Return the index of the start of the open feature edges.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
List< sideVolumeType > normalVolumeTypes_
Type per normal: which side of normal to mesh.
void add(const extendedEdgeMesh &)
Add extendedEdgeMesh. No filtering of duplicates.
const labelList & regionEdges() const
Return the feature edges which are on the boundary between.
friend Ostream & operator<<(Ostream &os, const sideVolumeType &vt)
edgeStatus getEdgeStatus(label edgeI) const
Return the edgeStatus of a specified edge.
label internalStart_
Index of the start of the internal feature edges.
void nearestFeatureEdgeByType(const point &sample, const scalarField &searchDistSqr, pointIndexHitList &info) const
Find the nearest point on each type of feature edge.
labelListList normalDirections_
Starting directions for the edges.
scalarField samples(nIntervals, 0)
A list of faces which address into the list of points.
void allNearestFeatureEdges(const point &sample, const scalar searchRadiusSqr, pointIndexHitList &info) const
Find all the feature edges within searchDistSqr of sample.
void flipNormals()
Flip normals. All concave become convex, all internal external.
label flatStart() const
Return the index of the start of the flat feature edges.
labelList regionEdges_
Feature edges which are on the boundary between regions.
static label convexStart_
Index of the start of the convex feature points - static as 0.
label internalStart() const
Return the index of the start of the internal feature edges.
static label nEdgeTypes
Number of possible feature edge types (i.e. number of slices)
A class for handling words, derived from string.
label flatStart_
Index of the start of the flat feature edges.
Istream & operator>>(Istream &, directionInfo &)
bool read(const fileName &, const word &ext)
Read from file. Chooses reader based on explicit extension.
~extendedEdgeMesh()
Destructor.
sideVolumeType
Normals point to the outside.
static label externalStart_
Index of the start of the external feature edges - static as 0.
void transfer(extendedEdgeMesh &)
Transfer the contents of the argument and annul the argument.
autoPtr< indexedOctree< treeDataEdge > > edgeTree_
Search tree for all edges.
const indexedOctree< treeDataEdge > & edgeTree() const
Demand driven construction of octree for boundary edges.
static scalar cosNormalAngleTol_
Angular closeness tolerance for treating normals as the same.
label mixedStart() const
Return the index of the start of the mixed type feature points.
label externalStart() const
Return the index of the start of the external feature edges.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
PackedList< 2 > edgeBaffles(label edgeI) const
Return the baffle faces of a specified edge.
const labelListList & featurePointEdges() const
Return the edge labels for a given feature point. Edges are.
Points connected by edges.
const PtrList< indexedOctree< treeDataEdge > > & edgeTreesByType() const
Demand driven construction of octree for boundary edges by type.
word name(const complex &)
Return a string representation of a complex.
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.
static bool canReadType(const word &ext, const bool verbose=false)
Can we read this file format?
const vectorField & edgeDirections() const
Return the edgeDirection vectors.
label multipleStart_
Index of the start of the multiply-connected feature edges.
static const Foam::NamedEnum< pointStatus, 4 > pointStatusNames_
Non-pointer based hierarchical recursive searching.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Ostream & operator<<(Ostream &, const ensightPart &)
static bool canRead(const fileName &, const bool verbose=false)
Can we read this file format?
friend Istream & operator>>(Istream &is, sideVolumeType &vt)
labelListList featurePointEdges_
Indices of feature edges attached to feature points. The edges are.
void writeObj(const fileName &prefix, const bool verbose=true) const
Write all components of the extendedEdgeMesh as obj files.
static label nPointTypes
Number of possible point types (i.e. number of slices)
const indexedOctree< treeDataPoint > & pointTree() const
Demand driven construction of octree for feature points.
static wordHashSet writeTypes()
scalar minDisconnectedDist(const pointIndexHitList &hitList) const
Return the minimum distance between disconnected edges.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
labelListList featurePointNormals_
Indices of the normals that are adjacent to the feature points.
labelListList edgeNormals_
Indices of the normals that are adjacent to the feature edges.
label nonFeatureStart_
Index of the start of the non-feature points.
void nearestFeatureEdge(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
vector edgeDirection(label edgeI, label ptI) const
Return the direction of edgeI, pointing away from ptI.
vectorField edgeDirections_
Flat and open edges require the direction of the edge.
autoPtr< indexedOctree< treeDataPoint > > pointTree_
Search tree for all feature points.
Holds feature edges/points of surface.
void allNearestFeaturePoints(const point &sample, scalar searchRadiusSqr, pointIndexHitList &info) const
Find all the feature points within searchDistSqr of sample.
label concaveStart() const
Return the index of the start of the concave feature points.
pointStatus classifyFeaturePoint(label ptI) const
Classify the type of feature point. Requires valid stored member.