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