Public Member Functions | Static Public Attributes | List of all members
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 ()
 
 intersectedSurface (const triSurface &surf)
 
 intersectedSurface (const triSurface &surf, const bool isFirstSurface, const surfaceIntersection &inter)
 
const labelListintersectionEdges () const
 
const labelListfaceMap () const
 
label nSurfacePoints () const
 
bool isSurfacePoint (const label pointi) const
 
- Public Member Functions inherited from triSurface
 ClassName ("triSurface")
 
 triSurface ()
 
 triSurface (const triSurface &surf)
 
 triSurface (triSurface &&surf)
 
 triSurface (const List< labelledTri > &triangles, const geometricSurfacePatchList &patches, const pointField &pts)
 
 triSurface (List< labelledTri > &triangles, const geometricSurfacePatchList &patches, pointField &pts, const bool reuse)
 
 triSurface (const List< labelledTri > &triangles, const pointField &pts)
 
 triSurface (const triFaceList &triangles, const pointField &pts)
 
 triSurface (const fileName &name, const scalar scaleFactor=-1)
 
 triSurface (const fileName &name, const word &fileType, const scalar scaleFactor=-1)
 
 triSurface (Istream &is)
 
 triSurface (const Time &d)
 
 triSurface (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 
virtual ~triSurface ()
 
void clearOut ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void swap (triSurface &surf)
 
const geometricSurfacePatchListpatches () const noexcept
 
geometricSurfacePatchListpatches () noexcept
 
const List< labelledTri > & surfFaces () const noexcept
 
const labelListListsortedEdgeFaces () const
 
const labelListedgeOwner () const
 
const vectorFieldSf () const
 
const scalarFieldmagSf () const
 
const vectorFieldCf () const
 
List< surfZonesortedZones (labelList &faceMap) const
 
void triFaceFaces (List< face > &plainFaceList) const
 
virtual void movePoints (const pointField &pts)
 
virtual void swapPoints (pointField &pts)
 
virtual void scalePoints (const scalar scaleFactor)
 
void checkTriangles (const bool verbose)
 
void checkEdges (const bool verbose)
 
void cleanup (const bool verbose)
 
void compactPoints (labelList &pointMap=const_cast< labelList & >(labelList::null()))
 
void markZone (const boolList &borderEdge, const label facei, const label currentZone, labelList &faceZone) const
 
label markZones (const boolList &borderEdge, labelList &faceZone) const
 
template<class BoolListType >
void subsetMeshMap (const BoolListType &include, labelList &pointMap, labelList &faceMap) const
 
triSurface subsetMesh (const UList< bool > &include, labelList &pointMap, labelList &faceMap) const
 
triSurface subsetMesh (const bitSet &include, labelList &pointMap, labelList &faceMap) const
 
triSurface subsetMesh (const UList< bool > &include) const
 
triSurface subsetMesh (const bitSet &include) const
 
triSurface subsetMesh (const wordRes &includeNames, const wordRes &excludeNames=wordRes()) const
 
void swapFaces (List< labelledTri > &faceLst)
 
void transfer (triSurface &surf)
 
void transfer (MeshedSurface< labelledTri > &surf)
 
void write (Ostream &os) const
 
void write (const fileName &, const bool sortByRegion=false) const
 
void write (const fileName &filename, const word &fileType, const bool sortByRegion=false) const
 
void write (const Time &d) const
 
void writeStats (Ostream &os) const
 
void operator= (const triSurface &surf)
 
void operator= (triSurface &&surf)
 
void operator= (MeshedSurface< labelledTri > &&surf)
 
- Public Member Functions inherited from PrimitivePatch<::Foam::List< labelledTri >, pointField >
 PrimitivePatch (const ::Foam::List< labelledTri > &faces, const pointField &points)
 
 PrimitivePatch (::Foam::List< labelledTri > &&faces, const pointField &points)
 
 PrimitivePatch (::Foam::List< labelledTri > &faces, pointField &points, const bool reuse)
 
 PrimitivePatch (const PrimitivePatch< ::Foam::List< labelledTri >, pointField > &pp)
 
virtual ~PrimitivePatch ()
 
void clearOut ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void swap (PrimitivePatch &)=delete
 
const Field< point_type > & points () const noexcept
 
label nFaces () const noexcept
 
label nPoints () const
 
label nEdges () const
 
const edgeListedges () const
 
const edgeList::subList internalEdges () const
 
const edgeList::subList boundaryEdges () const
 
label nInternalEdges () const
 
label nBoundaryEdges () const
 
bool isInternalEdge (const label edgei) const
 
const labelListboundaryPoints () const
 
const labelListListfaceFaces () const
 
const labelListListedgeFaces () const
 
const labelListListfaceEdges () const
 
const labelListListpointEdges () const
 
const labelListListpointFaces () const
 
const List< face_type > & localFaces () const
 
labelList boundaryFaces () const
 
labelList uniqBoundaryFaces () const
 
const labelListmeshPoints () const
 
const Map< label > & meshPointMap () const
 
const Field< point_type > & localPoints () const
 
const labelListlocalPointOrder () const
 
label whichPoint (const label gp) const
 
edge meshEdge (const label edgei) const
 
edge meshEdge (const edge &e) const
 
label meshEdge (const label edgei, const edgeList &allEdges, const labelListList &pointEdges) const
 
label findEdge (const edge &e) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 
labelList meshEdges (const labelUList &edgeLabels, const edgeList &allEdges, const labelListList &pointEdges) const
 
const Field< point_type > & faceCentres () const
 
const Field< point_type > & faceAreas () const
 
const Field< scalar > & magFaceAreas () const
 
const Field< point_type > & faceNormals () const
 
const Field< point_type > & pointNormals () const
 
bool hasFaceAreas () const
 
bool hasFaceCentres () const
 
bool hasFaceNormals () const
 
bool hasPointNormals () const
 
bool hasBoundaryPoints () const
 
bool hasFaceFaces () const
 
bool hasEdgeFaces () const
 
bool hasFaceEdges () const
 
bool hasPointEdges () const
 
bool hasPointFaces () const
 
bool hasMeshPointMap () const
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 
Foam::List< Foam::objectHitprojectPoints (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< ::Foam::List< labelledTri >, pointField >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 
Foam::List< Foam::objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< ::Foam::List< labelledTri >, pointField >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
const labelListListedgeLoops () const
 
surfaceTopo surfaceType () const
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=nullptr) const
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=nullptr) const
 
