Public Types | Public Member Functions | Static Public Attributes | List of all members
booleanSurface Class Reference

Surface-surface intersection. Given two surfaces construct combined surface. More...

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

Public Types

enum  booleanOpType { UNION, INTERSECTION, DIFFERENCE, ALL }
 
- 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
 

Public Member Functions

 ClassName ("booleanSurface")
 
 booleanSurface ()
 
 booleanSurface (const triSurface &surf1, const triSurface &surf2, const surfaceIntersection &inter, const label includeFace1, const label includeFace2)
 
 booleanSurface (const triSurface &surf1, const triSurface &surf2, const surfaceIntersection &inter, const label booleanOp)
 
const labelListfaceMap () const
 
bool from1 (const label facei) const
 
bool surf1Face (const label facei) const
 
bool surf2Face (const label facei) 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 Enum< booleanOpTypebooleanOpTypeNames
 

Additional Inherited Members

- 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

Surface-surface intersection. Given two surfaces construct combined surface.

Called 'boolean' since the volume of resulting surface will encompass the volumes of the original surface according to some boolean operation:

Algorithm:

  1. find edge-surface intersection. Class 'surfaceIntersection'.
  2. combine intersection with both surfaces. Class 'intersectedSurface'.
  3. subset surfaces upto intersection. The 'side' of the surface to include is based on the faces that can be reached from a user-supplied face index.
  4. merge surfaces. Only the points on the intersection are shared.
Source files

Definition at line 67 of file booleanSurface.H.

Member Enumeration Documentation

◆ booleanOpType

Enumerator
UNION 
INTERSECTION 
DIFFERENCE 
ALL 

Definition at line 162 of file booleanSurface.H.

Constructor & Destructor Documentation

◆ booleanSurface() [1/3]

Definition at line 380 of file booleanSurface.C.

◆ booleanSurface() [2/3]

booleanSurface ( const triSurface surf1,
const triSurface surf2,
const surfaceIntersection inter,
const label  includeFace1,
const label  includeFace2 
)

◆ booleanSurface() [3/3]

booleanSurface ( const triSurface surf1,
const triSurface surf2,
const surfaceIntersection inter,
const label  booleanOp 
)

Member Function Documentation

◆ ClassName()

ClassName ( "booleanSurface"  )

◆ faceMap()

const labelList& faceMap ( ) const
inline

Definition at line 210 of file booleanSurface.H.

◆ from1()

bool from1 ( const label  facei) const
inline

Definition at line 215 of file booleanSurface.H.

Referenced by booleanSurface::surf1Face(), and booleanSurface::surf2Face().

Here is the caller graph for this function:

◆ surf1Face()

bool surf1Face ( const label  facei) const
inline

Definition at line 220 of file booleanSurface.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and booleanSurface::from1().

Here is the call graph for this function:

◆ surf2Face()

bool surf2Face ( const label  facei) const
inline

Definition at line 231 of file booleanSurface.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and booleanSurface::from1().

Here is the call graph for this function:

Member Data Documentation

◆ booleanOpTypeNames

const Foam::Enum< Foam::booleanSurface::booleanOpType > booleanOpTypeNames
static

Definition at line 173 of file booleanSurface.H.


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