OCC Main Page | ModelingAlgorithms | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ModelingAlgorithms
TKTopAlgo
BRepExtrema


BRepExtrema_DistShapeShape Class Reference

This class provides tools to compute minimum distance
between two Shapes (Compound,CompSolid, Solid, Shell, Face, Wire, Edge, Vertex).
.

#include <BRepExtrema_DistShapeShape.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT BRepExtrema_DistShapeShape ()
 create empty brepextrema

Standard_EXPORT BRepExtrema_DistShapeShape (const TopoDS_Shape &Shape1, const TopoDS_Shape &Shape2)
 computation of the minimum distance (value and
couple of points) using default deflection

Standard_EXPORT BRepExtrema_DistShapeShape (const TopoDS_Shape &Shape1, const TopoDS_Shape &Shape2, const Standard_Real theDeflection)
 Creates brepextrema and load both shapes into it
Default value is Precision::Confusion().
.
Standard_EXPORT void SetDeflection (const Standard_Real theDeflection)
Standard_EXPORT void LoadS1 (const TopoDS_Shape &Shape1)
 load first shape into extrema

Standard_EXPORT void LoadS2 (const TopoDS_Shape &Shape1)
 load second shape into extrema

Standard_EXPORT Standard_Boolean Perform ()
 computation of the minimum distance (value and
couple of points). Parameter theDeflection is used
to specify a maximum deviation of extreme distances
from the minimum one.
Returns IsDone status.

Standard_EXPORT Standard_Boolean IsDone () const
 True if the minimum distance is found.
.
Standard_EXPORT Standard_Integer NbSolution () const
 Returns the number of solutions satisfying the minimum
distance.
.
Standard_EXPORT Standard_Real Value () const
 Returns the value of the minimum distance.
.
Standard_EXPORT Standard_Boolean InnerSolution () const
 True if one of the shapes is a solid and the
other shape is completely or partially inside the solid.
.
Standard_EXPORT gp_Pnt PointOnShape1 (const Standard_Integer N) const
 Returns the Point corresponding to the <n>th
solution on the first Shape
.
Standard_EXPORT gp_Pnt PointOnShape2 (const Standard_Integer N) const
 Returns the Point corresponding to the <n>th
solution on the second Shape
.
Standard_EXPORT BRepExtrema_SupportType SupportTypeShape1 (const Standard_Integer N) const
 gives the type of the support where the Nth
solution on the first shape is situated:
IsVertex :
=> the Nth solution on the first shape is a Vertex
IsOnEdge
=> the Nth soluion on the first shape is on a Edge
IsInFace
=> the Nth solution on the first shape is inside a
face

the corresponding support is obtained by the
method SupportOnShape1

Standard_EXPORT BRepExtrema_SupportType SupportTypeShape2 (const Standard_Integer N) const
 gives the type of the support where the Nth
solution on the second shape is situated:
IsVertex :
=> the Nth solution on the second shape is a Vertex
IsOnEdge
=> the Nth soluion on the secondt shape is on a Edge
IsInFace
=> the Nth solution on the second shape is inside a
face

the support is obtained by the method SupportOnShape2

Standard_EXPORT TopoDS_Shape SupportOnShape1 (const Standard_Integer N) const
 gives the support where the Nth
solution on the first shape is situated.
This support can be a Vertex, an Edge or a Face.

Standard_EXPORT TopoDS_Shape SupportOnShape2 (const Standard_Integer N) const
 gives the support where the Nth
solution on the second shape is situated.
This support can be a Vertex, an Edge or a Face.

Standard_EXPORT void ParOnEdgeS1 (const Standard_Integer N, Standard_Real &t) const
 gives the corresponding parameter t if the Nth
Solution is situated on an Egde of the first shape

Standard_EXPORT void ParOnEdgeS2 (const Standard_Integer N, Standard_Real &t) const
 gives the corresponding parameter t if the Nth
Solution is situated on an Egde of the first shape

Standard_EXPORT void ParOnFaceS1 (const Standard_Integer N, Standard_Real &u, Standard_Real &v) const
 gives the corresponding parameters (U,V) if the Nth
Solution is situated on an face of the first shape

Standard_EXPORT void ParOnFaceS2 (const Standard_Integer N, Standard_Real &u, Standard_Real &v) const
 gives the corresponding parameters (U,V) if the Nth
Solution is situated on an Face of the second shape

Standard_EXPORT void Dump (Standard_OStream &o) const
 Prints on the stream o information on the current state
of the object.

.

Private Member Functions

Standard_EXPORT void DistanceMapMap (const TopTools_IndexedMapOfShape &Map1, const TopTools_IndexedMapOfShape &Map2, const Bnd_SeqOfBox &LBox1, const Bnd_SeqOfBox &LBox2)
 computes the minimum distance between two map of
shapes(Face,Edge,Vertex)


Private Attributes

Standard_Integer myNbSolution
Standard_Real myDistRef
Standard_Real myDistValue
Standard_Boolean myIsDone
BRepExtrema_SeqOfSolution ListeDeSolutionShape1
BRepExtrema_SeqOfSolution ListeDeSolutionShape2
Standard_Boolean myInnerSol
Standard_Real myEps
TopoDS_Shape myShape1
TopoDS_Shape myShape2
TopTools_IndexedMapOfShape myMapV1
TopTools_IndexedMapOfShape myMapV2
TopTools_IndexedMapOfShape myMapE1
TopTools_IndexedMapOfShape myMapE2
TopTools_IndexedMapOfShape myMapF1
TopTools_IndexedMapOfShape myMapF2