virtual void movePoints (const Field< point_type > &)
 
void operator= (const PrimitivePatch< ::Foam::List< labelledTri >, pointField > &rhs)
 
void operator= (PrimitivePatch< ::Foam::List< labelledTri >, pointField > &&rhs)
 
label whichEdge (const edge &e) const
 
- Public Member Functions inherited from PrimitivePatchBase
 ClassName ("PrimitivePatch")
 
 PrimitivePatchBase ()=default
 
- Public Member Functions inherited from List< labelledTri >
constexpr List () noexcept
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const List< T > &a)
 
 List (const UList< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
 List (const UList< T > &list, const FixedList< label, N > &indices)
 
 List (const FixedList< T, N > &list)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
 List (const IndirectListBase< T, Addr > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
 List (DynamicList< T, SizeMin > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
 List (Istream &is)
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const UList< T > &a)
 
 List (const List< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
constexpr List () noexcept
 
 List (Istream &is)
 
autoPtr< List< T > > clone () const
 
 ~List ()
 
void clear ()
 
void resize (const label len)
 
void resize (const label len, const T &val)
 
void resize (const label newLen)
 
void resize_nocopy (const label len)
 
void setSize (const label n)
 
void setSize (const label n, const T &val)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
void append (const IndirectListBase< T, Addr > &list)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
label appendUniq (const T &val)
 
void transfer (List< T > &list)
 
void transfer (DynamicList< T, SizeMin > &list)
 
void transfer (SortableList< T > &list)
 
void transfer (List< T > &list)
 
void transfer (SortableList< T > &list)
 
TnewElmt (const label i)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (const IndirectListBase< T, Addr > &list)
 
void operator= (const FixedList< T, N > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (List< T > &&list)
 
void operator= (DynamicList< T, SizeMin > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (List< T > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
void shallowCopy (const UList< T > &)=delete
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set (const label i, bool val=true)
 

Static Public Attributes

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

Additional Inherited Members

- Public Types inherited from triSurface
typedef bool BoundaryMesh
 
typedef labelledTri face_type
 
typedef point point_type
 
- Public Types inherited from PrimitivePatch<::Foam::List< labelledTri >, pointField >
enum  surfaceTopo
 
typedef std::remove_reference< ::Foam::List< labelledTri > >::type::value_type face_type
 
typedef std::remove_reference< pointField >::type::value_type point_type
 
typedef ::Foam::List< labelledTriFaceListType
 
typedef pointField PointFieldType
 
typedef face_type FaceType
 
- Public Types inherited from List< labelledTri >
typedef SubList< TsubList
 
- Static Public Member Functions inherited from triSurface
static fileName triSurfInstance (const Time &)
 
static wordHashSet readTypes ()
 
static wordHashSet writeTypes ()
 
static bool canReadType (const word &fileType, bool verbose=false)
 
static bool canWriteType (const word &fileType, bool verbose=false)
 
static bool canRead (const fileName &name, bool verbose=false)
 
static fileName relativeFilePath (const IOobject &io, const fileName &f, const bool isGlobal=true)
 
static fileName checkFile (const IOobject &io, const bool isGlobal=true)
 
static fileName checkFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 
static fileName findFile (const IOobject &io, const bool isGlobal=true)
 
static fileName findFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 
static autoPtr< triSurfaceNew (const fileName &name, const word &fileType)
 
static autoPtr< triSurfaceNew (const fileName &name)
 
- Static Public Member Functions inherited from List< labelledTri >
static const List< T > & null ()
 
- Protected Member Functions inherited from triSurface
pointFieldstoredPoints ()
 
List< labelledTri > & storedFaces ()
 

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 79 of file intersectedSurface.H.

Constructor & Destructor Documentation

◆ intersectedSurface() [1/3]

Definition at line 994 of file intersectedSurface.C.

◆ intersectedSurface() [2/3]

intersectedSurface ( const triSurface surf)

Definition at line 1003 of file intersectedSurface.C.

◆ intersectedSurface() [3/3]

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

Member Function Documentation

◆ ClassName()

ClassName ( "intersectedSurface"  )

◆ intersectionEdges()

const labelList& intersectionEdges ( ) const
inline

Definition at line 266 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().

Here is the caller graph for this function:

◆ faceMap()

const labelList& faceMap ( ) const
inline

Definition at line 272 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().

Here is the caller graph for this function:

◆ nSurfacePoints()

label nSurfacePoints ( ) const
inline

Definition at line 278 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().

Here is the caller graph for this function:

◆ isSurfacePoint()

bool isSurfacePoint ( const label  pointi) const
inline

Definition at line 284 of file intersectedSurface.H.

Referenced by booleanSurface::booleanSurface().

Here is the caller graph for this function:

Member Data Documentation

◆ UNVISITED

const Foam::label UNVISITED = 0
static

Definition at line 85 of file intersectedSurface.H.

◆ STARTTOEND

const Foam::label STARTTOEND = 1
static

Definition at line 86 of file intersectedSurface.H.

◆ ENDTOSTART

const Foam::label ENDTOSTART = 2
static

Definition at line 87 of file intersectedSurface.H.

◆ BOTH

const Foam::label BOTH = STARTTOEND | ENDTOSTART
static

Definition at line 88 of file intersectedSurface.H.


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