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