Open CASCADE Technology
7.1.0.beta

Tool class for shape proximity detection. For two given shapes and given tolerance (offset from the mesh) the algorithm allows to determine whether or not they are overlapped. The algorithm input consists of any shapes which can be decomposed into individual faces (used as basic shape elements). High performance is achieved through the use of existing triangulation of faces. So poly triangulation (with the desired deflection) should already be built. Note that solution is approximate (and corresponds to the deflection used for triangulation). More...
#include <BRepExtrema_ShapeProximity.hxx>
Public Member Functions  
BRepExtrema_ShapeProximity (const Standard_Real theTolerance=0.0)  
Creates empty proximity tool. More...  
BRepExtrema_ShapeProximity (const TopoDS_Shape &theShape1, const TopoDS_Shape &theShape2, const Standard_Real theTolerance=0.0)  
Creates proximity tool for the given two shapes. More...  
Standard_Real  Tolerance () const 
Returns tolerance value for overlap test (distance between shapes). More...  
void  SetTolerance (const Standard_Real theTolerance) 
Sets tolerance value for overlap test (distance between shapes). More...  
Standard_Boolean  LoadShape1 (const TopoDS_Shape &theShape1) 
Loads 1st shape into proximity tool. More...  
Standard_Boolean  LoadShape2 (const TopoDS_Shape &theShape2) 
Loads 2nd shape into proximity tool. More...  
void  Perform () 
Performs search of overlapped faces. More...  
Standard_Boolean  IsDone () const 
True if the search is completed. More...  
const BRepExtrema_MapOfIntegerPackedMapOfInteger &  OverlapSubShapes1 () const 
Returns set of IDs of overlapped faces of 1st shape (started from 0). More...  
const BRepExtrema_MapOfIntegerPackedMapOfInteger &  OverlapSubShapes2 () const 
Returns set of IDs of overlapped faces of 2nd shape (started from 0). More...  
const TopoDS_Face &  GetSubShape1 (const Standard_Integer theID) const 
Returns subshape from 1st shape with the given index (started from 0). More...  
const TopoDS_Face &  GetSubShape2 (const Standard_Integer theID) const 
Returns subshape from 1st shape with the given index (started from 0). More...  
const Handle< BRepExtrema_TriangleSet > &  ElementSet1 () const 
Returns set of all the face triangles of the 1st shape. More...  
const Handle< BRepExtrema_TriangleSet > &  ElementSet2 () const 
Returns set of all the face triangles of the 2nd shape. More...  
Tool class for shape proximity detection. For two given shapes and given tolerance (offset from the mesh) the algorithm allows to determine whether or not they are overlapped. The algorithm input consists of any shapes which can be decomposed into individual faces (used as basic shape elements). High performance is achieved through the use of existing triangulation of faces. So poly triangulation (with the desired deflection) should already be built. Note that solution is approximate (and corresponds to the deflection used for triangulation).
The algorithm can be run in two modes. If tolerance is set to zero, the algorithm will detect only intersecting faces (containing triangles with common points). If tolerance is set to positive value, the algorithm will also detect faces located on distance less than the given tolerance from each other.
BRepExtrema_ShapeProximity::BRepExtrema_ShapeProximity  (  const Standard_Real  theTolerance = 0.0  ) 
Creates empty proximity tool.
BRepExtrema_ShapeProximity::BRepExtrema_ShapeProximity  (  const TopoDS_Shape &  theShape1, 
const TopoDS_Shape &  theShape2,  
const Standard_Real  theTolerance = 0.0 

) 
Creates proximity tool for the given two shapes.

inline 
Returns set of all the face triangles of the 1st shape.

inline 
Returns set of all the face triangles of the 2nd shape.

inline 
Returns subshape from 1st shape with the given index (started from 0).

inline 
Returns subshape from 1st shape with the given index (started from 0).

inline 
True if the search is completed.
Standard_Boolean BRepExtrema_ShapeProximity::LoadShape1  (  const TopoDS_Shape &  theShape1  ) 
Loads 1st shape into proximity tool.
Standard_Boolean BRepExtrema_ShapeProximity::LoadShape2  (  const TopoDS_Shape &  theShape2  ) 
Loads 2nd shape into proximity tool.

inline 
Returns set of IDs of overlapped faces of 1st shape (started from 0).

inline 
Returns set of IDs of overlapped faces of 2nd shape (started from 0).
void BRepExtrema_ShapeProximity::Perform  (  ) 
Performs search of overlapped faces.

inline 
Sets tolerance value for overlap test (distance between shapes).

inline 
Returns tolerance value for overlap test (distance between shapes).