Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
triSurface Class Reference

Triangulated surface description with patch information. More...

Inheritance diagram for triSurface:
Inheritance graph
[legend]
Collaboration diagram for triSurface:
Collaboration graph
[legend]

Public Types

typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh. More...
 
typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh. More...
 
- Public Types inherited from PrimitivePatch< labelledTri, List, pointField, point >
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
 
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
 
typedef labelledTri FaceType
 
typedef labelledTri FaceType
 
typedef List< labelledTriFaceListType
 
typedef List< labelledTriFaceListType
 
typedef pointField PointFieldType
 
typedef pointField PointFieldType
 
- Public Types inherited from List< labelledTri >
typedef SubList< TsubList
 Declare type of subList. More...
 

Public Member Functions

 ClassName ("triSurface")
 Runtime type information. More...
 
 triSurface ()
 Construct null. More...
 
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points. More...
 
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage. More...
 
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default. More...
 
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default. More...
 
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type) More...
 
 triSurface (Istream &)
 Construct from Istream. More...
 
 triSurface (const Time &d)
 Construct from objectRegistry. More...
 
 triSurface (const triSurface &)
 Construct as copy. More...
 
 ~triSurface ()
 
void clearOut ()
 Clear all data. More...
 
void clearTopology ()
 Clear topology. More...
 
void clearPatchMeshAddr ()
 Clear patch addressing. More...
 
const geometricSurfacePatchListpatches () const
 
geometricSurfacePatchListpatches ()
 
const labelListListsortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than. More...
 
const labelListedgeOwner () const
 If 2 face neighbours: label of face where ordering of edge. More...
 
virtual void movePoints (const pointField &)
 Move points. More...
 
virtual void scalePoints (const scalar &)
 Scale points. A non-positive factor is ignored. More...
 
void checkTriangles (const bool verbose=false)
 Check/remove duplicate/degenerate triangles. More...
 
void checkEdges (const bool verbose=false)
 Check triply (or more) connected edges. More...
 
void cleanup (const bool verbose=false)
 Remove non-valid triangles. More...
 
void markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable. More...
 
label markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area More...
 
void subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which More...
 
triSurface subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from. More...
 
void write (Ostream &) const
 Write to Ostream in simple FOAM format. More...
 
void write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension. More...
 
void write (const Time &) const
 Write to database. More...
 
void writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format. More...
 
void writeDX (const vectorField &, Ostream &) const
 
void writeStats (Ostream &) const
 Write some statistics. More...
 
void operator= (const triSurface &)
 
 ClassName ("triSurface")
 Runtime type information. More...
 
 triSurface ()
 Construct null. More...
 
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points. More...
 
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage. More...
 
 triSurface (const Xfer< List< labelledTri > > &, const geometricSurfacePatchList &, const Xfer< List< point > > &)
 Construct from triangles, patches, points. More...
 
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default. More...
 
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default. More...
 
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type) More...
 
 triSurface (Istream &)
 Construct from Istream. More...
 
 triSurface (const Time &d)
 Construct from objectRegistry. More...
 
 triSurface (const triSurface &)
 Construct as copy. More...
 
 ~triSurface ()
 Destructor. More...
 
void clearOut ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
const geometricSurfacePatchListpatches () const
 
geometricSurfacePatchListpatches ()
 
const labelListListsortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than. More...
 
const labelListedgeOwner () const
 If 2 face neighbours: label of face where ordering of edge. More...
 
virtual void movePoints (const pointField &)
 Move points. More...
 
virtual void scalePoints (const scalar)
 Scale points. A non-positive factor is ignored. More...
 
void checkTriangles (const bool verbose)
 Check/remove duplicate/degenerate triangles. More...
 
void checkEdges (const bool verbose)
 Check triply (or more) connected edges. More...
 
void cleanup (const bool verbose)
 Remove non-valid triangles. More...
 
void markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable. More...
 
label markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area More...
 
void subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which More...
 
triSurface subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from. More...
 
void write (Ostream &) const
 Write to Ostream in simple FOAM format. More...
 
void write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension. More...
 
void write (const Time &) const
 Write to database. More...
 
void writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format. More...
 
void writeDX (const vectorField &, Ostream &) const
 
void writeStats (Ostream &) const
 Write some statistics. More...
 
void operator= (const triSurface &)
 
