Open CASCADE Technology 7.8.2.dev
BRepExtrema_DistShapeShape Class Reference

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

#include <BRepExtrema_DistShapeShape.hxx>

Public Member Functions

 BRepExtrema_DistShapeShape ()
 create empty tool
 
 BRepExtrema_DistShapeShape (const TopoDS_Shape &Shape1, const TopoDS_Shape &Shape2, const Extrema_ExtFlag F=Extrema_ExtFlag_MINMAX, const Extrema_ExtAlgo A=Extrema_ExtAlgo_Grad, const Message_ProgressRange &theRange=Message_ProgressRange())
 create tool and computation of the minimum distance (value and pair of points) using default deflection in single thread mode.
Default deflection value is Precision::Confusion().

 
 BRepExtrema_DistShapeShape (const TopoDS_Shape &Shape1, const TopoDS_Shape &Shape2, const Standard_Real theDeflection, const Extrema_ExtFlag F=Extrema_ExtFlag_MINMAX, const Extrema_ExtAlgo A=Extrema_ExtAlgo_Grad, const Message_ProgressRange &theRange=Message_ProgressRange())
 create tool and computation of the minimum distance (value and pair of points) in single thread mode.
Default deflection value is Precision::Confusion().

 
void SetDeflection (const Standard_Real theDeflection)
 Sets deflection to computation of the minimum distance

 
void LoadS1 (const TopoDS_Shape &Shape1)
 load first shape into extrema

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

 
Standard_Boolean Perform (const Message_ProgressRange &theRange=Message_ProgressRange())
 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.
theRange - the progress indicator of algorithm
 
Standard_Boolean IsDone () const
 True if the minimum distance is found.

 
Standard_Integer NbSolution () const
 Returns the number of solutions satisfying the minimum distance.

 
Standard_Real Value () const
 Returns the value of the minimum distance.

 
Standard_Boolean InnerSolution () const
 True if one of the shapes is a solid and the other shape
is completely or partially inside the solid.

 
const gp_PntPointOnShape1 (const Standard_Integer N) const
 Returns the Point corresponding to the <N>th solution on the first Shape

 
const gp_PntPointOnShape2 (const Standard_Integer N) const
 Returns the Point corresponding to the <N>th solution on the second Shape

 
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

 
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 corresponding support is obtained by the method SupportOnShape2

 
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.

 
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.

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

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

 
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

 
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

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

 
void SetFlag (const Extrema_ExtFlag F)
 Sets unused parameter Obsolete.
 
void SetAlgo (const Extrema_ExtAlgo A)
 Sets unused parameter Obsolete.
 
void SetMultiThread (Standard_Boolean theIsMultiThread)
 If isMultiThread == Standard_True then computation will be performed in parallel.
 
Standard_Boolean IsMultiThread () const
 Returns Standard_True then computation will be performed in parallel Default value is Standard_False.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ BRepExtrema_DistShapeShape() [1/3]

BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape ( )

create empty tool

◆ BRepExtrema_DistShapeShape() [2/3]

BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape ( const TopoDS_Shape & Shape1,
const TopoDS_Shape & Shape2,
const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX,
const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad,
const Message_ProgressRange & theRange = Message_ProgressRange() )

create tool and computation of the minimum distance (value and pair of points) using default deflection in single thread mode.
Default deflection value is Precision::Confusion().

Parameters
Shape1- the first shape for distance computation
Shape2- the second shape for distance computation
Fand
Aare not used in computation and are obsolete.
theRange- the progress indicator of algorithm

◆ BRepExtrema_DistShapeShape() [3/3]

BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape ( const TopoDS_Shape & Shape1,
const TopoDS_Shape & Shape2,
const Standard_Real theDeflection,
const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX,
const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad,
const Message_ProgressRange & theRange = Message_ProgressRange() )

create tool and computation of the minimum distance (value and pair of points) in single thread mode.
Default deflection value is Precision::Confusion().

Parameters
Shape1- the first shape for distance computation
Shape2- the second shape for distance computation
theDeflection- the presition of distance computation
Fand
Aare not used in computation and are obsolete.
theRange- the progress indicator of algorithm

