Open CASCADE Technology  7.3.0
Public Member Functions | Static Public Member Functions
GCPnts_TangentialDeflection Class Reference

Computes a set of points on a curve from package Adaptor3d such as between two successive points P1(u1)and P2(u2) : More...

#include <GCPnts_TangentialDeflection.hxx>

Public Member Functions

 GCPnts_TangentialDeflection ()
 
 GCPnts_TangentialDeflection (const Adaptor3d_Curve &C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
 GCPnts_TangentialDeflection (const Adaptor3d_Curve &C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
 GCPnts_TangentialDeflection (const Adaptor2d_Curve2d &C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
 GCPnts_TangentialDeflection (const Adaptor2d_Curve2d &C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
void Initialize (const Adaptor3d_Curve &C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
void Initialize (const Adaptor3d_Curve &C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
void Initialize (const Adaptor2d_Curve2d &C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
void Initialize (const Adaptor2d_Curve2d &C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints=2, const Standard_Real UTol=1.0e-9, const Standard_Real theMinLen=1.0e-7)
 
Standard_Integer AddPoint (const gp_Pnt &thePnt, const Standard_Real theParam, const Standard_Boolean theIsReplace=Standard_True)
 Add point to already calculated points (or replace existing) Returns index of new added point or founded with parametric tolerance (replaced if theIsReplace is true) More...
 
Standard_Integer NbPoints () const
 
Standard_Real Parameter (const Standard_Integer I) const
 
gp_Pnt Value (const Standard_Integer I) const
 

Static Public Member Functions

static Standard_Real ArcAngularStep (const Standard_Real theRadius, const Standard_Real theLinearDeflection, const Standard_Real theAngularDeflection, const Standard_Real theMinLength)
 Computes angular step for the arc using the given parameters. More...
 

Detailed Description

Computes a set of points on a curve from package Adaptor3d such as between two successive points P1(u1)and P2(u2) :

. ||P1P3^P3P2||/||P1P3||*||P3P2||<AngularDeflection . ||P1P2^P1P3||/||P1P2||<CurvatureDeflection

where P3 is the point of abscissa ((u1+u2)/2), with u1 the abscissa of the point P1 and u2 the abscissa of the point P2.

^ is the cross product of two vectors, and ||P1P2|| the magnitude of the vector P1P2.

The conditions AngularDeflection > gp::Resolution() and CurvatureDeflection > gp::Resolution() must be satisfied at the construction time.

A minimum number of points can be fixed for a linear or circular element. Example: Handle(Geom_BezierCurve) C = new Geom_BezierCurve (Poles); GeomAdaptor_Curve Curve (C); Real CDeflect = 0.01; //Curvature deflection Real ADeflect = 0.09; //Angular deflection

GCPnts_TangentialDeflection PointsOnCurve; PointsOnCurve.Initialize (Curve, ADeflect, CDeflect);

Real U; gp_Pnt P; for (Integer i=1; i<=PointsOnCurve.NbPoints();i++) { U = PointsOnCurve.Parameter (i); P = PointsOnCurve.Value (i); }

Constructor & Destructor Documentation

◆ GCPnts_TangentialDeflection() [1/5]

GCPnts_TangentialDeflection::GCPnts_TangentialDeflection ( )

◆ GCPnts_TangentialDeflection() [2/5]

GCPnts_TangentialDeflection::GCPnts_TangentialDeflection ( const Adaptor3d_Curve C,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

◆ GCPnts_TangentialDeflection() [3/5]

GCPnts_TangentialDeflection::GCPnts_TangentialDeflection ( const Adaptor3d_Curve C,
const Standard_Real  FirstParameter,
const Standard_Real  LastParameter,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

◆ GCPnts_TangentialDeflection() [4/5]

GCPnts_TangentialDeflection::GCPnts_TangentialDeflection ( const Adaptor2d_Curve2d C,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

◆ GCPnts_TangentialDeflection() [5/5]

GCPnts_TangentialDeflection::GCPnts_TangentialDeflection ( const Adaptor2d_Curve2d C,
const Standard_Real  FirstParameter,
const Standard_Real  LastParameter,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

Member Function Documentation

◆ AddPoint()

Standard_Integer GCPnts_TangentialDeflection::AddPoint ( const gp_Pnt thePnt,
const Standard_Real  theParam,
const Standard_Boolean  theIsReplace = Standard_True 
)

Add point to already calculated points (or replace existing) Returns index of new added point or founded with parametric tolerance (replaced if theIsReplace is true)

◆ ArcAngularStep()

static Standard_Real GCPnts_TangentialDeflection::ArcAngularStep ( const Standard_Real  theRadius,
const Standard_Real  theLinearDeflection,
const Standard_Real  theAngularDeflection,
const Standard_Real  theMinLength 
)
static

Computes angular step for the arc using the given parameters.

◆ Initialize() [1/4]

void GCPnts_TangentialDeflection::Initialize ( const Adaptor3d_Curve C,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

◆ Initialize() [2/4]

void GCPnts_TangentialDeflection::Initialize ( const Adaptor3d_Curve C,
const Standard_Real  FirstParameter,
const Standard_Real  LastParameter,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

◆ Initialize() [3/4]

void GCPnts_TangentialDeflection::Initialize ( const Adaptor2d_Curve2d C,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

◆ Initialize() [4/4]

void GCPnts_TangentialDeflection::Initialize ( const Adaptor2d_Curve2d C,
const Standard_Real  FirstParameter,
const Standard_Real  LastParameter,
const Standard_Real  AngularDeflection,
const Standard_Real  CurvatureDeflection,
const Standard_Integer  MinimumOfPoints = 2,
const Standard_Real  UTol = 1.0e-9,
const Standard_Real  theMinLen = 1.0e-7 
)

◆ NbPoints()

Standard_Integer GCPnts_TangentialDeflection::NbPoints ( ) const
inline

◆ Parameter()

Standard_Real GCPnts_TangentialDeflection::Parameter ( const Standard_Integer  I) const
inline

◆ Value()

gp_Pnt GCPnts_TangentialDeflection::Value ( const Standard_Integer  I) const
inline

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