Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes
intersectedSurface Class Reference

Given triSurface and intersection creates the intersected (properly triangulated) surface. (note: intersection is the list of points and edges 'shared' by two surfaces) More...

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

Public Member Functions

 ClassName ("intersectedSurface")
 
 intersectedSurface ()
 Construct null. More...
 
 intersectedSurface (const triSurface &surf)
 Construct from surface. More...
 
 intersectedSurface (const triSurface &surf, const bool isFirstSurface, const surfaceIntersection &inter)
 Construct from surface and intersection. isFirstSurface is needed. More...
 
const labelListintersectionEdges () const
 Labels of edges in *this which originate from 'cuts'. More...
 
const labelListfaceMap () const
 New to old. More...
 
label nSurfacePoints () const
 Number of points from original surface. More...
 
bool isSurfacePoint (const label pointI) const
 Is point coming from original surface? More...
 
- Public Member Functions inherited from 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 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 Attributes

static const label UNVISITED = 0
 
static const label STARTTOEND = 1
 
static const label ENDTOSTART = 2
 
static const label BOTH = STARTTOEND | ENDTOSTART
 

Static Private Member Functions

static void writeOBJ (const pointField &points, const edgeList &edges, Ostream &os)
 Debug:Dump edges to stream. Mantains vertex numbering. More...
 
static void writeOBJ (const pointField &points, const edgeList &edges, const labelList &faceEdges, Ostream &os)
 Debug:Dump selected edges to stream. Mantains vertex numbering. More...
 
static void writeLocalOBJ (const pointField &points, const edgeList &edges, const labelList &faceEdges, const fileName &)
 Debug:Dump selected edges to stream. Renumbers vertices to. More...
 
static void writeOBJ (const pointField &points, const face &f, Ostream &os)
 Debug:Write whole pointField and face to stream. More...
 
static void printVisit (const edgeList &edges, const labelList &edgeLabels, const Map< label > &visited)
 Debug:Print visited status. More...
 
static bool sameEdgeOrder (const labelledTri &fA, const labelledTri &fB)
 Check if the two vertices that f0 and f1 share are in the same. More...
 
static void incCount (Map< label > &visited, const label key, const label offset)
 Increment data for key. (start from 0 if not found) More...
 
static Map< DynamicList< label > > calcPointEdgeAddressing (const edgeSurface &, const label faceI)
 Calculate point-edge addressing for single face only. More...
 
static label nextEdge (const edgeSurface &eSurf, const Map< label > &visited, const label faceI, const vector &n, const Map< DynamicList< label > > &facePointEdges, const label prevEdgeI, const label prevVertI)
 Choose edge out of candidates (facePointEdges) according to. More...
 
static face walkFace (const edgeSurface &eSurf, const label faceI, const vector &n, const Map< DynamicList< label > > &facePointEdges, const label startEdgeI, const label startVertI, Map< label > &visited)
 Walk path along edges in face. Used by splitFace. More...
 
static void findNearestVisited (const edgeSurface &eSurf, const label faceI, const Map< DynamicList< label > > &facePointEdges, const Map< label > &pointVisited, const point &pt, const label excludeFaceI, label &minVertI, scalar &minDist)
 For resplitFace: find nearest (to pt) fully visited point. Return. More...
 
static faceList resplitFace (const triSurface &surf, const label faceI, const Map< DynamicList< label > > &facePointEdges, const Map< label > &visited, edgeSurface &eSurf)
 Fallback for if splitFace fails to connect all. More...
 
static faceList splitFace (const triSurface &surf, const label faceI, edgeSurface &eSurf)
 Main face splitting routine. Gets overall points and edges and. More...
 

Private Attributes

labelList intersectionEdges_
 Edges which are part of intersection. More...
 
labelList faceMap_
 From new to original faces. More...
 
label nSurfacePoints_
 What are surface points: 0 .. nSurfacePoints_-1. More...
 

Additional Inherited Members

- Public Types inherited from triSurface
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...
 
- Static Public Member Functions inherited from triSurface
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 inherited from triSurface
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...
 

Detailed Description

Given triSurface and intersection creates the intersected (properly triangulated) surface. (note: intersection is the list of points and edges 'shared' by two surfaces)

Algorithm:

The resulting surface will have the points from the surface first in the point list (0 .. nSurfacePoints-1)

