Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
BRepExtrema_OverlapTool Class Reference

Enables storing of individual overlapped triangles (useful for debug). More...

#include <BRepExtrema_OverlapTool.hxx>

Inheritance diagram for BRepExtrema_OverlapTool:
Inheritance graph
[legend]

Public Member Functions

 BRepExtrema_OverlapTool ()
 Creates new uninitialized overlap tool.
 
 BRepExtrema_OverlapTool (const occ::handle< BRepExtrema_TriangleSet > &theSet1, const occ::handle< BRepExtrema_TriangleSet > &theSet2)
 Creates new overlap tool for the given element sets.
 
void LoadTriangleSets (const occ::handle< BRepExtrema_TriangleSet > &theSet1, const occ::handle< BRepExtrema_TriangleSet > &theSet2)
 Loads the given element sets into the overlap tool.
 
void Perform (const double theTolerance=0.0)
 Performs searching of overlapped mesh elements.
 
bool IsDone () const
 Is overlap test completed?
 
void MarkDirty ()
 Marks test results as outdated.
 
const NCollection_DataMap< int, TColStd_PackedMapOfInteger > & OverlapSubShapes1 () const
 Returns set of overlapped sub-shapes of 1st shape (currently only faces are detected).
 
const NCollection_DataMap< int, TColStd_PackedMapOfInteger > & OverlapSubShapes2 () const
 Returns set of overlapped sub-shapes of 2nd shape (currently only faces are detected).
 
void SetElementFilter (BRepExtrema_ElementFilter *theFilter)
 Sets filtering tool for preliminary checking pairs of mesh elements.
 
- Public Member Functions inherited from BVH_PairTraverse< double, 3 >
 BVH_PairTraverse ()
 
void SetBVHSets (void *theBVHSet1, void *theBVHSet2)
 
virtual bool RejectNode (const BVH_VecNt &theCornerMin1, const BVH_VecNt &theCornerMax1, const BVH_VecNt &theCornerMin2, const BVH_VecNt &theCornerMax2, double &theMetric) const=0
 Leaf element acceptance. Returns true if the pair of elements is accepted, false otherwise.
 
int Select ()
 Performs selection of the elements from two BVH trees by the rules defined in Accept/Reject methods. Returns the number of accepted pairs of elements.
 
int Select (const opencascade::handle< BVH_Tree< double, Dimension > > &theBVH1, const opencascade::handle< BVH_Tree< double, Dimension > > &theBVH2)
 Performs selection of the elements from two BVH trees by the rules defined in Accept/Reject methods. Returns the number of accepted pairs of elements.
 
- Public Member Functions inherited from BVH_BaseTraverse< MetricType >
virtual bool IsMetricBetter (const MetricType &, const MetricType &) const
 
virtual bool RejectMetric (const MetricType &) const
 
virtual bool Stop () const
 

Reject/Accept implementations

Defines the rules for node rejection by bounding box

bool RejectNode (const BVH_Vec3d &theCornerMin1, const BVH_Vec3d &theCornerMax1, const BVH_Vec3d &theCornerMin2, const BVH_Vec3d &theCornerMax2, double &) const override
 Set of all mesh elements (triangles) of the 1st shape.
 
bool Accept (const int theLeaf1, const int theLeaf2) override
 Defines the rules for leaf acceptance.
 
void intersectTrianglesExact (const int theTrgIdx1, const int theTrgIdx2)
 Performs narrow-phase of overlap test (exact intersection).
 
void intersectTrianglesToler (const int theTrgIdx1, const int theTrgIdx2, const double theToler)
 Performs narrow-phase of overlap test (intersection with non-zero tolerance).
 

Additional Inherited Members

- Public Types inherited from BVH_PairTraverse< double, 3 >
typedef BVH_Box< double, Dimension >::BVH_VecNt BVH_VecNt
 
- Protected Member Functions inherited from BVH_BaseTraverse< MetricType >
 BVH_BaseTraverse ()
 Destructor.
 
