Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
BRepExtrema_SelfIntersection Class Reference

Tool class for detection of self-sections in the given shape. This class is based on BRepExtrema_OverlapTool and thus uses shape tessellation to detect incorrect mesh fragments (pairs of overlapped triangles belonging to different faces). Thus, a result depends critically on the quality of mesh generator (e.g., BREP mesh is not always a good choice, because it can contain gaps between adjacent face triangulations, which may not share vertices on common edge; thus false overlap can be detected). As a result, this tool can be used for relatively fast approximated test which provides sub-set of potentially overlapped faces. More...

#include <BRepExtrema_SelfIntersection.hxx>

Inheritance diagram for BRepExtrema_SelfIntersection:
Inheritance graph
[legend]

Public Member Functions

 BRepExtrema_SelfIntersection (const double theTolerance=0.0)
 Creates uninitialized self-intersection tool.
 
 BRepExtrema_SelfIntersection (const TopoDS_Shape &theShape, const double theTolerance=0.0)
 Creates self-intersection tool for the given shape.
 
double Tolerance () const
 Returns tolerance value used for self-intersection test.
 
void SetTolerance (const double theTolerance)
 Sets tolerance value used for self-intersection test.
 
bool LoadShape (const TopoDS_Shape &theShape)
 Loads shape for detection of self-intersections.
 
void Perform ()
 Performs detection of self-intersections.
 
bool IsDone () const
 True if the detection is completed.
 
const NCollection_DataMap< int, TColStd_PackedMapOfInteger > & OverlapElements () const
 Returns set of IDs of overlapped sub-shapes (started from 0).
 
const TopoDS_FaceGetSubShape (const int theID) const
 Returns sub-shape from the shape for the given index (started from 0).
 
const occ::handle< BRepExtrema_TriangleSet > & ElementSet () const
 Returns set of all the face triangles of the shape.
 
- Public Member Functions inherited from BRepExtrema_ElementFilter
virtual ~BRepExtrema_ElementFilter ()=default
 Releases resources of element filter.
 

Protected Member Functions

BRepExtrema_ElementFilter::FilterResult PreCheckElements (const int theIndex1, const int theIndex2) override
 Filter out correct adjacent mesh elements.
 
BRepExtrema_ElementFilter::FilterResult isRegularSharedVertex (const BVH_Vec3d &theSharedVert, const BVH_Vec3d &theTrng1Vtxs1, const BVH_Vec3d &theTrng1Vtxs2, const BVH_Vec3d &theTrng2Vtxs1, const BVH_Vec3d &theTrng2Vtxs2)
 Checks if the given triangles have only single common vertex.
 
BRepExtrema_ElementFilter::FilterResult isRegularSharedEdge (const BVH_Vec3d &theTrng1Vtxs0, const BVH_Vec3d &theTrng1Vtxs1, const BVH_Vec3d &theTrng1Vtxs2, const BVH_Vec3d &theTrng2Vtxs2)
 Checks if the given triangles have only single common edge.
 

Additional Inherited Members

- Public Types inherited from BRepExtrema_ElementFilter
enum  FilterResult { NoCheck , Overlap , DoCheck }
 Result of filtering function. More...
 

Detailed Description

Tool class for detection of self-sections in the given shape. This class is based on BRepExtrema_OverlapTool and thus uses shape tessellation to detect incorrect mesh fragments (pairs of overlapped triangles belonging to different faces). Thus, a result depends critically on the quality of mesh generator (e.g., BREP mesh is not always a good choice, because it can contain gaps between adjacent face triangulations, which may not share vertices on common edge; thus false overlap can be detected). As a result, this tool can be used for relatively fast approximated test which provides sub-set of potentially overlapped faces.

Constructor & Destructor Documentation

◆ BRepExtrema_SelfIntersection() [1/2]

BRepExtrema_SelfIntersection::BRepExtrema_SelfIntersection ( const double theTolerance = 0.0)

Creates uninitialized self-intersection tool.

◆ BRepExtrema_SelfIntersection() [2/2]

BRepExtrema_SelfIntersection::BRepExtrema_SelfIntersection ( const TopoDS_Shape & theShape,
const double theTolerance = 0.0 )

Creates self-intersection tool for the given shape.

Member Function Documentation

◆ ElementSet()

const occ::handle< BRepExtrema_TriangleSet > & BRepExtrema_SelfIntersection::ElementSet ( ) const
inline

Returns set of all the face triangles of the shape.

◆ GetSubShape()

const TopoDS_Face & BRepExtrema_SelfIntersection::GetSubShape ( const int theID) const
inline

Returns sub-shape from the shape for the given index (started from 0).

◆ IsDone()

bool BRepExtrema_SelfIntersection::IsDone ( ) const
inline

True if the detection is completed.

◆ isRegularSharedEdge()

BRepExtrema_ElementFilter::FilterResult BRepExtrema_SelfIntersection::isRegularSharedEdge ( const BVH_Vec3d & theTrng1Vtxs0,
const BVH_Vec3d & theTrng1Vtxs1,
const BVH_Vec3d & theTrng1Vtxs2,
const BVH_Vec3d & theTrng2Vtxs2 )
protected

Checks if the given triangles have only single common edge.

◆ isRegularSharedVertex()

BRepExtrema_ElementFilter::FilterResult BRepExtrema_SelfIntersection::isRegularSharedVertex ( const BVH_Vec3d & theSharedVert,
const BVH_Vec3d & theTrng1Vtxs1,
const BVH_Vec3d & theTrng1Vtxs2,
const BVH_Vec3d & theTrng2Vtxs1,
const BVH_Vec3d & theTrng2Vtxs2 )
protected

Checks if the given triangles have only single common vertex.

◆ LoadShape()

bool BRepExtrema_SelfIntersection::LoadShape ( const TopoDS_Shape & theShape)

Loads shape for detection of self-intersections.

◆ OverlapElements()

const NCollection_DataMap< int, TColStd_PackedMapOfInteger > & BRepExtrema_SelfIntersection::OverlapElements ( ) const
inline

Returns set of IDs of overlapped sub-shapes (started from 0).

◆ Perform()

void BRepExtrema_SelfIntersection::Perform ( )

Performs detection of self-intersections.

◆ PreCheckElements()

BRepExtrema_ElementFilter::FilterResult BRepExtrema_SelfIntersection::PreCheckElements ( const int theIndex1,
const int theIndex2 )
overrideprotectedvirtual

Filter out correct adjacent mesh elements.

Reimplemented from BRepExtrema_ElementFilter.

◆ SetTolerance()

void BRepExtrema_SelfIntersection::SetTolerance ( const double theTolerance)
inline

Sets tolerance value used for self-intersection test.

◆ Tolerance()

double BRepExtrema_SelfIntersection::Tolerance ( ) const
inline

Returns tolerance value used for self-intersection test.


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