Constructor & Destructor Documentation

Standard_EXPORT BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape  ) 
 

Standard_EXPORT BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape const TopoDS_Shape &  Shape1,
const TopoDS_Shape &  Shape2
 

Standard_EXPORT BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape const TopoDS_Shape &  Shape1,
const TopoDS_Shape &  Shape2,
const Standard_Real  theDeflection
 


Member Function Documentation

Standard_EXPORT void BRepExtrema_DistShapeShape::DistanceMapMap const TopTools_IndexedMapOfShape &  Map1,
const TopTools_IndexedMapOfShape &  Map2,
const Bnd_SeqOfBox &  LBox1,
const Bnd_SeqOfBox &  LBox2
[private]
 

Standard_EXPORT void BRepExtrema_DistShapeShape::Dump Standard_OStream &  o  )  const
 

Standard_EXPORT Standard_Boolean BRepExtrema_DistShapeShape::InnerSolution  )  const
 

Standard_EXPORT Standard_Boolean BRepExtrema_DistShapeShape::IsDone  )  const
 

Standard_EXPORT void BRepExtrema_DistShapeShape::LoadS1 const TopoDS_Shape &  Shape1  ) 
 

Standard_EXPORT void BRepExtrema_DistShapeShape::LoadS2 const TopoDS_Shape &  Shape1  ) 
 

Standard_EXPORT Standard_Integer BRepExtrema_DistShapeShape::NbSolution  )  const
 

void BRepExtrema_DistShapeShape::operator delete void *  anAddress  )  [inline]
 

void* BRepExtrema_DistShapeShape::operator new size_t  size  )  [inline]
 

void* BRepExtrema_DistShapeShape::operator new size_t  ,
void *  anAddress
[inline]
 

Standard_EXPORT void BRepExtrema_DistShapeShape::ParOnEdgeS1 const Standard_Integer  N,
Standard_Real &  t
const
 

Standard_EXPORT void BRepExtrema_DistShapeShape::ParOnEdgeS2 const Standard_Integer  N,
Standard_Real &  t
const
 

Standard_EXPORT void BRepExtrema_DistShapeShape::ParOnFaceS1 const Standard_Integer  N,
Standard_Real &  u,
Standard_Real &  v
const
 

Standard_EXPORT void BRepExtrema_DistShapeShape::ParOnFaceS2 const Standard_Integer  N,
Standard_Real &  u,
Standard_Real &  v
const
 

Standard_EXPORT Standard_Boolean BRepExtrema_DistShapeShape::Perform  ) 
 

Standard_EXPORT gp_Pnt BRepExtrema_DistShapeShape::PointOnShape1 const Standard_Integer  N  )  const
 

Standard_EXPORT gp_Pnt BRepExtrema_DistShapeShape::PointOnShape2 const Standard_Integer  N  )  const
 

Standard_EXPORT void BRepExtrema_DistShapeShape::SetDeflection const Standard_Real  theDeflection  ) 
 

Standard_EXPORT TopoDS_Shape BRepExtrema_DistShapeShape::SupportOnShape1 const Standard_Integer  N  )  const
 

Standard_EXPORT TopoDS_Shape BRepExtrema_DistShapeShape::SupportOnShape2 const Standard_Integer  N  )  const
 

Standard_EXPORT BRepExtrema_SupportType BRepExtrema_DistShapeShape::SupportTypeShape1 const Standard_Integer  N  )  const
 

Standard_EXPORT BRepExtrema_SupportType BRepExtrema_DistShapeShape::SupportTypeShape2 const Standard_Integer  N  )  const
 

Standard_EXPORT Standard_Real BRepExtrema_DistShapeShape::Value  )  const
 


Field Documentation

BRepExtrema_SeqOfSolution BRepExtrema_DistShapeShape::ListeDeSolutionShape1 [private]
 

BRepExtrema_SeqOfSolution BRepExtrema_DistShapeShape::ListeDeSolutionShape2 [private]
 

Standard_Real BRepExtrema_DistShapeShape::myDistRef [private]
 

Standard_Real BRepExtrema_DistShapeShape::myDistValue [private]
 

Standard_Real BRepExtrema_DistShapeShape::myEps [private]
 

Standard_Boolean BRepExtrema_DistShapeShape::myInnerSol [private]
 

Standard_Boolean BRepExtrema_DistShapeShape::myIsDone [private]
 

TopTools_IndexedMapOfShape BRepExtrema_DistShapeShape::myMapE1 [private]
 

TopTools_IndexedMapOfShape BRepExtrema_DistShapeShape::myMapE2 [private]
 

TopTools_IndexedMapOfShape BRepExtrema_DistShapeShape::myMapF1 [private]
 

TopTools_IndexedMapOfShape BRepExtrema_DistShapeShape::myMapF2 [private]
 

TopTools_IndexedMapOfShape BRepExtrema_DistShapeShape::myMapV1 [private]
 

TopTools_IndexedMapOfShape BRepExtrema_DistShapeShape::myMapV2 [private]
 

Standard_Integer BRepExtrema_DistShapeShape::myNbSolution [private]
 

TopoDS_Shape BRepExtrema_DistShapeShape::myShape1 [private]
 

TopoDS_Shape BRepExtrema_DistShapeShape::myShape2 [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:41:10 2008 for OpenCASCADE by  doxygen 1.4.1