Note: problematic are the cut-edges which are completely inside a face. These will not be visited by a edge-point-edge walk. These are handled by resplitFace which first connects the 'floating' edges to triangle edges with two extra edges and then tries the splitting again. Seems to work (mostly). Will probably fail for boundary edge (edge with only face).

Note: points are compact, i.e. points().size() == localPoints().size() (though points() probably not localPoints())

Source files

Definition at line 81 of file intersectedSurface.H.

Constructor & Destructor Documentation

◆ intersectedSurface() [1/3]

Construct null.

Definition at line 1067 of file intersectedSurface.C.

◆ intersectedSurface() [2/3]

intersectedSurface ( const triSurface surf)

Construct from surface.

Definition at line 1077 of file intersectedSurface.C.

◆ intersectedSurface() [3/3]

intersectedSurface ( const triSurface surf,
const bool  isFirstSurface,
const surfaceIntersection inter 
)

Member Function Documentation

◆ writeOBJ() [1/3]

void writeOBJ ( const pointField points,
const edgeList edges,
Ostream os 
)
staticprivate

Debug:Dump edges to stream. Mantains vertex numbering.

Definition at line 56 of file intersectedSurface.C.

References Foam::constant::electromagnetic::e, forAll, Foam::nl, points, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ writeOBJ() [2/3]

void writeOBJ ( const pointField points,
const edgeList edges,
const labelList faceEdges,
Ostream os 
)
staticprivate

Debug:Dump selected edges to stream. Mantains vertex numbering.

Definition at line 79 of file intersectedSurface.C.

References Foam::constant::electromagnetic::e, forAll, Foam::nl, points, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ writeLocalOBJ()

void writeLocalOBJ ( const pointField points,
const edgeList edges,
const labelList faceEdges,
const fileName fName 
)
staticprivate

Debug:Dump selected edges to stream. Renumbers vertices to.

local ordering.

Definition at line 103 of file intersectedSurface.C.

References Foam::constant::electromagnetic::e, forAll, Foam::nl, points, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ writeOBJ() [3/3]

void writeOBJ ( const pointField points,
const face f,
Ostream os 
)
staticprivate

Debug:Write whole pointField and face to stream.

Definition at line 147 of file intersectedSurface.C.

References f(), forAll, Foam::nl, points, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ printVisit()

void printVisit ( const edgeList edges,
const labelList edgeLabels,
const Map< label > &  visited 
)
staticprivate

Debug:Print visited status.

Definition at line 172 of file intersectedSurface.C.

References Foam::constant::electromagnetic::e, Foam::endl(), forAll, Foam::nl, and Foam::Pout.

Here is the call graph for this function:

◆ sameEdgeOrder()

bool sameEdgeOrder ( const labelledTri fA,
const labelledTri fB 
)
staticprivate

Check if the two vertices that f0 and f1 share are in the same.

order on both faces.

Definition at line 215 of file intersectedSurface.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, FixedList::fcIndex(), Foam::findIndex(), forAll, and FixedList::rcIndex().

Here is the call graph for this function:

◆ incCount()

void incCount ( Map< label > &  visited,
const label  key,
const label  offset 
)
staticprivate

Increment data for key. (start from 0 if not found)

Definition at line 263 of file intersectedSurface.C.

◆ calcPointEdgeAddressing()

Foam::Map< Foam::DynamicList< Foam::label > > calcPointEdgeAddressing ( const edgeSurface eSurf,
const label  faceI 
)
staticprivate

◆ nextEdge()

Foam::label nextEdge ( const edgeSurface eSurf,
const Map< label > &  visited,
const label  faceI,
const vector n,
const Map< DynamicList< label > > &  facePointEdges,
const label  prevEdgeI,
const label  prevVertI 
)
staticprivate

Choose edge out of candidates (facePointEdges) according to.

angle with previous edge.

Definition at line 381 of file intersectedSurface.C.

References Foam::abort(), Foam::constant::electromagnetic::e, edgeSurface::edges(), Foam::endl(), edgeSurface::faceEdges(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), n, edge::otherVertex(), points, edgeSurface::points(), Foam::Pout, Foam::pseudoAngle(), and writeOBJ().

Here is the call graph for this function:

◆ walkFace()

Foam::face walkFace ( const edgeSurface eSurf,
const label  faceI,
const vector n,
const Map< DynamicList< label > > &  facePointEdges,
const label  startEdgeI,
const label  startVertI,
Map< label > &  visited 
)
staticprivate