- Public Member Functions inherited from PrimitivePatch< labelledTri, List, pointField, point >
 PrimitivePatch (const List< labelledTri > &faces, const Field< point > &points)
 Construct from components. More...
 
 PrimitivePatch (List< labelledTri > &faces, Field< point > &points, const bool reUse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Construct as copy. More...
 
 PrimitivePatch (const List< labelledTri > &faces, const Field< point > &points)
 Construct from components. More...
 
 PrimitivePatch (const Xfer< List< labelledTri > > &faces, const Xfer< List< point > > &points)
 Construct from components. More...
 
 PrimitivePatch (List< labelledTri > &faces, Field< point > &points, const bool reUse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Construct as copy. More...
 
virtual ~PrimitivePatch ()
 
virtual ~PrimitivePatch ()
 Destructor. More...
 
void clearOut ()
 
void clearOut ()
 
void clearGeom ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void clearPatchMeshAddr ()
 
const Field< point > & points () const
 Return reference to global points. More...
 
const Field< point > & points () const
 Return reference to global points. More...
 
label nPoints () const
 Return number of points supporting patch faces. More...
 
label nPoints () const
 Return number of points supporting patch faces. More...
 
label nEdges () const
 Return number of edges in patch. More...
 
label nEdges () const
 Return number of edges in patch. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
bool isInternalEdge (const label edgeI) const
 Is internal edge? More...
 
bool isInternalEdge (const label edgeI) const
 Is internal edge? More...
 
const labelListboundaryPoints () const
 Return list of boundary points,. More...
 
const labelListboundaryPoints () const
 Return list of boundary points,. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const List< labelledTri > & localFaces () const
 Return patch faces addressing into local point list. More...
 
const List< labelledTri > & localFaces () const
 Return patch faces addressing into local point list. More...
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. More...
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. They are constructed. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its. More...
 
const Field< point > & localPoints () const
 Return pointField of points in patch. More...
 
const Field< point > & localPoints () const
 Return pointField of points in patch. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point index. More...
 
label whichEdge (const edge &e) const
 Given an edge in local point labels, return its index. More...
 
label whichEdge (const edge &) const
 Given an edge in local point labels, return its. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using. More...
 
const Field< point > & faceCentres () const
 Return face centres for patch. More...
 
const Field< point > & faceCentres () const
 Return face centres for patch. More...
 
const Field< point > & faceNormals () const
 Return face normals for patch. More...
 
const Field< point > & faceNormals () const
 Return face normals for patch. More...
 
const Field< point > & pointNormals () const
 Return point normals for patch. More...
 
const Field< point > & pointNormals () const
 Return point normals for patch. More...
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
void writeVTK (const fileName &name) const
 Write VTK patch. More...
 
void writeVTKNormals (const fileName &name) const
 Write VTK patch normals. More...
 
virtual void movePoints (const Field< point > &)
 Correct patch after moving points. More...
 
virtual void movePoints (const Field< point > &)
 Correct patch after moving points. More...
 
void operator= (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Assignment. More...
 
void operator= (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Assignment. More...
 
- Public Member Functions inherited from List< labelledTri >
label size () const
 Return the number of elements in the UList. More...
 
 List ()
 Null constructor. More...
 
 List (const label)
 Construct with given size. More...
 
 List (const label, const T &)
 Construct with given size and value for all elements. More...
 
 List (const List< T > &)
 Copy constructor. More...
 
 List (const Xfer< List< T > > &)
 Construct by transferring the parameter contents. More...
 
 List (List< T > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 List (const UList< T > &, const labelUList &mapAddressing)
 Construct as subset. More...
 
 List (InputIterator first, InputIterator last)
 Construct given start and end iterators. More...
 
 List (const FixedList< T, Size > &)
 Construct as copy of FixedList<T, Size> More...
 
 List (const PtrList< T > &)
 Construct as copy of PtrList<T> More...
 
 List (const SLList< T > &)
 Construct as copy of SLList<T> More...
 
 List (const UIndirectList< T > &)
 Construct as copy of UIndirectList<T> More...
 
 List (const BiIndirectList< T > &)
 Construct as copy of BiIndirectList<T> More...
 
 List (Istream &)
 Construct from Istream. More...
 
 List (const label s)
 
 List (const label s, const T &a)
 
 List (const List< T > &a)
 
 List (const Xfer< List< T > > &lst)
 
 List (List< T > &a, bool reUse)
 
 List (const UList< T > &a, const labelUList &map)
 
 List (const PtrList< T > &lst)
 
 List (const SLList< T > &lst)
 
 List (const UIndirectList< T > &lst)
 
 List (const BiIndirectList< T > &lst)
 
 List ()
 
 List (Istream &is)
 
autoPtr< List< T > > clone () const
 Clone. More...
 
 ~List ()
 Destructor. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void resize (const label, const T &)
 Alias for setSize(const label, const T&) More...
 
void setSize (const label)
 Reset size of List. More...
 
void setSize (const label, const T &)
 Reset size of List and value for new elements. More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void append (const T &)
 Append an element at the end of the list. More...
 
void append (const UList< T > &)
 Append a List at the end of this list. More...
 
void append (const UIndirectList< T > &)
 Append a UIndirectList at the end of this list. More...
 
void transfer (List< T > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (SortableList< T > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (List< T > &a)
 
void transfer (SortableList< T > &a)
 
Xfer< List< T > > xfer ()
 Transfer contents to the Xfer container. More...
 
TnewElmt (const label)
 Return subscript-checked element of UList. More...
 
void operator= (const UList< T > &)
 Assignment from UList operator. Takes linear time. More...
 
void operator= (const List< T > &)
 Assignment operator. Takes linear time. More...
 
void operator= (const SLList< T > &)
 Assignment from SLList operator. Takes linear time. More...
 
void operator= (const UIndirectList< T > &)
 Assignment from UIndirectList operator. Takes linear time. More...
 
void operator= (const BiIndirectList< T > &)
 Assignment from BiIndirectList operator. Takes linear time. More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 

Static Public Member Functions

static fileName triSurfInstance (const Time &)
 Name of triSurface directory to use. More...
 
static fileName triSurfInstance (const Time &)
 Name of triSurface directory to use. More...
 
- Static Public Member Functions inherited from PrimitivePatch< labelledTri, List, pointField, point >
static void writeVTK (const fileName &name, const FaceListType &faces, const Field< point > &points)
 Write generic VTK patch, HJ, 14/Jan/2009. More...
 
static void writeVTKNormals (const fileName &name, const FaceListType &faces, const Field< point > &points)
 Write generic VTK patch normals, HJ, 14/Jan/2009. More...
 
- Static Public Member Functions inherited from List< labelledTri >
static const List< T > & null ()
 Return a null List. More...
 

Protected Member Functions

pointFieldstoredPoints ()
 Non-const access to global points. More...
 
List< Face > & storedFaces ()
 Non-const access to the faces. More...
 
pointFieldstoredPoints ()
 Non-const access to global points. More...
 
List< Face > & storedFaces ()
 Non-const access to the faces. More...
 
- Protected Member Functions inherited from List< labelledTri >
void size (const label)
 Override size to be inconsistent with allocated storage. More...
 

Private Types

typedef labelledTri Face
 
typedef PrimitivePatch< labelledTri, Foam::List, pointField, pointParentType
 
typedef labelledTri Face
 Typedefs for convenience. More...
 
typedef PrimitivePatch< labelledTri, ::Foam::List, pointField, pointParentType
 

Private Member Functions

void calcSortedEdgeFaces () const
 Calculate sorted edgeFaces. More...
 
void calcEdgeOwner () const
 Calculate owner. More...
 
surfacePatchList calcPatches (labelList &faceMap) const
 Sort faces according to region. Returns patch list. More...
 
void setDefaultPatches ()
 Sets default values for patches. More...
 
bool stitchTriangles (const pointField &rawPoints, const scalar tol=SMALL, const bool verbose=false)
 Function to stitch the triangles by removing duplicate points. More...
 
bool read (Istream &)
 Read in Foam format. More...
 
bool read (const fileName &, const word &ext, const bool check=true)
 Generic read routine. Chooses reader based on extension. More...
 
bool readSTL (const fileName &)
 
bool readSTLASCII (const fileName &)
 
bool readSTLBINARY (const fileName &)
 
bool readGTS (const fileName &)
 
bool readOBJ (const fileName &)
 
bool readOFF (const fileName &)
 
bool readTRI (const fileName &)
 
bool readAC (const fileName &)
 
bool readNAS (const fileName &)
 
void write (const fileName &, const word &ext, const bool sort) const
 Generic write routine. Chooses writer based on extension. More...
 
void writeSTLASCII (Ostream &) const
 Write to Ostream in ASCII STL format. More...
 
void writeSTLBINARY (std::ostream &) const
 Write to std::ostream in BINARY STL format. More...
 
void writeGTS (const bool writeSorted, Ostream &) const
 Write to Ostream in GTS (Gnu Tri Surface library) More...
 
void writeOBJ (const bool writeSorted, Ostream &) const
 Write to Ostream in OBJ (Lightwave) format. More...
 
void writeOFF (const bool writeSorted, Ostream &) const
 Write to Ostream in OFF (Geomview) format. More...
 
void writeVTK (const bool writeSorted, Ostream &) const
 Write to VTK legacy format. More...
 
void writeTRI (const bool writeSorted, Ostream &) const
 Write to Ostream in TRI (AC3D) format. More...
 
void writeSMESH (const bool writeSorted, Ostream &) const
 Write to Ostream in SMESH (tetgen) format. More...
 
void writeAC (Ostream &) const
 Write to Ostream in AC3D format. Always sorted by patch. More...
 
void writeDX (const bool, Ostream &) const
 For DX writing. More...
 
void writeDXGeometry (const bool, Ostream &) const
 
void writeDXTrailer (Ostream &) const
 
void calcSortedEdgeFaces () const
 Calculate sorted edgeFaces. More...
 
void calcEdgeOwner () const
 Calculate owner. More...
 
surfacePatchList calcPatches (labelList &faceMap) const
 Sort faces according to region. Returns patch list. More...
 
void setDefaultPatches ()
 Sets default values for patches. More...
 
bool stitchTriangles (const scalar tol=SMALL, const bool verbose=false)
 Function to stitch the triangles by removing duplicate points. More...
 
bool read (Istream &)
 Read in Foam format. More...
 
bool read (const fileName &, const word &ext, const bool check=true)
 Generic read routine. Chooses reader based on extension. More...
 
bool readSTL (const fileName &)
 
bool readSTLASCII (const fileName &)
 
bool readSTLBINARY (const fileName &)
 
bool readGTS (const fileName &)
 
bool readOBJ (const fileName &)
 
bool readOFF (const fileName &)
 
bool readTRI (const fileName &)
 
bool readAC (const fileName &)
 
bool readNAS (const fileName &)
 
bool readVTK (const fileName &)
 
void write (const fileName &, const word &ext, const bool sort) const
 Generic write routine. Chooses writer based on extension. More...
 
void writeSTLASCII (const bool writeSorted, Ostream &) const
 Write to Ostream in ASCII STL format. More...
 
void writeSTLBINARY (std::ostream &) const
 Write to std::ostream in BINARY STL format. More...
 
void writeGTS (const bool writeSorted, Ostream &) const
 Write to Ostream in GTS (Gnu Tri Surface library) More...
 
void writeOBJ (const bool writeSorted, Ostream &) const
 Write to Ostream in OBJ (Lightwave) format. More...
 
void writeOFF (const bool writeSorted, Ostream &) const
 Write to Ostream in OFF (Geomview) format. More...
 
void writeVTK (const bool writeSorted, Ostream &) const
 Write to VTK legacy format. More...
 
void writeTRI (const bool writeSorted, Ostream &) const
 Write to Ostream in TRI (AC3D) format. More...
 
void writeSMESH (const bool writeSorted, Ostream &) const
 Write to Ostream in SMESH (tetgen) format. More...
 
void writeAC (Ostream &) const
 Write to Ostream in AC3D format. Always sorted by patch. More...
 
void writeDX (const bool, Ostream &) const
 For DX writing. More...
 
void writeDXGeometry (const bool, Ostream &) const
 
void writeDXTrailer (Ostream &) const
 

Static Private Member Functions

static List< labelledTriconvertToTri (const faceList &, const label defaultRegion=0)
 Convert faces to labelledTri. All get same region. More...
 
static List< labelledTriconvertToTri (const triFaceList &, const label defaultRegion=0)
 Convert triFaces to labelledTri. All get same region. More...
 
static void printTriangle (Ostream &, const Foam::string &pre, const labelledTri &, const pointField &)
 Helper function to print triangle info. More...
 
static string getLineNoComment (IFstream &)
 Read non-comment line. More...
 
static List< labelledTriconvertToTri (const faceList &, const label defaultRegion=0)
 Convert faces to labelledTri. All get same region. More...
 
static List< labelledTriconvertToTri (const triFaceList &, const label defaultRegion=0)
 Convert triFaces to labelledTri. All get same region. More...
 
static void printTriangle (Ostream &, const Foam::string &pre, const labelledTri &, const pointField &)
 Helper function to print triangle info. More...
 
static string getLineNoComment (IFstream &)
 Read non-comment line. More...
 

Private Attributes

geometricSurfacePatchList patches_
 Patch information (face ordering nFaces/startFace only used. More...
 
labelListListsortedEdgeFacesPtr_
 Edge-face addressing (sorted) More...
 
labelListedgeOwnerPtr_
 Label of face that 'owns' edge (i.e. e.vec() is righthanded walk. More...
 

Static Private Attributes

static const int STLheaderSize = 80
 The number of bytes in the STL header. More...
 

Friends

Ostreamoperator<< (Ostream &, const triSurface &)
 
Ostreamoperator<< (Ostream &, const triSurface &)
 

Detailed Description

Triangulated surface description with patch information.

Source files

Source files

Definition at line 57 of file triSurface.H.

Member Typedef Documentation

◆ Face [1/2]

typedef labelledTri Face
private

Definition at line 64 of file triSurface.H.

◆ ParentType [1/2]

Definition at line 73 of file triSurface.H.

◆ BoundaryMesh [1/2]

typedef bool BoundaryMesh

Placeholder only, but do not remove - it is needed for GeoMesh.

Definition at line 229 of file triSurface.H.

◆ Face [2/2]

typedef labelledTri Face
private

Typedefs for convenience.

Definition at line 64 of file triSurface.H.

◆ ParentType [2/2]

Definition at line 72 of file triSurface.H.

◆ BoundaryMesh [2/2]

typedef bool BoundaryMesh

Placeholder only, but do not remove - it is needed for GeoMesh.

Definition at line 229 of file triSurface.H.

Constructor & Destructor Documentation

◆ triSurface() [1/19]

Construct null.

Definition at line 608 of file triSurface.C.

Referenced by triSurface::readAC(), triSurface::readNAS(), triSurface::readOBJ(), and triSurface::readOFF().

Here is the caller graph for this function:

◆ triSurface() [2/19]

triSurface ( const List< labelledTri > &  triangles,
const geometricSurfacePatchList patches,
const pointField points 
)

Construct from triangles, patches, points.

Definition at line 619 of file triSurface.C.

◆ triSurface() [3/19]

triSurface ( List< labelledTri > &  triangles,
const geometricSurfacePatchList patches,
pointField points,
const bool  reUse 
)

Construct from triangles, patches, points. Reuse storage.

Definition at line 633 of file triSurface.C.

◆ triSurface() [4/19]

triSurface ( const List< labelledTri > &  triangles,
const pointField points 
)

Construct from triangles, points. Set patchnames to default.

Definition at line 648 of file triSurface.C.

◆ triSurface() [5/19]

triSurface ( const triFaceList triangles,
const pointField points 
)

Construct from triangles, points. Set region to 0 and default.

patchName.

Definition at line 663 of file triSurface.C.

◆ triSurface() [6/19]

triSurface ( const fileName name)

Construct from file name (uses extension to determine type)

Definition at line 677 of file triSurface.C.

References Foam::name(), triSurface::read(), and triSurface::setDefaultPatches().

Here is the call graph for this function:

◆ triSurface() [7/19]

triSurface ( Istream is)

Construct from Istream.

Definition at line 692 of file triSurface.C.

References triSurface::read(), and triSurface::setDefaultPatches().

Here is the call graph for this function:

◆ triSurface() [8/19]

triSurface ( const Time d)

Construct from objectRegistry.

Definition at line 705 of file triSurface.C.

References Time::caseName(), Time::path(), triSurface::read(), triSurface::setDefaultPatches(), and triSurface::triSurfInstance().

Here is the call graph for this function:

◆ triSurface() [9/19]

triSurface ( const triSurface ts)

Construct as copy.

Definition at line 724 of file triSurface.C.

◆ ~triSurface() [1/2]

~triSurface ( )

Definition at line 735 of file triSurface.C.

◆ triSurface() [10/19]

Construct null.

◆ triSurface() [11/19]

triSurface ( const List< labelledTri > &  ,
const geometricSurfacePatchList ,
const pointField  
)

Construct from triangles, patches, points.

◆ triSurface() [12/19]

triSurface ( List< labelledTri > &  ,
const geometricSurfacePatchList ,
pointField ,
const bool  reUse 
)

Construct from triangles, patches, points. Reuse storage.

◆ triSurface() [13/19]

triSurface ( const Xfer< List< labelledTri > > &  triangles,
const geometricSurfacePatchList patches,
const Xfer< List< point > > &  points 
)

Construct from triangles, patches, points.

Definition at line 634 of file triSurface.C.

◆ triSurface() [14/19]

triSurface ( const List< labelledTri > &  ,
const pointField  
)

Construct from triangles, points. Set patchnames to default.

◆ triSurface() [15/19]

triSurface ( const triFaceList ,
const pointField  
)

Construct from triangles, points. Set region to 0 and default.

patchName.

◆ triSurface() [16/19]

triSurface ( const fileName )

Construct from file name (uses extension to determine type)

◆ triSurface() [17/19]

Construct from Istream.

◆ triSurface() [18/19]

triSurface ( const Time d)

Construct from objectRegistry.

◆ triSurface() [19/19]

triSurface ( const triSurface )

Construct as copy.

◆ ~triSurface() [2/2]

~triSurface ( )

Destructor.

Member Function Documentation

◆ calcSortedEdgeFaces() [1/2]

void calcSortedEdgeFaces ( ) const
private

◆ calcEdgeOwner() [1/2]

void calcEdgeOwner ( ) const
private

◆ calcPatches() [1/2]

Foam::surfacePatchList calcPatches ( labelList faceMap) const
private

◆ setDefaultPatches() [1/2]

void setDefaultPatches ( )
private

Sets default values for patches.

Definition at line 587 of file triSurface.C.

References Foam::faceMap(), forAll, and List::size().

Referenced by triSurface::readGTS(), and triSurface::triSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stitchTriangles() [1/2]

bool stitchTriangles ( const pointField rawPoints,
const scalar  tol = SMALL,
const bool  verbose = false 
)
private

Function to stitch the triangles by removing duplicate points.

Returns true if any points merged

Definition at line 38 of file stitchTriangles.C.

References Foam::endl(), forAll, Foam::mergePoints(), nPoints, triFace::points(), Foam::Pout, PackedBoolList::set(), List::setSize(), and setSize().

Referenced by triSurface::readAC(), triSurface::readSTLBINARY(), and triSurface::readTRI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read() [1/4]

bool read ( Istream is)
private

Read in Foam format.

Definition at line 349 of file triSurface.C.

Referenced by triSurface::triSurface().

Here is the caller graph for this function:

◆ read() [2/4]

bool read ( const fileName name,
const word ext,
const bool  check = true 
)
private

Generic read routine. Chooses reader based on extension.

Definition at line 359 of file triSurface.C.

References Foam::exists(), Foam::exit(), fileName::ext(), Foam::FatalError, FatalErrorIn, Foam::name(), and Foam::read().

Here is the call graph for this function:

◆ readSTL() [1/2]

bool readSTL ( const fileName STLfileName)
private

Definition at line 36 of file readSTL.C.

References IOstream::good(), token::isWord(), triSurface::readSTLASCII(), triSurface::readSTLBINARY(), and token::wordToken().

Here is the call graph for this function:

◆ readSTLASCII() [1/2]

bool readSTLASCII ( const fileName )
private

Referenced by triSurface::readSTL().

Here is the caller graph for this function:

◆ readSTLBINARY() [1/2]

bool readSTLBINARY ( const fileName STLfileName)
private

◆ readGTS() [1/2]

bool readGTS ( const fileName GTSfileName)
private

◆ readOBJ() [1/2]

bool readOBJ ( const fileName OBJfileName)
private

◆ readOFF() [1/2]

bool readOFF ( const fileName OFFfileName)
private

◆ readTRI() [1/2]

bool readTRI ( const fileName TRIfileName)
private

◆ readAC() [1/2]

bool readAC ( const fileName ACfileName)
private

◆ readNAS() [1/2]

bool readNAS ( const fileName fName)
private

◆ write() [1/8]

void write ( const fileName name,
const word ext,
const bool  sort 
) const
private

Generic write routine. Chooses writer based on extension.

Definition at line 433 of file triSurface.C.

References Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::name(), Foam::sort(), write(), writeOBJ(), and Foam::writeVTK().

Referenced by booleanSurface::booleanSurface(), isoSurface::isoSurface(), triSurfaceMesh::writeObject(), distributedTriSurfaceMesh::writeObject(), triSurf::writeSurface(), and boundaryMesh::writeTriSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeSTLASCII() [1/2]

void writeSTLASCII ( Ostream os) const
private

◆ writeSTLBINARY() [1/2]

void writeSTLBINARY ( std::ostream &  os) const
private

◆ writeGTS() [1/2]

void writeGTS ( const bool  writeSorted,
Ostream os 
) const
private

◆ writeOBJ() [1/2]

void writeOBJ ( const bool  writeSorted,
Ostream os 
) const
private

Write to Ostream in OBJ (Lightwave) format.

writeSorted=true: sort faces acc. to region and write as single group. =false: write in normal order.

Definition at line 40 of file writeOBJ.C.

References triSurface::calcPatches(), Foam::endl(), Foam::faceMap(), forAll, PrimitivePatch< labelledTri, List, pointField, point >::points(), List::size(), and List< labelledTri >::size().

Here is the call graph for this function:

◆ writeOFF() [1/2]

void writeOFF ( const bool  writeSorted,
Ostream os 
) const
private

Write to Ostream in OFF (Geomview) format.

writeSorted=true: sort faces acc. to region and write as single group. =false: write in normal order.

Definition at line 35 of file writeOFF.C.

References triSurface::calcPatches(), Foam::endl(), Foam::faceMap(), forAll, PrimitivePatch< labelledTri, List, pointField, point >::nEdges(), PrimitivePatch< labelledTri, List, pointField, point >::points(), List::size(), and List< labelledTri >::size().

Here is the call graph for this function:

◆ writeVTK() [1/2]

void writeVTK ( const bool  writeSorted,
Ostream os 
) const
private

Write to VTK legacy format.

Definition at line 35 of file writeVTK.C.

References triSurface::calcPatches(), Foam::faceMap(), forAll, Foam::nl, PrimitivePatch< labelledTri, List, pointField, point >::points(), List::size(), and List< labelledTri >::size().

Here is the call graph for this function:

◆ writeTRI() [1/2]

void writeTRI ( const bool  writeSorted,
Ostream os 
) const
private

Write to Ostream in TRI (AC3D) format.

Ac3d .tri format (unmerged triangle format)

Definition at line 36 of file writeTRI.C.

References triSurface::calcPatches(), Foam::dec(), Foam::endl(), Foam::faceMap(), forAll, Foam::hex(), PrimitivePatch< labelledTri, List, pointField, point >::points(), List::size(), token::SPACE, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ writeSMESH() [1/2]

void writeSMESH ( const bool  writeSorted,
Ostream os 
) const
private

Write to Ostream in SMESH (tetgen) format.

Definition at line 35 of file writeSMESH.C.

References triSurface::calcPatches(), Foam::endl(), Foam::faceMap(), forAll, PrimitivePatch< labelledTri, List, pointField, point >::points(), List::size(), and List< labelledTri >::size().

Here is the call graph for this function:

◆ writeAC() [1/2]

void writeAC ( Ostream os) const
private

◆ writeDX() [1/6]

void writeDX ( const bool  writeSorted,
Ostream os 
) const
private

For DX writing.

Definition at line 125 of file writeDX.C.

References triSurface::calcPatches(), Foam::endl(), Foam::faceMap(), forAll, List< labelledTri >::size(), triSurface::writeDXGeometry(), and triSurface::writeDXTrailer().

Here is the call graph for this function:

◆ writeDXGeometry() [1/2]

void writeDXGeometry ( const bool  writeSorted,
Ostream os 
) const
private

Definition at line 41 of file writeDX.C.

References Foam::endl(), f(), Foam::faceMap(), forAll, nPoints, List::size(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Referenced by triSurface::writeDX().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeDXTrailer() [1/2]

void writeDXTrailer ( Ostream os) const
private

Definition at line 112 of file writeDX.C.

References Foam::endl().

Referenced by triSurface::writeDX().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ convertToTri() [1/4]

Foam::List< Foam::labelledTri > convertToTri ( const faceList faces,
const label  defaultRegion = 0 
)
staticprivate

Convert faces to labelledTri. All get same region.

Definition at line 95 of file triSurface.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorIn, forAll, labelledTri::region(), and List::size().

Here is the call graph for this function:

◆ convertToTri() [2/4]

Foam::List< Foam::labelledTri > convertToTri ( const triFaceList faces,
const label  defaultRegion = 0 
)
staticprivate

Convert triFaces to labelledTri. All get same region.

Definition at line 130 of file triSurface.C.

References f(), forAll, labelledTri::region(), and List::size().

Here is the call graph for this function:

◆ printTriangle() [1/2]

void printTriangle ( Ostream os,
const Foam::string pre,
const labelledTri f,
const pointField points 
)
staticprivate

Helper function to print triangle info.

Definition at line 156 of file triSurface.C.

References Foam::endl(), f(), and points.

Here is the call graph for this function:

◆ getLineNoComment() [1/2]

Foam::string getLineNoComment ( IFstream is)
staticprivate

Read non-comment line.

Definition at line 172 of file triSurface.C.

References ISstream::getLine(), and IOstream::good().

Referenced by triSurface::readGTS(), triSurface::readOBJ(), triSurface::readOFF(), and triSurface::readTRI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storedPoints() [1/2]

pointField& storedPoints ( )
inlineprotected

Non-const access to global points.

Definition at line 212 of file triSurface.H.

References PrimitivePatch< Face, FaceList, PointField, PointType >::points().

Here is the call graph for this function:

◆ storedFaces() [1/2]

List<Face>& storedFaces ( )
inlineprotected

Non-const access to the faces.

Definition at line 218 of file triSurface.H.

◆ ClassName() [1/2]

ClassName ( "triSurface"  )

Runtime type information.

◆ triSurfInstance() [1/2]

Foam::fileName triSurfInstance ( const Time d)
static

Name of triSurface directory to use.

Definition at line 43 of file triSurface.C.

References Time::caseName(), TimePaths::constant(), Foam::endl(), Foam::isFile(), Time::path(), Foam::Pout, List::size(), TimeState::timeOutputValue(), and Time::times().

Referenced by triSurface::triSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearOut() [1/2]

void clearOut ( )

Clear all data.

Definition at line 757 of file triSurface.C.

Referenced by geometrySurface::addGeometryToScene(), and triSurfaceMesh::clearOut().

Here is the caller graph for this function:

◆ clearTopology() [1/2]

void clearTopology ( )

Clear topology.

Definition at line 743 of file triSurface.C.

References Foam::deleteDemandDrivenData().

Here is the call graph for this function:

◆ clearPatchMeshAddr() [1/2]

void clearPatchMeshAddr ( )

Clear patch addressing.

Definition at line 751 of file triSurface.C.

◆ patches() [1/4]

const geometricSurfacePatchList& patches ( ) const
inline

◆ patches() [2/4]

geometricSurfacePatchList& patches ( )
inline

Definition at line 306 of file triSurface.H.

References triSurface::patches_.

◆ sortedEdgeFaces() [1/2]

const Foam::labelListList & sortedEdgeFaces ( ) const

Return edge-face addressing sorted (for edges with more than.

2 faces) according to the angle around the edge. Orientation is anticlockwise looking from edge.vec(localPoints())

Definition at line 766 of file triSurface.C.

Referenced by triSurface::calcSortedEdgeFaces(), and booleanSurface::propagateEdgeSide().

Here is the caller graph for this function:

◆ edgeOwner() [1/2]

const Foam::labelList & edgeOwner ( ) const

If 2 face neighbours: label of face where ordering of edge.

is consistent with righthand walk. If 1 neighbour: label of only face. If >2 neighbours: undetermined.

Definition at line 777 of file triSurface.C.

Referenced by triSurface::calcEdgeOwner(), and intersectedSurface::splitFace().

Here is the caller graph for this function:

◆ movePoints() [1/2]

void movePoints ( const pointField newPoints)
virtual

Move points.

Reimplemented in triSurfaceMesh.

Definition at line 789 of file triSurface.C.

References Foam::deleteDemandDrivenData().

Referenced by triSurfaceMesh::movePoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scalePoints() [1/2]

void scalePoints ( const scalar &  scaleFactor)
virtual

Scale points. A non-positive factor is ignored.

Definition at line 803 of file triSurface.C.

Referenced by triSurfaceMesh::triSurfaceMesh().

Here is the caller graph for this function:

◆ checkTriangles() [1/2]

void checkTriangles ( const bool  verbose = false)

Check/remove duplicate/degenerate triangles.

Definition at line 186 of file triSurface.C.

References Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorIn, forAll, n, points, Foam::Warning, and WarningIn.

Here is the call graph for this function:

◆ checkEdges() [1/2]

void checkEdges ( const bool  verbose = false)

Check triply (or more) connected edges.

Definition at line 320 of file triSurface.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, List::size(), and WarningIn.

Here is the call graph for this function:

◆ cleanup() [1/2]

void cleanup ( const bool  verbose = false)

Remove non-valid triangles.

Definition at line 820 of file triSurface.C.

References points.

◆ markZone() [1/2]

void markZone ( const boolList borderEdge,
const label  faceI,
const label  currentZone,
labelList faceZone 
) const

Fill faceZone with currentZone for every face reachable.

from faceI without crossing edge marked in borderEdge. Note: faceZone has to be sized nFaces before calling this fun.

Definition at line 837 of file triSurface.C.

References Foam::abort(), List::append(), Foam::FatalError, FatalErrorIn, forAll, List::size(), and List::transfer().

Here is the call graph for this function:

◆ markZones() [1/2]

Foam::label markZones ( const boolList borderEdge,
labelList faceZone 
) const

(size and) fills faceZone with zone of face. Zone is area

reachable by edge crossing without crossing borderEdge (bool for every edge in surface). Returns number of zones.

Definition at line 906 of file triSurface.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, List::setSize(), and List::size().

Referenced by booleanSurface::booleanSurface(), isoSurface::calcSnappedCc(), isoSurfaceCell::calcSnappedPoint(), isoSurface::calcSnappedPoint(), and isoSurfaceCell::collapseSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subsetMeshMap() [1/2]

void subsetMeshMap ( const boolList include,
labelList pointMap,
labelList faceMap 
) const

'Create' sub mesh, including only faces for which

boolList entry is true Sets: pointMap: from new to old localPoints faceMap: new to old faces

Definition at line 955 of file triSurface.C.

References Foam::constant::physicoChemical::b, Foam::constant::universal::c, Foam::faceMap(), forAll, nPoints, List::setSize(), and List::size().

Here is the call graph for this function:

◆ subsetMesh() [1/2]

Foam::triSurface subsetMesh ( const boolList include,
labelList pointMap,
labelList faceMap 
) const

Return new surface. Returns pointMap, faceMap from.

subsetMeshMap

Definition at line 1013 of file triSurface.C.

References Foam::faceMap(), forAll, patches, and List::size().

Referenced by booleanSurface::booleanSurface(), and triSurface::writeAC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [2/8]

void write ( Ostream os) const

Write to Ostream in simple FOAM format.

Definition at line 1064 of file triSurface.C.

References IOstream::check(), Foam::endl(), Foam::nl, patches, and points.

Here is the call graph for this function:

◆ write() [3/8]

void write ( const fileName name,
const bool  sortByRegion = false 
) const

Generic write routine. Chooses writer based on extension.

Definition at line 1055 of file triSurface.C.

References Foam::name(), and write().

Here is the call graph for this function:

◆ write() [4/8]

void write ( const Time d) const

Write to database.

Definition at line 1077 of file triSurface.C.

References Time::caseName(), Time::path(), and write().

Here is the call graph for this function:

◆ writeDX() [2/6]

void writeDX ( const scalarField field,
Ostream os 
) const

◆ writeDX() [3/6]

void writeDX ( const vectorField field,
Ostream os 
) const

◆ writeStats() [1/2]

void writeStats ( Ostream os) const

Write some statistics.

Definition at line 1089 of file triSurface.C.

References Foam::endl(), f(), forAll, boundBox::invertedBox, boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), nPoints, points, and PackedBoolList::set().

Referenced by booleanSurface::booleanSurface(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

void operator= ( const triSurface ts)

Definition at line 1122 of file triSurface.C.

References List::operator=(), triSurface::patches(), and PrimitivePatch< Face, FaceList, PointField, PointType >::points().

Referenced by booleanSurface::booleanSurface(), distributedTriSurfaceMesh::distribute(), and intersectedSurface::intersectedSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcSortedEdgeFaces() [2/2]

void calcSortedEdgeFaces ( ) const
private

Calculate sorted edgeFaces.

◆ calcEdgeOwner() [2/2]

void calcEdgeOwner ( ) const
private

Calculate owner.

◆ calcPatches() [2/2]

surfacePatchList calcPatches ( labelList faceMap) const
private

Sort faces according to region. Returns patch list.

and sets faceMap to index of labelledTri inside *this.

◆ setDefaultPatches() [2/2]

void setDefaultPatches ( )
private

Sets default values for patches.

◆ stitchTriangles() [2/2]

bool stitchTriangles ( const scalar  tol = SMALL,
const bool  verbose = false 
)
private

Function to stitch the triangles by removing duplicate points.

Returns true if any points merged

Definition at line 33 of file stitchTriangles.C.

References Foam::endl(), f(), forAll, Foam::mergePoints(), nPoints, triFace::points(), Foam::Pout, PackedBoolList::set(), List::setSize(), and setSize().

Here is the call graph for this function:

◆ read() [3/4]

bool read ( Istream )
private

Read in Foam format.

◆ read() [4/4]

bool read ( const fileName ,
const word ext,
const bool  check = true 
)
private

Generic read routine. Chooses reader based on extension.

◆ readSTL() [2/2]

bool readSTL ( const fileName )
private

◆ readSTLASCII() [2/2]

bool readSTLASCII ( const fileName )
private

◆ readSTLBINARY() [2/2]

bool readSTLBINARY ( const fileName )
private

◆ readGTS() [2/2]

bool readGTS ( const fileName )
private

◆ readOBJ() [2/2]

bool readOBJ ( const fileName )
private

◆ readOFF() [2/2]

bool readOFF ( const fileName )
private

◆ readTRI() [2/2]

bool readTRI ( const fileName )
private

◆ readAC() [2/2]

bool readAC ( const fileName )
private

◆ readNAS() [2/2]

bool readNAS ( const fileName )
private

◆ readVTK()

bool readVTK ( const fileName fName)
private

◆ write() [5/8]

void write ( const fileName ,
const word ext,
const bool  sort 
) const
private

Generic write routine. Chooses writer based on extension.

◆ writeSTLASCII() [2/2]

void writeSTLASCII ( const bool  writeSorted,
Ostream os 
) const
private

◆ writeSTLBINARY() [2/2]

void writeSTLBINARY ( std::ostream &  ) const
private

Write to std::ostream in BINARY STL format.

◆ writeGTS() [2/2]

void writeGTS ( const bool  writeSorted,
Ostream  
) const
private

Write to Ostream in GTS (Gnu Tri Surface library)

format.

◆ writeOBJ() [2/2]

void writeOBJ ( const bool  writeSorted,
Ostream  
) const
private

Write to Ostream in OBJ (Lightwave) format.

writeSorted=true: sort faces acc. to region and write as single group. =false: write in normal order.

◆ writeOFF() [2/2]

void writeOFF ( const bool  writeSorted,
Ostream  
) const
private

Write to Ostream in OFF (Geomview) format.

writeSorted=true: sort faces acc. to region and write as single group. =false: write in normal order.

◆ writeVTK() [2/2]

void writeVTK ( const bool  writeSorted,
Ostream  
) const
private

Write to VTK legacy format.

◆ writeTRI() [2/2]

void writeTRI ( const bool  writeSorted,
Ostream  
) const
private

Write to Ostream in TRI (AC3D) format.

Ac3d .tri format (unmerged triangle format)

◆ writeSMESH() [2/2]

void writeSMESH ( const bool  writeSorted,
Ostream  
) const
private

Write to Ostream in SMESH (tetgen) format.

◆ writeAC() [2/2]

void writeAC ( Ostream ) const
private

Write to Ostream in AC3D format. Always sorted by patch.

◆ writeDX() [4/6]

void writeDX ( const bool  ,
Ostream  
) const
private

For DX writing.

◆ writeDXGeometry() [2/2]

void writeDXGeometry ( const bool  ,
Ostream  
) const
private

◆ writeDXTrailer() [2/2]

void writeDXTrailer ( Ostream ) const
private

◆ convertToTri() [3/4]

static List<labelledTri> convertToTri ( const faceList ,
const label  defaultRegion = 0 
)
staticprivate

Convert faces to labelledTri. All get same region.

◆ convertToTri() [4/4]

static List<labelledTri> convertToTri ( const triFaceList ,
const label  defaultRegion = 0 
)
staticprivate

Convert triFaces to labelledTri. All get same region.

◆ printTriangle() [2/2]

static void printTriangle ( Ostream ,
const Foam::string pre,
const labelledTri ,
const pointField  
)
staticprivate

Helper function to print triangle info.

◆ getLineNoComment() [2/2]

static string getLineNoComment ( IFstream )
staticprivate

Read non-comment line.

◆ storedPoints() [2/2]

pointField& storedPoints ( )
inlineprotected

Non-const access to global points.

Definition at line 212 of file triSurface.H.

References PrimitivePatch< Face, FaceList, PointField, PointType >::points().

Here is the call graph for this function:

◆ storedFaces() [2/2]

List<Face>& storedFaces ( )
inlineprotected

Non-const access to the faces.

Definition at line 218 of file triSurface.H.

◆ ClassName() [2/2]

ClassName ( "triSurface"  )

Runtime type information.

◆ triSurfInstance() [2/2]

static fileName triSurfInstance ( const Time )
static

Name of triSurface directory to use.

◆ clearOut() [2/2]

void clearOut ( )

◆ clearTopology() [2/2]

void clearTopology ( )

◆ clearPatchMeshAddr() [2/2]

void clearPatchMeshAddr ( )

◆ patches() [3/4]

const geometricSurfacePatchList& patches ( ) const
inline

Definition at line 306 of file triSurface.H.

References triSurface::patches_.

◆ patches() [4/4]

geometricSurfacePatchList& patches ( )
inline

Definition at line 311 of file triSurface.H.

References triSurface::patches_.

◆ sortedEdgeFaces() [2/2]

const labelListList& sortedEdgeFaces ( ) const

Return edge-face addressing sorted (for edges with more than.

2 faces) according to the angle around the edge. Orientation is anticlockwise looking from edge.vec(localPoints())

◆ edgeOwner() [2/2]

const labelList& edgeOwner ( ) const

If 2 face neighbours: label of face where ordering of edge.

is consistent with righthand walk. If 1 neighbour: label of only face. If >2 neighbours: undetermined.

◆ movePoints() [2/2]

virtual void movePoints ( const pointField )
virtual

Move points.

Reimplemented in triSurfaceMesh.

◆ scalePoints() [2/2]

void scalePoints ( const scalar  scaleFactor)
virtual

Scale points. A non-positive factor is ignored.

Definition at line 801 of file triSurface.C.

◆ checkTriangles() [2/2]

void checkTriangles ( const bool  verbose)

Check/remove duplicate/degenerate triangles.

◆ checkEdges() [2/2]

void checkEdges ( const bool  verbose)

Check triply (or more) connected edges.

◆ cleanup() [2/2]

void cleanup ( const bool  verbose)

Remove non-valid triangles.

◆ markZone() [2/2]

void markZone ( const boolList borderEdge,
const label  faceI,
const label  currentZone,
labelList faceZone 
) const

Fill faceZone with currentZone for every face reachable.

from faceI without crossing edge marked in borderEdge. Note: faceZone has to be sized nFaces before calling this fun.

◆ markZones() [2/2]

label markZones ( const boolList borderEdge,
labelList faceZone 
) const

(size and) fills faceZone with zone of face. Zone is area

reachable by edge crossing without crossing borderEdge (bool for every edge in surface). Returns number of zones.

◆ subsetMeshMap() [2/2]

void subsetMeshMap ( const boolList include,
labelList pointMap,
labelList faceMap 
) const

'Create' sub mesh, including only faces for which

boolList entry is true Sets: pointMap: from new to old localPoints faceMap: new to old faces

◆ subsetMesh() [2/2]

triSurface subsetMesh ( const boolList include,
labelList pointMap,
labelList faceMap 
) const

Return new surface. Returns pointMap, faceMap from.

subsetMeshMap

◆ write() [6/8]

void write ( Ostream ) const

Write to Ostream in simple FOAM format.

◆ write() [7/8]

void write ( const fileName ,
const bool  sortByRegion = false 
) const

Generic write routine. Chooses writer based on extension.

◆ write() [8/8]

void write ( const Time ) const

Write to database.

◆ writeDX() [5/6]

void writeDX ( const scalarField ,
Ostream  
) const

Write to Ostream in OpenDX format.

◆ writeDX() [6/6]

void writeDX ( const vectorField ,
Ostream  
) const

◆ writeStats() [2/2]

void writeStats ( Ostream ) const

Write some statistics.

◆ operator=() [2/2]

void operator= ( const triSurface )

Friends And Related Function Documentation

◆ operator<< [1/2]

Ostream& operator<< ( Ostream ,
const triSurface  
)
friend

◆ operator<< [2/2]

Ostream& operator<< ( Ostream ,
const triSurface  
)
friend

Field Documentation

◆ STLheaderSize

static const int STLheaderSize = 80
staticprivate

The number of bytes in the STL header.

Definition at line 79 of file triSurface.H.

Referenced by triSurface::readSTLBINARY(), and triSurface::writeSTLBINARY().

◆ patches_

geometricSurfacePatchList patches_
private

Patch information (face ordering nFaces/startFace only used.

during reading and writing)

Definition at line 83 of file triSurface.H.

Referenced by triSurface::patches(), and triSurface::readTRI().

◆ sortedEdgeFacesPtr_

labelListList * sortedEdgeFacesPtr_
mutableprivate

Edge-face addressing (sorted)

Definition at line 89 of file triSurface.H.

Referenced by triSurface::calcSortedEdgeFaces().

◆ edgeOwnerPtr_

labelList * edgeOwnerPtr_
mutableprivate

Label of face that 'owns' edge (i.e. e.vec() is righthanded walk.

along face)

Definition at line 93 of file triSurface.H.

Referenced by triSurface::calcEdgeOwner().


The documentation for this class was generated from the following files: