Open CASCADE Technology  7.3.0
Public Member Functions
ProjLib_ComputeApprox Class Reference

Approximate the projection of a 3d curve on an analytic surface and stores the result in Approx. The result is a 2d curve. For approximation some parameters are used, including required tolerance of approximation. Tolerance is maximal possible value of 3d deviation of 3d projection of projected curve from "exact" 3d projection. Since algorithm searches 2d curve on surface, required 2d tolerance is computed from 3d tolerance with help of U,V resolutions of surface. 3d and 2d tolerances have sence only for curves on surface, it defines precision of projecting and approximation and have nothing to do with distance between the projected curve and the surface. More...

#include <ProjLib_ComputeApprox.hxx>

Public Member Functions

 ProjLib_ComputeApprox ()
 Empty constructor, it only sets some initial values for class fields. More...
 
 ProjLib_ComputeApprox (const Handle< Adaptor3d_HCurve > &C, const Handle< Adaptor3d_HSurface > &S, const Standard_Real Tol)
 <Tol> is the tolerance with which the approximation is performed. Other parameters for approximation have default values. More...
 
void Perform (const Handle< Adaptor3d_HCurve > &C, const Handle< Adaptor3d_HSurface > &S)
 Performs projecting. In case of approximation current values of parameters are used: default values or set by corresponding methods Set... More...
 
void SetTolerance (const Standard_Real theTolerance)
 Set tolerance of approximation. Default value is Precision::Confusion(). More...
 
void SetDegree (const Standard_Integer theDegMin, const Standard_Integer theDegMax)
 Set min and max possible degree of result BSpline curve2d, which is got by approximation. If theDegMin/Max < 0, algorithm uses values that are chosen depending of types curve 3d and surface. More...
 
void SetMaxSegments (const Standard_Integer theMaxSegments)
 Set the parameter, which defines maximal value of parametric intervals the projected curve can be cut for approximation. If theMaxSegments < 0, algorithm uses default value = 1000. More...
 
void SetBndPnt (const AppParCurves_Constraint theBndPnt)
 Set the parameter, which defines type of boundary condition between segments during approximation. It can be AppParCurves_PassPoint or AppParCurves_TangencyPoint. Default value is AppParCurves_TangencyPoint;. More...
 
Handle< Geom2d_BSplineCurveBSpline () const
 
Handle< Geom2d_BezierCurveBezier () const
 
Standard_Real Tolerance () const
 returns the reached Tolerance. More...
 

Detailed Description

Approximate the projection of a 3d curve on an analytic surface and stores the result in Approx. The result is a 2d curve. For approximation some parameters are used, including required tolerance of approximation. Tolerance is maximal possible value of 3d deviation of 3d projection of projected curve from "exact" 3d projection. Since algorithm searches 2d curve on surface, required 2d tolerance is computed from 3d tolerance with help of U,V resolutions of surface. 3d and 2d tolerances have sence only for curves on surface, it defines precision of projecting and approximation and have nothing to do with distance between the projected curve and the surface.

Constructor & Destructor Documentation

◆ ProjLib_ComputeApprox() [1/2]

ProjLib_ComputeApprox::ProjLib_ComputeApprox ( )

Empty constructor, it only sets some initial values for class fields.

◆ ProjLib_ComputeApprox() [2/2]

ProjLib_ComputeApprox::ProjLib_ComputeApprox ( const Handle< Adaptor3d_HCurve > &  C,
const Handle< Adaptor3d_HSurface > &  S,
const Standard_Real  Tol 
)

<Tol> is the tolerance with which the approximation is performed. Other parameters for approximation have default values.

Member Function Documentation

◆ Bezier()

Handle< Geom2d_BezierCurve > ProjLib_ComputeApprox::Bezier ( ) const

◆ BSpline()

Handle< Geom2d_BSplineCurve > ProjLib_ComputeApprox::BSpline ( ) const

◆ Perform()

void ProjLib_ComputeApprox::Perform ( const Handle< Adaptor3d_HCurve > &  C,
const Handle< Adaptor3d_HSurface > &  S 
)

Performs projecting. In case of approximation current values of parameters are used: default values or set by corresponding methods Set...

◆ SetBndPnt()

void ProjLib_ComputeApprox::SetBndPnt ( const AppParCurves_Constraint  theBndPnt)

Set the parameter, which defines type of boundary condition between segments during approximation. It can be AppParCurves_PassPoint or AppParCurves_TangencyPoint. Default value is AppParCurves_TangencyPoint;.

◆ SetDegree()

void ProjLib_ComputeApprox::SetDegree ( const Standard_Integer  theDegMin,
const Standard_Integer  theDegMax 
)

Set min and max possible degree of result BSpline curve2d, which is got by approximation. If theDegMin/Max < 0, algorithm uses values that are chosen depending of types curve 3d and surface.

◆ SetMaxSegments()

void ProjLib_ComputeApprox::SetMaxSegments ( const Standard_Integer  theMaxSegments)

Set the parameter, which defines maximal value of parametric intervals the projected curve can be cut for approximation. If theMaxSegments < 0, algorithm uses default value = 1000.

◆ SetTolerance()

void ProjLib_ComputeApprox::SetTolerance ( const Standard_Real  theTolerance)

Set tolerance of approximation. Default value is Precision::Confusion().

◆ Tolerance()

Standard_Real ProjLib_ComputeApprox::Tolerance ( ) const

returns the reached Tolerance.


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