virtual ~BVH_BaseTraverse ()=default
 Destructor.
 
- Protected Attributes inherited from BVH_PairTraverse< double, 3 >
voidmyBVHSet1
 
voidmyBVHSet2
 

Detailed Description

Enables storing of individual overlapped triangles (useful for debug).

Tool class for for detection of overlapping of two BVH primitive sets. This tool is not intended to be used independently, and is integrated in other classes, implementing algorithms based on shape tessellation (BRepExtrema_ShapeProximity and BRepExtrema_SelfIntersection).

Note that input element sets may correspond to different shapes or to the same shape. In first case, tessellations of two given shapes will be tested for intersection (or overlapping, if tolerance is not zero). In second case, tessellation of single shape will be tested for self- intersections. Please note that algorithm results are approximate and depend greatly on the quality of input tessellation(s).

Constructor & Destructor Documentation

◆ BRepExtrema_OverlapTool() [1/2]

BRepExtrema_OverlapTool::BRepExtrema_OverlapTool ( )

Creates new uninitialized overlap tool.

◆ BRepExtrema_OverlapTool() [2/2]

BRepExtrema_OverlapTool::BRepExtrema_OverlapTool ( const occ::handle< BRepExtrema_TriangleSet > & theSet1,
const occ::handle< BRepExtrema_TriangleSet > & theSet2 )

Creates new overlap tool for the given element sets.

Member Function Documentation

◆ Accept()

bool BRepExtrema_OverlapTool::Accept ( const int theLeaf1,
const int theLeaf2 )
overridevirtual

Defines the rules for leaf acceptance.

Implements BVH_PairTraverse< double, 3 >.

◆ intersectTrianglesExact()

void BRepExtrema_OverlapTool::intersectTrianglesExact ( const int theTrgIdx1,
const int theTrgIdx2 )
protected

Performs narrow-phase of overlap test (exact intersection).

◆ intersectTrianglesToler()

void BRepExtrema_OverlapTool::intersectTrianglesToler ( const int theTrgIdx1,
const int theTrgIdx2,
const double theToler )
protected

Performs narrow-phase of overlap test (intersection with non-zero tolerance).

◆ IsDone()

bool BRepExtrema_OverlapTool::IsDone ( ) const
inline

Is overlap test completed?

◆ LoadTriangleSets()

void BRepExtrema_OverlapTool::LoadTriangleSets ( const occ::handle< BRepExtrema_TriangleSet > & theSet1,
const occ::handle< BRepExtrema_TriangleSet > & theSet2 )

Loads the given element sets into the overlap tool.

◆ MarkDirty()

void BRepExtrema_OverlapTool::MarkDirty ( )
inline

Marks test results as outdated.

◆ OverlapSubShapes1()

const NCollection_DataMap< int, TColStd_PackedMapOfInteger > & BRepExtrema_OverlapTool::OverlapSubShapes1 ( ) const
inline

Returns set of overlapped sub-shapes of 1st shape (currently only faces are detected).

◆ OverlapSubShapes2()

const NCollection_DataMap< int, TColStd_PackedMapOfInteger > & BRepExtrema_OverlapTool::OverlapSubShapes2 ( ) const
inline

Returns set of overlapped sub-shapes of 2nd shape (currently only faces are detected).

◆ Perform()

void BRepExtrema_OverlapTool::Perform ( const double theTolerance = 0.0)

Performs searching of overlapped mesh elements.

◆ RejectNode()

bool BRepExtrema_OverlapTool::RejectNode ( const BVH_Vec3d & theCornerMin1,
const BVH_Vec3d & theCornerMax1,
const BVH_Vec3d & theCornerMin2,
const BVH_Vec3d & theCornerMax2,
double &  ) const
override

Set of all mesh elements (triangles) of the 1st shape.

◆ SetElementFilter()

void BRepExtrema_OverlapTool::SetElementFilter ( BRepExtrema_ElementFilter * theFilter)
inline

Sets filtering tool for preliminary checking pairs of mesh elements.


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