Open CASCADE Technology  7.7.0
Public Member Functions
CPnts_UniformDeflection Class Reference

This class defines an algorithm to create a set of points (with a given chordal deviation) at the positions of constant deflection of a given parametrized curve or a trimmed circle. The continuity of the curve must be at least C2. More...

#include <CPnts_UniformDeflection.hxx>

Public Member Functions

 CPnts_UniformDeflection ()
 creation of a indefinite UniformDeflection More...
 
 CPnts_UniformDeflection (const Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real Resolution, const Standard_Boolean WithControl)
 Computes a uniform deflection distribution of points on the curve . <Deflection> defines the constant deflection value. The algorithm computes the number of points and the points. The curve must be at least C2 else the computation can fail. If just some parts of the curve is C2 it is better to give the parameters bounds and to use the below constructor . if <WithControl> is True, the algorithm controls the estimate deflection when the curve is singular at the point P(u),the algorithm computes the next point as P(u + Max(CurrentStep,Abs(LastParameter-FirstParameter))) if the singularity is at the first point ,the next point calculated is the P(LastParameter) More...
 
 CPnts_UniformDeflection (const Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real Resolution, const Standard_Boolean WithControl)
 As above with 2d curve. More...
 
 CPnts_UniformDeflection (const Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Real Resolution, const Standard_Boolean WithControl)
 Computes an uniform deflection distribution of points on a part of the curve . Deflection defines the step between the points. <U1> and <U2> define the distribution span. <U1> and <U2> must be in the parametric range of the curve. More...
 
 CPnts_UniformDeflection (const Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Real Resolution, const Standard_Boolean WithControl)
 As above with 2d curve. More...
 
void Initialize (const Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real Resolution, const Standard_Boolean WithControl)
 Initialize the algorithms with , <Deflection>, <UStep>, <Resolution> and <WithControl> More...
 
void Initialize (const Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real Resolution, const Standard_Boolean WithControl)
 Initialize the algorithms with , <Deflection>, <UStep>, <Resolution> and <WithControl> More...
 
void Initialize (const Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Real Resolution, const Standard_Boolean WithControl)
 Initialize the algorithms with , <Deflection>, <UStep>, <U1>, <U2> and <WithControl> More...
 
void Initialize (const Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Real Resolution, const Standard_Boolean WithControl)
 Initialize the algorithms with , <Deflection>, <UStep>, <U1>, <U2> and <WithControl> More...
 
Standard_Boolean IsAllDone () const
 To know if all the calculus were done successfully (ie all the points have been computed). The calculus can fail if the Curve is not C1 in the considered domain. Returns True if the calculus was successful. More...
 
void Next ()
 go to the next Point. More...
 
Standard_Boolean More ()
 returns True if it exists a next Point. More...
 
Standard_Real Value () const
 return the computed parameter More...
 
gp_Pnt Point () const
 return the computed parameter More...
 

Detailed Description

This class defines an algorithm to create a set of points (with a given chordal deviation) at the positions of constant deflection of a given parametrized curve or a trimmed circle. The continuity of the curve must be at least C2.

the usage of the is the following.

class myUniformDFeflection instantiates UniformDeflection(Curve, Tool);

Curve C; // Curve inherits from Curve or Curve2d from Adaptor2d myUniformDeflection Iter1; DefPntOfmyUniformDeflection P;

for(Iter1.Initialize(C, Deflection, EPSILON, True); Iter1.More(); Iter1.Next()) { P = Iter1.Value(); ... make something with P } if(!Iter1.IsAllDone()) { ... something wrong happened }

Constructor & Destructor Documentation

◆ CPnts_UniformDeflection() [1/5]

CPnts_UniformDeflection::CPnts_UniformDeflection ( )

creation of a indefinite UniformDeflection

◆ CPnts_UniformDeflection() [2/5]

CPnts_UniformDeflection::CPnts_UniformDeflection ( const Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

Computes a uniform deflection distribution of points on the curve . <Deflection> defines the constant deflection value. The algorithm computes the number of points and the points. The curve must be at least C2 else the computation can fail. If just some parts of the curve is C2 it is better to give the parameters bounds and to use the below constructor . if <WithControl> is True, the algorithm controls the estimate deflection when the curve is singular at the point P(u),the algorithm computes the next point as P(u + Max(CurrentStep,Abs(LastParameter-FirstParameter))) if the singularity is at the first point ,the next point calculated is the P(LastParameter)

◆ CPnts_UniformDeflection() [3/5]

CPnts_UniformDeflection::CPnts_UniformDeflection ( const Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

As above with 2d curve.

◆ CPnts_UniformDeflection() [4/5]

CPnts_UniformDeflection::CPnts_UniformDeflection ( const Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

Computes an uniform deflection distribution of points on a part of the curve . Deflection defines the step between the points. <U1> and <U2> define the distribution span. <U1> and <U2> must be in the parametric range of the curve.

◆ CPnts_UniformDeflection() [5/5]

CPnts_UniformDeflection::CPnts_UniformDeflection ( const Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

As above with 2d curve.

Member Function Documentation

◆ Initialize() [1/4]

void CPnts_UniformDeflection::Initialize ( const Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

Initialize the algorithms with , <Deflection>, <UStep>, <Resolution> and <WithControl>

◆ Initialize() [2/4]

void CPnts_UniformDeflection::Initialize ( const Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

Initialize the algorithms with , <Deflection>, <UStep>, <Resolution> and <WithControl>

◆ Initialize() [3/4]

void CPnts_UniformDeflection::Initialize ( const Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

Initialize the algorithms with , <Deflection>, <UStep>, <U1>, <U2> and <WithControl>

◆ Initialize() [4/4]

void CPnts_UniformDeflection::Initialize ( const Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Real  Resolution,
const Standard_Boolean  WithControl 
)

Initialize the algorithms with , <Deflection>, <UStep>, <U1>, <U2> and <WithControl>

◆ IsAllDone()

Standard_Boolean CPnts_UniformDeflection::IsAllDone ( ) const

To know if all the calculus were done successfully (ie all the points have been computed). The calculus can fail if the Curve is not C1 in the considered domain. Returns True if the calculus was successful.

◆ More()

Standard_Boolean CPnts_UniformDeflection::More ( )

returns True if it exists a next Point.

◆ Next()

void CPnts_UniformDeflection::Next ( )

go to the next Point.

◆ Point()

gp_Pnt CPnts_UniformDeflection::Point ( ) const

return the computed parameter

◆ Value()

Standard_Real CPnts_UniformDeflection::Value ( ) const

return the computed parameter


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