Go to the documentation of this file.
42 #include "geometricSurfacePatchList.H"
43 #include "surfacePatchList.H"
117 const scalar tol = SMALL,
118 const bool verbose =
false
185 const label defaultRegion = 0
192 const label defaultRegion = 0
340 void cleanup(
const bool verbose =
false);
349 const label currentZone,
389 void write(
const fileName&,
const bool sortByRegion =
false)
const;
void writeGTS(const bool writeSorted, Ostream &) const
Write to Ostream in GTS (Gnu Tri Surface library)
vectorField pointField
pointField is a vectorField.
static List< labelledTri > convertToTri(const faceList &, const label defaultRegion=0)
Convert faces to labelledTri. All get same region.
ClassName("triSurface")
Runtime type information.
void subsetMeshMap(const boolList &include, labelList &pointMap, labelList &faceMap) const
'Create' sub mesh, including only faces for which
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
const Field< PointType > & points() const
Return reference to global points.
void clearOut()
Clear all data.
void writeStats(Ostream &) const
Write some statistics.
A class for handling words, derived from string.
A class for handling file names.
bool readSTLBINARY(const fileName &)
static const int STLheaderSize
The number of bytes in the STL header.
void checkTriangles(const bool verbose=false)
Check/remove duplicate/degenerate triangles.
bool read(Istream &)
Read in Foam format.
void writeOBJ(const bool writeSorted, Ostream &) const
Write to Ostream in OBJ (Lightwave) format.
void writeDX(const bool, Ostream &) const
For DX writing.
bool readOBJ(const fileName &)
void writeVTK(const bool writeSorted, Ostream &) const
Write to VTK legacy format.
A class for handling character strings derived from std::string.
void clearPatchMeshAddr()
Clear patch addressing.
const geometricSurfacePatchList & patches() const
bool readGTS(const fileName &)
bool readTRI(const fileName &)
geometricSurfacePatchList & patches()
virtual void movePoints(const pointField &)
Move points.
void writeSTLASCII(Ostream &) const
Write to Ostream in ASCII STL format.
void cleanup(const bool verbose=false)
Remove non-valid triangles.
triSurface subsetMesh(const boolList &include, labelList &pointMap, labelList &faceMap) const
Return new surface. Returns pointMap, faceMap from.
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.
Triangulated surface description with patch information.
A subset of mesh faces organised as a primitive patch.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool readSTLASCII(const fileName &)
labelList * edgeOwnerPtr_
Label of face that 'owns' edge (i.e. e.vec() is righthanded walk.
void writeAC(Ostream &) const
Write to Ostream in AC3D format. Always sorted by patch.
void markZone(const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
Fill faceZone with currentZone for every face reachable.
void operator=(const triSurface &)
triSurface()
Construct null.
pointField & storedPoints()
Non-const access to global points.
void writeDXGeometry(const bool, Ostream &) const
void calcSortedEdgeFaces() const
Calculate sorted edgeFaces.
bool readNAS(const fileName &)
List< Face > & storedFaces()
Non-const access to the faces.
PrimitivePatch< labelledTri, Foam::List, pointField, point > ParentType
void calcEdgeOwner() const
Calculate owner.
void clearTopology()
Clear topology.
bool readOFF(const fileName &)
void writeDXTrailer(Ostream &) const
bool readAC(const fileName &)
const labelList & edgeOwner() const
If 2 face neighbours: label of face where ordering of edge.
surfacePatchList calcPatches(labelList &faceMap) const
Sort faces according to region. Returns patch list.
void setDefaultPatches()
Sets default values for patches.
label markZones(const boolList &borderEdge, labelList &faceZone) const
(size and) fills faceZone with zone of face. Zone is area
bool readSTL(const fileName &)
bool BoundaryMesh
Placeholder only, but do not remove - it is needed for GeoMesh.
void checkEdges(const bool verbose=false)
Check triply (or more) connected edges.
virtual void scalePoints(const scalar &)
Scale points. A non-positive factor is ignored.
geometricSurfacePatchList patches_
Patch information (face ordering nFaces/startFace only used.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
friend Ostream & operator<<(Ostream &, const triSurface &)
bool stitchTriangles(const pointField &rawPoints, const scalar tol=SMALL, const bool verbose=false)
Function to stitch the triangles by removing duplicate points.
labelListList * sortedEdgeFacesPtr_
Edge-face addressing (sorted)
void writeOFF(const bool writeSorted, Ostream &) const
Write to Ostream in OFF (Geomview) format.
Triangle with additional region number.
void writeSTLBINARY(std::ostream &) const
Write to std::ostream in BINARY STL format.
const labelListList & sortedEdgeFaces() const
Return edge-face addressing sorted (for edges with more than.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void write(const fileName &, const word &ext, const bool sort) const
Generic write routine. Chooses writer based on extension.
void writeTRI(const bool writeSorted, Ostream &) const
Write to Ostream in TRI (AC3D) format.
static string getLineNoComment(IFstream &)
Read non-comment line.
static fileName triSurfInstance(const Time &)
Name of triSurface directory to use.
static void printTriangle(Ostream &, const Foam::string &pre, const labelledTri &, const pointField &)
Helper function to print triangle info.
void writeSMESH(const bool writeSorted, Ostream &) const
Write to Ostream in SMESH (tetgen) format.
A list of faces which address into the list of points.