Open CASCADE Technology  7.4.0
Public Member Functions | Protected Member Functions

Extrema_ExtCC Class Reference

It calculates all the distance between two curves. These distances can be maximum or minimum. More...

#include <Extrema_ExtCC.hxx>

Public Member Functions

 Extrema_ExtCC (const Standard_Real TolC1=1.0e-10, const Standard_Real TolC2=1.0e-10)
 
 Extrema_ExtCC (const Adaptor3d_Curve &C1, const Adaptor3d_Curve &C2, const Standard_Real TolC1=1.0e-10, const Standard_Real TolC2=1.0e-10)
 It calculates all the distances. More...
 
 Extrema_ExtCC (const Adaptor3d_Curve &C1, const Adaptor3d_Curve &C2, const Standard_Real U1, const Standard_Real U2, const Standard_Real V1, const Standard_Real V2, const Standard_Real TolC1=1.0e-10, const Standard_Real TolC2=1.0e-10)
 It calculates all the distances. More...
 
void SetCurve (const Standard_Integer theRank, const Adaptor3d_Curve &C)
 
void SetCurve (const Standard_Integer theRank, const Adaptor3d_Curve &C, const Standard_Real Uinf, const Standard_Real Usup)
 
void SetRange (const Standard_Integer theRank, const Standard_Real Uinf, const Standard_Real Usup)
 
void SetTolerance (const Standard_Integer theRank, const Standard_Real Tol)
 
void Perform ()
 
Standard_Boolean IsDone () const
 Returns True if the distances are found. More...
 
Standard_Integer NbExt () const
 Returns the number of extremum distances. More...
 
Standard_Boolean IsParallel () const
 Returns True if the two curves are parallel. More...
 
Standard_Real SquareDistance (const Standard_Integer N=1) const
 Returns the value of the Nth extremum square distance. More...
 
void Points (const Standard_Integer N, Extrema_POnCurv &P1, Extrema_POnCurv &P2) const
 Returns the points of the Nth extremum distance. P1 is on the first curve, P2 on the second one. More...
 
void TrimmedSquareDistances (Standard_Real &dist11, Standard_Real &distP12, Standard_Real &distP21, Standard_Real &distP22, gp_Pnt &P11, gp_Pnt &P12, gp_Pnt &P21, gp_Pnt &P22) const
 if the curve is a trimmed curve, dist11 is a square distance between the point on C1 of parameter FirstParameter and the point of parameter FirstParameter on C2. More...
 
void SetSingleSolutionFlag (const Standard_Boolean theSingleSolutionFlag)
 Set flag for single extrema computation. Works on parametric solver only. More...
 
Standard_Boolean GetSingleSolutionFlag () const
 Get flag for single extrema computation. Works on parametric solver only. More...
 

Protected Member Functions

void PrepareResults (const Extrema_ExtElC &AlgExt, const Standard_Boolean theIsInverse, const Standard_Real Ut11, const Standard_Real Ut12, const Standard_Real Ut21, const Standard_Real Ut22)
 Prepares the extrema result(s) for analytical cases (line, circle, ellipsis etc.) More...
 
void PrepareResults (const Extrema_ECC &AlgExt, const Standard_Real Ut11, const Standard_Real Ut12, const Standard_Real Ut21, const Standard_Real Ut22)
 Prepares the extrema result(s) for general cases (e.g. with B-spline curves). More...
 
void PrepareParallelResult (const Standard_Real theUt11, const Standard_Real theUt12, const Standard_Real theUt21, const Standard_Real theUt22, const Standard_Real theSqDist)
 Prepares the extrema result(s) in case when the given curves are parallel. More...
 
void ClearSolutions ()
 

Detailed Description

It calculates all the distance between two curves. These distances can be maximum or minimum.

Constructor & Destructor Documentation

◆ Extrema_ExtCC() [1/3]

Extrema_ExtCC::Extrema_ExtCC ( const Standard_Real  TolC1 = 1.0e-10,
const Standard_Real  TolC2 = 1.0e-10 
)

◆ Extrema_ExtCC() [2/3]

Extrema_ExtCC::Extrema_ExtCC ( const Adaptor3d_Curve C1,
const Adaptor3d_Curve C2,
const Standard_Real  TolC1 = 1.0e-10,
const Standard_Real  TolC2 = 1.0e-10 
)

