56 #ifndef extendedEdgeMesh_H 57 #define extendedEdgeMesh_H 70 class surfaceFeatures;
75 class extendedEdgeMesh;
77 Istream&
operator>>(Istream&, extendedEdgeMesh&);
78 Ostream&
operator<<(Ostream&,
const extendedEdgeMesh&);
212 template<
class Patch>
349 scalar searchDistSqr,
357 scalar searchDistSqr,
381 scalar searchRadiusSqr,
389 const scalar searchRadiusSqr,
498 virtual void clear();
label convexStart() const
Return the index of the start of the convex feature points.
label concaveStart() const
Return the index of the start of the concave feature points.
extendedEdgeMesh()
Construct null.
A simple container for copying or transferring objects of type <T>.
static autoPtr< extendedEdgeMesh > New(const fileName &, const word &ext)
Select constructed from filename (explicit extension)
A HashTable with keys but without contents.
label nonFeatureStart() const
Return the index of the start of the non-feature points.
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.
const labelListList & featurePointEdges() const
Return the edge labels for a given feature point. Edges are.
declareRunTimeSelectionTable(autoPtr, extendedEdgeMesh, fileExtension,(const fileName &name),(name))
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format type?
TypeName("extendedEdgeMesh")
Runtime type information.
void allNearestFeatureEdges(const point &sample, const scalar searchRadiusSqr, List< pointIndexHit > &info) const
Find all the feature edges within searchDistSqr of sample.
void writeObj(const fileName &prefix) const
Write all components of the extendedEdgeMesh as obj files.
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.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Description of feature edges and points.
label openStart_
Index of the start of the open feature edges.
label externalStart() const
Return the index of the start of the external feature edges.
static const Foam::NamedEnum< sideVolumeType, 4 > sideVolumeTypeNames_
bool featurePoint(label ptI) const
Return whether or not the point index is a feature point.
virtual void clear()
Clear all storage.
static const Foam::NamedEnum< edgeStatus, 6 > edgeStatusNames_
label concaveStart_
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...
List< sideVolumeType > normalVolumeTypes_
Type per normal: which side of normal to mesh.
void add(const extendedEdgeMesh &)
Add extendedEdgeMesh. No filtering of duplicates.
PackedList< 2 > edgeBaffles(label edgeI) const
Return the baffle faces of a specified edge.
void nearestFeatureEdgeByType(const point &sample, const scalarField &searchDistSqr, List< pointIndexHit > &info) const
Find the nearest point on each type of feature edge.
friend Ostream & operator<<(Ostream &os, const sideVolumeType &vt)
label internalStart_
Index of the start of the internal feature edges.
labelListList normalDirections_
Starting directions for the edges.
const labelListList & featurePointNormals() const
Return the indices of the normals that are adjacent to the.
scalarField samples(nIntervals, 0)
A list of faces which address into the list of points.
void allNearestFeaturePoints(const point &sample, scalar searchRadiusSqr, List< pointIndexHit > &info) const
Find all the feature points within searchDistSqr of sample.
void flipNormals()
Flip normals. All concave become convex, all internal external.
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 multipleStart() const
Return the index of the start of the multiply-connected feature.
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.
const indexedOctree< treeDataPoint > & pointTree() const
Demand driven construction of octree for feature points.
Istream & operator>>(Istream &, directionInfo &)
const indexedOctree< treeDataEdge > & edgeTree() const
Demand driven construction of octree for boundary edges.
pointStatus getPointStatus(label ptI) const
Return the pointStatus of a specified point.
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.
vector edgeDirection(label edgeI, label ptI) const
Return the direction of edgeI, pointing away from ptI.
pointStatus classifyFeaturePoint(label ptI) const
Classify the type of feature point. Requires valid stored member.
static scalar cosNormalAngleTol_
Angular closeness tolerance for treating normals as the same.
const PtrList< indexedOctree< treeDataEdge > > & edgeTreesByType() const
Demand driven construction of octree for boundary edges by type.
const labelList & regionEdges() const
Return the feature edges which are on the boundary between.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void nearestFeaturePoint(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
Points connected by edges.
label openStart() const
Return the index of the start of the open feature edges.
virtual void writeStats(Ostream &os) const
Dump some information.
word name(const complex &)
Return a string representation of a complex.
const List< sideVolumeType > & normalVolumeTypes() const
Return.
label internalStart() const
Return the index of the start of the internal feature edges.
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?
edgeStatus getEdgeStatus(label edgeI) const
Return the edgeStatus of a specified edge.
Xfer< extendedEdgeMesh > xfer()
Transfer contents to the Xfer container.
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...
label flatStart() const
Return the index of the start of the flat feature edges.
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
const labelListList & normalDirections() const
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)
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
labelListList featurePointEdges_
Indices of feature edges attached to feature points. The edges are.
static label nPointTypes
Number of possible point types (i.e. number of slices)
static wordHashSet writeTypes()
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
label mixedStart() const
Return the index of the start of the mixed type feature points.
labelListList featurePointNormals_
Indices of the normals that are adjacent to the feature points.
const vectorField & edgeDirections() const
Return the edgeDirection vectors.
labelListList edgeNormals_
Indices of the normals that are adjacent to the feature edges.
label nonFeatureStart_
Index of the start of the non-feature points.
vectorField edgeDirections_
Flat and open edges require the direction of the edge.
autoPtr< indexedOctree< treeDataPoint > > pointTree_
Search tree for all feature points.
void nearestFeatureEdge(const point &sample, scalar searchDistSqr, pointIndexHit &info) const
Find nearest surface edge for the sample point.
Holds feature edges/points of surface.