Go to the documentation of this file.
61 template<
class Face>
class MeshedSurface;
64 Ostream&
operator<<(Ostream&,
const triSurface&);
73 public PrimitivePatch<labelledTri, ::Foam::List, pointField, point>
113 void calcSortedEdgeFaces()
const;
116 void calcEdgeOwner()
const;
124 void setDefaultPatches();
130 const scalar tol = SMALL,
131 const bool verbose =
false
138 bool readSTL(
const fileName& filename,
bool forceBinary=
false);
145 const bool check =
true
150 void writeSTLASCII(
const fileName& filename,
const bool sort)
const;
153 void writeSTLBINARY(
const fileName& filename)
const;
156 void writeGTS(
const fileName& filename,
const bool sort)
const;
174 const label defaultRegion = 0
181 const label defaultRegion = 0
185 static void printTriangle
296 const scalar scaleFactor = -1
391 virtual void scalePoints(
const scalar scaleFactor);
400 void cleanup(
const bool verbose);
409 const label currentZone,
470 void write(
const fileName&,
const bool sortByRegion =
false)
const;
473 void write(
const Time& d)
const;
void writeStats(Ostream &os) const
Write some statistics.
vectorField pointField
pointField is a vectorField.
ClassName("triSurface")
Runtime type information.
void subsetMeshMap(const boolList &include, labelList &pointMap, labelList &faceMap) const
'Create' sub mesh
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< point > & points() const
Return reference to global points.
A class for handling words, derived from Foam::string.
A class for handling file names.
const vectorField & Sf() const
Face area vectors (normals)
void markZone(const boolList &borderEdge, const label facei, const label currentZone, labelList &faceZone) const
Fill faceZone with currentZone for every face reachable.
static const wordHashSet & writeTypes()
Known writable file-types.
void triFaceFaces(List< face > &plainFaceList) const
Create a list of faces from the triFaces.
Istream & operator>>(Istream &, directionInfo &)
void clearPatchMeshAddr()
const geometricSurfacePatchList & patches() const
virtual ~triSurface()
Destructor.
friend Istream & operator>>(Istream &, triSurface &)
geometricSurfacePatchList & patches()
const Field< point > & faceAreas() const
Return face area vectors for patch.
const vectorField & Cf() const
Face centres.
void swapFaces(List< labelledTri > &faceLst)
Swap the list of faces being addressed.
virtual void scalePoints(const scalar scaleFactor)
Scale points. A non-positive factor is ignored.
void checkTriangles(const bool verbose)
Check/remove duplicate/degenerate triangles.
triSurface subsetMesh(const boolList &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual void movePoints(const pointField &pts)
Move points.
Triangulated surface description with patch information.
virtual void swapPoints(pointField &pts)
Swap points. Similar to movePoints, but returns the old points.
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)....
word name(const complex &c)
Return string representation of complex.
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format?
void transfer(triSurface &surf)
Alter contents by transferring (triangles, points) components.
triSurface()
Construct null.
pointField & storedPoints()
Non-const access to global points.
List< surfZone > sortedZones(labelList &faceMap) const
Sort faces according to zoneIds.
List< Face > & storedFaces()
Non-const access to the faces.
const labelList & edgeOwner() const
If 2 face neighbours: label of face where ordering of edge.
void cleanup(const bool verbose)
Remove non-valid triangles.
const List< labelledTri > & surfFaces() const
Return const access to the faces.
label markZones(const boolList &borderEdge, labelList &faceZone) const
(size and) fills faceZone with zone of face. Zone is area
const scalarField & magSf() const
Face area magnitudes.
void swap(triSurface &surf)
bool BoundaryMesh
Placeholder only, but do not remove - it is needed for GeoMesh.
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 &)
const Field< point > & faceCentres() const
Return face centres for patch.
Triangle with additional region number.
const Field< scalar > & magFaceAreas() const
Return face area magnitudes for patch.
static bool canReadType(const word &ext, const bool verbose=false)
Can we read this file format?
static bool canRead(const fileName &name, const bool verbose=false)
Can we read this file format?
static const wordHashSet & readTypes()
Known readable file-types.
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 operator=(const triSurface &surf)
Copy assignment.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Ostream & operator<<(Ostream &, const boundaryPatch &)
static fileName triSurfInstance(const Time &)
Name of triSurface directory to use.
A list of faces which address into the list of points.
void checkEdges(const bool verbose)
Check triply (or more) connected edges.