Triangulated surface description with patch information. More...
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... | |
![]() | |
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< labelledTri > | FaceListType |
typedef List< labelledTri > | FaceListType |
typedef pointField | PointFieldType |
typedef pointField | PointFieldType |
![]() | |
typedef SubList< T > | subList |
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 geometricSurfacePatchList & | patches () const |
geometricSurfacePatchList & | patches () |
const labelListList & | sortedEdgeFaces () const |
Return edge-face addressing sorted (for edges with more than. More... | |
const labelList & | edgeOwner () 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 geometricSurfacePatchList & | patches () const |
geometricSurfacePatchList & | patches () |
const labelListList & | sortedEdgeFaces () const |
Return edge-face addressing sorted (for edges with more than. More... | |
const labelList & | edgeOwner () 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 &) |
![]() | |
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 edgeList & | edges () const |
Return list of edges, address into LOCAL point list. More... | |
const edgeList & | edges () 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 labelList & | boundaryPoints () const |
Return list of boundary points,. More... | |
const labelList & | boundaryPoints () const |
Return list of boundary points,. More... | |
const labelListList & | faceFaces () const |
Return face-face addressing. More... | |
const labelListList & | faceFaces () const |
Return face-face addressing. More... | |
const labelListList & | edgeFaces () const |
Return edge-face addressing. More... | |
const labelListList & | edgeFaces () const |
Return edge-face addressing. More... | |
const labelListList & | faceEdges () const |
Return face-edge addressing. More... | |
const labelListList & | faceEdges () const |
Return face-edge addressing. More... | |
const labelListList & | pointEdges () const |
Return point-edge addressing. More... | |
const labelListList & | pointEdges () const |
Return point-edge addressing. More... | |
const labelListList & | pointFaces () const |
Return point-face addressing. More... | |
const labelListList & | pointFaces () 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 labelList & | meshPoints () const |
Return labelList of mesh points in patch. More... | |
const labelList & | meshPoints () 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 labelList & | localPointOrder () const |
Return orders the local points for most efficient search. More... | |
const labelList & | localPointOrder () 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< objectHit > | projectPoints (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< objectHit > | projectPoints (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::objectHit > | projectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const |
List< objectHit > | projectFaceCentres (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< objectHit > | projectFaceCentres (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::objectHit > | projectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const |
const labelListList & | edgeLoops () const |
Return list of closed loops of boundary vertices. More... | |
const labelListList & | edgeLoops () 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... | |
![]() | |
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... | |
T & | newElmt (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 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 const List< T > & | null () |
Return a null List. More... | |
Protected Member Functions | |
pointField & | storedPoints () |
Non-const access to global points. More... | |
List< Face > & | storedFaces () |
Non-const access to the faces. More... | |
pointField & | storedPoints () |
Non-const access to global points. More... | |
List< Face > & | storedFaces () |
Non-const access to the faces. More... | |
![]() | |
void | size (const label) |
Override size to be inconsistent with allocated storage. More... | |
Private Types | |
typedef labelledTri | Face |
typedef PrimitivePatch< labelledTri, Foam::List, pointField, point > | ParentType |
typedef labelledTri | Face |
Typedefs for convenience. More... | |
typedef PrimitivePatch< labelledTri, ::Foam::List, pointField, point > | ParentType |
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< labelledTri > | convertToTri (const faceList &, const label defaultRegion=0) |
Convert faces to labelledTri. All get same region. More... | |
static List< labelledTri > | convertToTri (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< labelledTri > | convertToTri (const faceList &, const label defaultRegion=0) |
Convert faces to labelledTri. All get same region. More... | |
static List< labelledTri > | convertToTri (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... | |
labelListList * | sortedEdgeFacesPtr_ |
Edge-face addressing (sorted) More... | |
labelList * | edgeOwnerPtr_ |
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 | |
Ostream & | operator<< (Ostream &, const triSurface &) |
Ostream & | operator<< (Ostream &, const triSurface &) |
Triangulated surface description with patch information.
Definition at line 57 of file triSurface.H.
|
private |
Definition at line 64 of file triSurface.H.
|
private |
Definition at line 73 of file triSurface.H.
typedef bool BoundaryMesh |
Placeholder only, but do not remove - it is needed for GeoMesh.
Definition at line 229 of file triSurface.H.
|
private |
Typedefs for convenience.
Definition at line 64 of file triSurface.H.
|
private |
Definition at line 72 of file triSurface.H.
typedef bool BoundaryMesh |
Placeholder only, but do not remove - it is needed for GeoMesh.
Definition at line 229 of file triSurface.H.
triSurface | ( | ) |
Construct null.
Definition at line 608 of file triSurface.C.
Referenced by triSurface::readAC(), triSurface::readNAS(), triSurface::readOBJ(), and triSurface::readOFF().
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 | ( | 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 | ( | const List< labelledTri > & | triangles, |
const pointField & | points | ||
) |
Construct from triangles, points. Set patchnames to default.
Definition at line 648 of file triSurface.C.
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 | ( | 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().
triSurface | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 692 of file triSurface.C.
References triSurface::read(), and triSurface::setDefaultPatches().
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().
triSurface | ( | const triSurface & | ts | ) |
Construct as copy.
Definition at line 724 of file triSurface.C.
~triSurface | ( | ) |
Definition at line 735 of file triSurface.C.
triSurface | ( | ) |
Construct null.
triSurface | ( | const List< labelledTri > & | , |
const geometricSurfacePatchList & | , | ||
const pointField & | |||
) |
Construct from triangles, patches, points.
triSurface | ( | List< labelledTri > & | , |
const geometricSurfacePatchList & | , | ||
pointField & | , | ||
const bool | reUse | ||
) |
Construct from triangles, patches, points. Reuse storage.
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 | ( | const List< labelledTri > & | , |
const pointField & | |||
) |
Construct from triangles, points. Set patchnames to default.
triSurface | ( | const triFaceList & | , |
const pointField & | |||
) |
Construct from triangles, points. Set region to 0 and default.
patchName.
triSurface | ( | const fileName & | ) |
Construct from file name (uses extension to determine type)
triSurface | ( | Istream & | ) |
Construct from Istream.
triSurface | ( | const Time & | d | ) |
Construct from objectRegistry.
triSurface | ( | const triSurface & | ) |
Construct as copy.
~triSurface | ( | ) |
Destructor.
|
private |
Calculate sorted edgeFaces.
Definition at line 42 of file triSurfaceAddressing.C.
References Foam::abort(), Foam::e, PrimitivePatch< labelledTri, List, pointField, point >::edgeFaces(), PrimitivePatch< labelledTri, List, pointField, point >::edges(), f(), Foam::FatalError, FatalErrorIn, Foam::findIndex(), forAll, SortableList::indices(), PrimitivePatch< labelledTri, List, pointField, point >::localFaces(), PrimitivePatch< labelledTri, List, pointField, point >::localPoints(), Foam::mag(), Foam::pseudoAngle(), List::size(), SortableList::sort(), triSurface::sortedEdgeFaces(), and triSurface::sortedEdgeFacesPtr_.
|
private |
Calculate owner.
Definition at line 129 of file triSurfaceAddressing.C.
References Foam::abort(), Foam::e, PrimitivePatch< labelledTri, List, pointField, point >::edgeFaces(), triSurface::edgeOwner(), triSurface::edgeOwnerPtr_, PrimitivePatch< labelledTri, List, pointField, point >::edges(), f(), Foam::FatalError, FatalErrorIn, forAll, PrimitivePatch< labelledTri, List, pointField, point >::localFaces(), PrimitivePatch< labelledTri, List, pointField, point >::nEdges(), Foam::nl, and List::size().
|
private |
Sort faces according to region. Returns patch list.
and sets faceMap to index of labelledTri inside *this.
Definition at line 501 of file triSurface.C.
References Foam::faceMap(), forAll, geometricSurfacePatch::geometricType(), geometricSurfacePatch::index(), SortableList::indices(), Foam::max(), geometricSurfacePatch::name(), Foam::name(), List::size(), surfacePatch::size(), SortableList::sort(), and surfacePatch::start().
Referenced by triSurface::writeAC(), triSurface::writeDX(), triSurface::writeGTS(), triSurface::writeOBJ(), triSurface::writeOFF(), triSurface::writeSMESH(), triSurface::writeSTLASCII(), triSurface::writeTRI(), and triSurface::writeVTK().
|
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().
|
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().
|
private |
Read in Foam format.
Definition at line 349 of file triSurface.C.
Referenced by triSurface::triSurface().
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().
|
private |
Definition at line 36 of file readSTL.C.
References IOstream::good(), token::isWord(), triSurface::readSTLASCII(), triSurface::readSTLBINARY(), and token::wordToken().
|
private |
|
private |
Definition at line 41 of file readSTLBINARY.C.
References STLtriangle::a(), STLtriangle::b(), STLtriangle::c(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::fileSize(), forAll, Foam::isFile(), STLtriangle::region(), autoPtr::reset(), List< labelledTri >::setSize(), triSurface::stitchTriangles(), and triSurface::STLheaderSize.
Referenced by triSurface::readSTL().
|
private |
Definition at line 39 of file readGTS.C.
References IOstream::bad(), edge::commonVertex(), PrimitivePatch< labelledTri, List, pointField, point >::edges(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, triSurface::getLineNoComment(), IOstream::good(), PrimitivePatch< labelledTri, List, pointField, point >::nEdges(), PrimitivePatch< labelledTri, List, pointField, point >::nPoints(), edge::otherVertex(), PrimitivePatch< labelledTri, List, pointField, point >::points(), PrimitivePatch< labelledTri, List, pointField, point >::points_, triSurface::setDefaultPatches(), List< labelledTri >::setSize(), x, and y.
|
private |
Definition at line 39 of file readOBJ.C.
References Foam::DelaunayMeshTools::allPoints(), DynamicList::append(), HashTable::begin(), Foam::exit(), Foam::FatalError, FatalErrorIn, HashTable::find(), triSurface::getLineNoComment(), IOstream::good(), Foam::constant::atomic::group, HashTable::insert(), triSurface::patches(), PrimitivePatch< labelledTri, List, pointField, point >::points(), List::setSize(), DynamicList::shrink(), triSurface::triSurface(), x, and y.
|
private |
Definition at line 40 of file readOFF.C.
References DynamicList::append(), Foam::exit(), f(), Foam::FatalError, FatalErrorIn, forAll, triSurface::getLineNoComment(), IOstream::good(), PrimitivePatch< labelledTri, List, pointField, point >::nEdges(), PrimitivePatch< labelledTri, List, pointField, point >::nPoints(), PrimitivePatch< labelledTri, List, pointField, point >::points(), DynamicList::shrink(), triSurface::triSurface(), x, and y.
|
private |
Definition at line 47 of file readTRI.C.
References LList< SLListBase, T >::append(), LList::append(), LList::begin(), LList< SLListBase, T >::begin(), LList< SLListBase, T >::end(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, HashTable::find(), forAll, triSurface::getLineNoComment(), IOstream::good(), HashTable::insert(), p, triSurface::patches_, Foam::Pout, Foam::readScalar(), List::setSize(), List< labelledTri >::setSize(), List::size(), triSurface::stitchTriangles(), and HashTable::toc().
|
private |
Definition at line 124 of file readAC.C.
References Foam::DelaunayMeshTools::allPoints(), DynamicList::append(), args, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, ISstream::getLine(), IOstream::good(), Foam::I, Foam::name(), nPatches, Foam::parseInt(), triSurface::patches(), PrimitivePatch< labelledTri, List, pointField, point >::points(), Foam::readCmd(), Foam::readUpto(), rot, DynamicList::shrink(), List< labelledTri >::size(), triSurface::stitchTriangles(), triSurface::triSurface(), WarningIn, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
private |
Definition at line 72 of file readNAS.C.
References Foam::DelaunayMeshTools::allPoints(), DynamicList::append(), Foam::constant::physicoChemical::b, Foam::constant::universal::c, Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorIn, forAll, forAllConstIter(), ISstream::getLine(), IOstream::good(), Foam::Info, HashSet< Key, Hash >::insert(), IOstream::lineNumber(), IFstream::name(), Foam::nl, nPatches, Foam::parseNASCoord(), triSurface::patches(), PrimitivePatch< labelledTri, List, pointField, point >::points(), Foam::readLabel(), DynamicList::shrink(), triSurface::triSurface(), x, and y.
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().
|
private |
Write to Ostream in ASCII STL format.
Each region becomes 'solid' 'endsolid' block.
Definition at line 39 of file writeSTL.C.
References triSurface::calcPatches(), Foam::endl(), f(), Foam::faceMap(), PrimitivePatch< labelledTri, List, pointField, point >::faceNormals(), forAll, n, geometricSurfacePatch::name(), PrimitivePatch< labelledTri, List, pointField, point >::points(), surfacePatch::size(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
private |
Write to std::ostream in BINARY STL format.
Definition at line 95 of file writeSTL.C.
References f(), PrimitivePatch< labelledTri, List, pointField, point >::faceNormals(), forAll, n, PrimitivePatch< labelledTri, List, pointField, point >::points(), List< labelledTri >::size(), triSurface::STLheaderSize, and STLtriangle::write().
|
private |
Write to Ostream in GTS (Gnu Tri Surface library)
format.
Definition at line 35 of file writeGTS.C.
References triSurface::calcPatches(), PrimitivePatch< labelledTri, List, pointField, point >::edges(), Foam::endl(), PrimitivePatch< labelledTri, List, pointField, point >::faceEdges(), Foam::faceMap(), forAll, PrimitivePatch< labelledTri, List, pointField, point >::meshPoints(), PrimitivePatch< labelledTri, List, pointField, point >::nEdges(), PrimitivePatch< labelledTri, List, pointField, point >::points(), List::size(), and List< labelledTri >::size().
|
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().
|
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().
|
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().
|
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().
|
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().
|
private |
Write to Ostream in AC3D format. Always sorted by patch.
Definition at line 38 of file writeAC.C.
References triSurface::calcPatches(), Foam::endl(), f(), Foam::faceMap(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), geometricSurfacePatch::name(), PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), List::size(), List< labelledTri >::size(), triSurface::subsetMesh(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
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().
|
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().
|
private |
Definition at line 112 of file writeDX.C.
References Foam::endl().
Referenced by triSurface::writeDX().
|
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().
|
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().
|
staticprivate |
Helper function to print triangle info.
Definition at line 156 of file triSurface.C.
References Foam::endl(), f(), and points.
|
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().
|
inlineprotected |
Non-const access to global points.
Definition at line 212 of file triSurface.H.
References PrimitivePatch< Face, FaceList, PointField, PointType >::points().
Non-const access to the faces.
Definition at line 218 of file triSurface.H.
ClassName | ( | "triSurface" | ) |
Runtime type information.
|
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().
void clearOut | ( | ) |
Clear all data.
Definition at line 757 of file triSurface.C.
Referenced by geometrySurface::addGeometryToScene(), and triSurfaceMesh::clearOut().
void clearTopology | ( | ) |
Clear topology.
Definition at line 743 of file triSurface.C.
References Foam::deleteDemandDrivenData().
void clearPatchMeshAddr | ( | ) |
Clear patch addressing.
Definition at line 751 of file triSurface.C.
|
inline |
Definition at line 301 of file triSurface.H.
References triSurface::patches_.
Referenced by triSurfaceTools::collapseEdges(), triSurfaceTools::doRefine(), triSurfaceTools::greenRefine(), intersectedSurface::intersectedSurface(), main(), booleanSurface::mergePatches(), triSurfaceTools::mergePoints(), triSurface::operator=(), subTriSurfaceMesh::patchNames(), triSurface::readAC(), triSurface::readNAS(), triSurface::readOBJ(), triSurf::readSurface(), and boundaryMesh::readTriSurface().
|
inline |
Definition at line 306 of file triSurface.H.
References triSurface::patches_.
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().
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().
|
virtual |
Move points.
Reimplemented in triSurfaceMesh.
Definition at line 789 of file triSurface.C.
References Foam::deleteDemandDrivenData().
Referenced by triSurfaceMesh::movePoints().
|
virtual |
Scale points. A non-positive factor is ignored.
Definition at line 803 of file triSurface.C.
Referenced by triSurfaceMesh::triSurfaceMesh().
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.
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.
void cleanup | ( | const bool | verbose = false | ) |
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().
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().
'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().
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().
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.
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().
void write | ( | const Time & | d | ) | const |
Write to database.
Definition at line 1077 of file triSurface.C.
References Time::caseName(), Time::path(), and write().
void writeDX | ( | const scalarField & | field, |
Ostream & | os | ||
) | const |
Write to Ostream in OpenDX format.
Definition at line 165 of file writeDX.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, PrimitivePatch< labelledTri, List, pointField, point >::nPoints(), List< labelledTri >::size(), triSurface::writeDXGeometry(), and triSurface::writeDXTrailer().
void writeDX | ( | const vectorField & | field, |
Ostream & | os | ||
) | const |
Definition at line 210 of file writeDX.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, PrimitivePatch< labelledTri, List, pointField, point >::nPoints(), List< labelledTri >::size(), triSurface::writeDXGeometry(), and triSurface::writeDXTrailer().
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().
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().
|
private |
Calculate sorted edgeFaces.
|
private |
Calculate owner.
|
private |
Sort faces according to region. Returns patch list.
and sets faceMap to index of labelledTri inside *this.
|
private |
Sets default values for patches.
|
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().
Generic read routine. Chooses reader based on extension.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 36 of file readVTK.C.
References f(), MeshedSurface< Face >::faces(), forAll, zone::name(), Foam::name(), word::null, patches, regionName, List::size(), MeshedSurface< Face >::surfZones(), List::xfer(), and Foam::xferCopy().
Generic write routine. Chooses writer based on extension.
|
private |
Write to Ostream in ASCII STL format.
Each region becomes 'solid' 'endsolid' block.
Definition at line 34 of file writeSTL.C.
References triSurface::calcPatches(), Foam::endl(), f(), Foam::faceMap(), PrimitivePatch< labelledTri, List, pointField, point >::faceNormals(), forAll, n, geometricSurfacePatch::name(), Foam::nl, PrimitivePatch< labelledTri, List, pointField, point >::points(), surfacePatch::size(), List< labelledTri >::size(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
private |
Write to std::ostream in BINARY STL format.
|
private |
Write to Ostream in GTS (Gnu Tri Surface library)
format.
|
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.
|
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.
|
private |
Write to VTK legacy format.
|
private |
Write to Ostream in TRI (AC3D) format.
Ac3d .tri format (unmerged triangle format)
|
private |
Write to Ostream in SMESH (tetgen) format.
|
private |
For DX writing.
|
private |
|
private |
|
staticprivate |
Convert faces to labelledTri. All get same region.
|
staticprivate |
Convert triFaces to labelledTri. All get same region.
|
staticprivate |
Helper function to print triangle info.
|
inlineprotected |
Non-const access to global points.
Definition at line 212 of file triSurface.H.
References PrimitivePatch< Face, FaceList, PointField, PointType >::points().
Non-const access to the faces.
Definition at line 218 of file triSurface.H.
ClassName | ( | "triSurface" | ) |
Runtime type information.
Name of triSurface directory to use.
void clearOut | ( | ) |
void clearTopology | ( | ) |
void clearPatchMeshAddr | ( | ) |
|
inline |
Definition at line 306 of file triSurface.H.
References triSurface::patches_.
|
inline |
Definition at line 311 of file triSurface.H.
References triSurface::patches_.
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())
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.
|
virtual |
Move points.
Reimplemented in triSurfaceMesh.
|
virtual |
Scale points. A non-positive factor is ignored.
Definition at line 801 of file triSurface.C.
void checkTriangles | ( | const bool | verbose | ) |
Check/remove duplicate/degenerate triangles.
void checkEdges | ( | const bool | verbose | ) |
Check triply (or more) connected edges.
void cleanup | ( | const bool | verbose | ) |
Remove non-valid triangles.
(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.
'Create' sub mesh, including only faces for which
boolList entry is true Sets: pointMap: from new to old localPoints faceMap: new to old faces
triSurface subsetMesh | ( | const boolList & | include, |
labelList & | pointMap, | ||
labelList & | faceMap | ||
) | const |
Return new surface. Returns pointMap, faceMap from.
subsetMeshMap
void write | ( | const fileName & | , |
const bool | sortByRegion = false |
||
) | const |
Generic write routine. Chooses writer based on extension.
void write | ( | const Time & | ) | const |
Write to database.
void writeDX | ( | const scalarField & | , |
Ostream & | |||
) | const |
Write to Ostream in OpenDX format.
void writeDX | ( | const vectorField & | , |
Ostream & | |||
) | const |
void writeStats | ( | Ostream & | ) | const |
Write some statistics.
void operator= | ( | const triSurface & | ) |
|
friend |
|
friend |
|
staticprivate |
The number of bytes in the STL header.
Definition at line 79 of file triSurface.H.
Referenced by triSurface::readSTLBINARY(), and triSurface::writeSTLBINARY().
|
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().
|
mutableprivate |
Edge-face addressing (sorted)
Definition at line 89 of file triSurface.H.
Referenced by triSurface::calcSortedEdgeFaces().
|
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().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.