Walk path along edges in face. Used by splitFace.

Definition at line 560 of file intersectedSurface.C.

References Foam::constant::electromagnetic::e, edgeSurface::edges(), Foam::endl(), f(), edgeSurface::faceEdges(), n, points, edgeSurface::points(), Foam::Pout, and List::size().

Here is the call graph for this function:

◆ findNearestVisited()

void findNearestVisited ( const edgeSurface eSurf,
const label  faceI,
const Map< DynamicList< label > > &  facePointEdges,
const Map< label > &  pointVisited,
const point pt,
const label  excludeFaceI,
label minVertI,
scalar &  minDist 
)
staticprivate

For resplitFace: find nearest (to pt) fully visited point. Return.

point and distance.

Definition at line 637 of file intersectedSurface.C.

References Foam::abort(), edgeSurface::edges(), Foam::endl(), edgeSurface::faceEdges(), Foam::FatalError, FatalErrorInFunction, forAllConstIter(), Foam::mag(), edgeSurface::points(), and SeriousErrorInFunction.

Here is the call graph for this function:

◆ resplitFace()

Foam::faceList resplitFace ( const triSurface surf,
const label  faceI,
const Map< DynamicList< label > > &  facePointEdges,
const Map< label > &  visited,
edgeSurface eSurf 
)
staticprivate

Fallback for if splitFace fails to connect all.

Definition at line 699 of file intersectedSurface.C.

References edgeSurface::addIntersectionEdges(), Foam::constant::electromagnetic::e, edgeSurface::edges(), Foam::endl(), edgeSurface::faceEdges(), forAllConstIter(), Foam::name(), edgeSurface::points(), and Foam::Pout.

Here is the call graph for this function:

◆ splitFace()

Foam::faceList splitFace ( const triSurface surf,
const label  faceI,
edgeSurface eSurf 
)
staticprivate

◆ ClassName()

ClassName ( "intersectedSurface"  )

◆ intersectionEdges()

const labelList& intersectionEdges ( ) const
inline

Labels of edges in *this which originate from 'cuts'.

Definition at line 268 of file intersectedSurface.H.

References intersectedSurface::intersectionEdges_.

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

Here is the caller graph for this function:

◆ faceMap()

const labelList& faceMap ( ) const
inline

New to old.

Definition at line 274 of file intersectedSurface.H.

References intersectedSurface::faceMap_.

Referenced by booleanSurface::booleanSurface().

Here is the caller graph for this function:

◆ nSurfacePoints()

label nSurfacePoints ( ) const
inline

Number of points from original surface.

Definition at line 280 of file intersectedSurface.H.

References intersectedSurface::nSurfacePoints_.

Referenced by booleanSurface::booleanSurface().

Here is the caller graph for this function:

◆ isSurfacePoint()

bool isSurfacePoint ( const label  pointI) const
inline

Is point coming from original surface?

Definition at line 286 of file intersectedSurface.H.

References intersectedSurface::nSurfacePoints_.

Referenced by booleanSurface::booleanSurface().

Here is the caller graph for this function:

Field Documentation

◆ UNVISITED

const Foam::label UNVISITED = 0
static

Definition at line 87 of file intersectedSurface.H.

◆ STARTTOEND

const Foam::label STARTTOEND = 1
static

Definition at line 88 of file intersectedSurface.H.

◆ ENDTOSTART

const Foam::label ENDTOSTART = 2
static

Definition at line 89 of file intersectedSurface.H.

◆ BOTH

const Foam::label BOTH = STARTTOEND | ENDTOSTART
static

Definition at line 90 of file intersectedSurface.H.

◆ intersectionEdges_

labelList intersectionEdges_
private

Edges which are part of intersection.

Definition at line 97 of file intersectedSurface.H.

Referenced by intersectedSurface::intersectionEdges().

◆ faceMap_

labelList faceMap_
private

From new to original faces.

Definition at line 100 of file intersectedSurface.H.

Referenced by intersectedSurface::faceMap().

◆ nSurfacePoints_

label nSurfacePoints_
private

What are surface points: 0 .. nSurfacePoints_-1.

Definition at line 103 of file intersectedSurface.H.

Referenced by intersectedSurface::isSurfacePoint(), and intersectedSurface::nSurfacePoints().


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