It calculates all the distances.

◆ Extrema_ExtCC() [3/3]

Extrema_ExtCC::Extrema_ExtCC ( const Adaptor3d_Curve C1,
const Adaptor3d_Curve C2,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Real  V1,
const Standard_Real  V2,
const Standard_Real  TolC1 = 1.0e-10,
const Standard_Real  TolC2 = 1.0e-10 
)

It calculates all the distances.

Member Function Documentation

◆ ClearSolutions()

void Extrema_ExtCC::ClearSolutions ( )
inlineprotected

◆ GetSingleSolutionFlag()

Standard_Boolean Extrema_ExtCC::GetSingleSolutionFlag ( ) const

Get flag for single extrema computation. Works on parametric solver only.

◆ IsDone()

Standard_Boolean Extrema_ExtCC::IsDone ( ) const

Returns True if the distances are found.

◆ IsParallel()

Standard_Boolean Extrema_ExtCC::IsParallel ( ) const

Returns True if the two curves are parallel.

◆ NbExt()

Standard_Integer Extrema_ExtCC::NbExt ( ) const

Returns the number of extremum distances.

◆ Perform()

void Extrema_ExtCC::Perform ( )

◆ Points()

void Extrema_ExtCC::Points ( const Standard_Integer  N,
Extrema_POnCurv P1,
Extrema_POnCurv P2 
) const

Returns the points of the Nth extremum distance. P1 is on the first curve, P2 on the second one.

◆ PrepareParallelResult()

void Extrema_ExtCC::PrepareParallelResult ( const Standard_Real  theUt11,
const Standard_Real  theUt12,
const Standard_Real  theUt21,
const Standard_Real  theUt22,
const Standard_Real  theSqDist 
)
protected

Prepares the extrema result(s) in case when the given curves are parallel.

◆ PrepareResults() [1/2]

void Extrema_ExtCC::PrepareResults ( const Extrema_ExtElC AlgExt,
const Standard_Boolean  theIsInverse,
const Standard_Real  Ut11,
const Standard_Real  Ut12,
const Standard_Real  Ut21,
const Standard_Real  Ut22 
)
protected

Prepares the extrema result(s) for analytical cases (line, circle, ellipsis etc.)

◆ PrepareResults() [2/2]

void Extrema_ExtCC::PrepareResults ( const Extrema_ECC AlgExt,
const Standard_Real  Ut11,
const Standard_Real  Ut12,
const Standard_Real  Ut21,
const Standard_Real  Ut22 
)
protected

Prepares the extrema result(s) for general cases (e.g. with B-spline curves).

◆ SetCurve() [1/2]

void Extrema_ExtCC::SetCurve ( const Standard_Integer  theRank,
const Adaptor3d_Curve C 
)

◆ SetCurve() [2/2]

void Extrema_ExtCC::SetCurve ( const Standard_Integer  theRank,
const Adaptor3d_Curve C,
const Standard_Real  Uinf,
const Standard_Real  Usup 
)

◆ SetRange()

void Extrema_ExtCC::SetRange ( const Standard_Integer  theRank,
const Standard_Real  Uinf,
const Standard_Real  Usup 
)

◆ SetSingleSolutionFlag()

void Extrema_ExtCC::SetSingleSolutionFlag ( const Standard_Boolean  theSingleSolutionFlag)

Set flag for single extrema computation. Works on parametric solver only.

◆ SetTolerance()

void Extrema_ExtCC::SetTolerance ( const Standard_Integer  theRank,
const Standard_Real  Tol 
)

◆ SquareDistance()

Standard_Real Extrema_ExtCC::SquareDistance ( const Standard_Integer  N = 1) const

Returns the value of the Nth extremum square distance.

◆ TrimmedSquareDistances()

void Extrema_ExtCC::TrimmedSquareDistances ( Standard_Real dist11,
Standard_Real distP12,
Standard_Real distP21,
Standard_Real distP22,
gp_Pnt P11,
gp_Pnt P12,
gp_Pnt P21,
gp_Pnt P22 
) const

if the curve is a trimmed curve, dist11 is a square distance between the point on C1 of parameter FirstParameter and the point of parameter FirstParameter on C2.


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