Member Function Documentation

◆ Dump()

void BRepExtrema_DistShapeShape::Dump ( Standard_OStream & o) const

Prints on the stream o information on the current state of the object.

◆ InnerSolution()

Standard_Boolean BRepExtrema_DistShapeShape::InnerSolution ( ) const
inline

True if one of the shapes is a solid and the other shape
is completely or partially inside the solid.

◆ IsDone()

Standard_Boolean BRepExtrema_DistShapeShape::IsDone ( ) const
inline

True if the minimum distance is found.

◆ IsMultiThread()

Standard_Boolean BRepExtrema_DistShapeShape::IsMultiThread ( ) const
inline

Returns Standard_True then computation will be performed in parallel Default value is Standard_False.

◆ LoadS1()

void BRepExtrema_DistShapeShape::LoadS1 ( const TopoDS_Shape & Shape1)

load first shape into extrema

◆ LoadS2()

void BRepExtrema_DistShapeShape::LoadS2 ( const TopoDS_Shape & Shape1)

load second shape into extrema

◆ NbSolution()

Standard_Integer BRepExtrema_DistShapeShape::NbSolution ( ) const
inline

Returns the number of solutions satisfying the minimum distance.

◆ ParOnEdgeS1()

void BRepExtrema_DistShapeShape::ParOnEdgeS1 ( const Standard_Integer N,
Standard_Real & t ) const

gives the corresponding parameter t if the Nth solution
is situated on an Edge of the first shape

◆ ParOnEdgeS2()

void BRepExtrema_DistShapeShape::ParOnEdgeS2 ( const Standard_Integer N,
Standard_Real & t ) const

gives the corresponding parameter t if the Nth solution
is situated on an Edge of the first shape

◆ ParOnFaceS1()

void BRepExtrema_DistShapeShape::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

◆ ParOnFaceS2()

void BRepExtrema_DistShapeShape::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

◆ Perform()

Standard_Boolean BRepExtrema_DistShapeShape::Perform ( const Message_ProgressRange & theRange = Message_ProgressRange())

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.
theRange - the progress indicator of algorithm

◆ PointOnShape1()

const gp_Pnt & BRepExtrema_DistShapeShape::PointOnShape1 ( const Standard_Integer N) const
inline

Returns the Point corresponding to the <N>th solution on the first Shape

◆ PointOnShape2()

const gp_Pnt & BRepExtrema_DistShapeShape::PointOnShape2 ( const Standard_Integer N) const
inline

Returns the Point corresponding to the <N>th solution on the second Shape

◆ SetAlgo()

void BRepExtrema_DistShapeShape::SetAlgo ( const Extrema_ExtAlgo A)
inline

Sets unused parameter Obsolete.

◆ SetDeflection()

void BRepExtrema_DistShapeShape::SetDeflection ( const Standard_Real theDeflection)
inline

Sets deflection to computation of the minimum distance

◆ SetFlag()

void BRepExtrema_DistShapeShape::SetFlag ( const Extrema_ExtFlag F)
inline

Sets unused parameter Obsolete.

◆ SetMultiThread()

void BRepExtrema_DistShapeShape::SetMultiThread ( Standard_Boolean theIsMultiThread)
inline

If isMultiThread == Standard_True then computation will be performed in parallel.

◆ SupportOnShape1()

TopoDS_Shape BRepExtrema_DistShapeShape::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.

◆ SupportOnShape2()

TopoDS_Shape BRepExtrema_DistShapeShape::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.

◆ SupportTypeShape1()

BRepExtrema_SupportType BRepExtrema_DistShapeShape::SupportTypeShape1 ( const Standard_Integer N) const
inline

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

◆ SupportTypeShape2()

BRepExtrema_SupportType BRepExtrema_DistShapeShape::SupportTypeShape2 ( const Standard_Integer N) const
inline

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 corresponding support is obtained by the method SupportOnShape2

◆ Value()

Standard_Real BRepExtrema_DistShapeShape::Value ( ) const

Returns the value of the minimum distance.


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