Open CASCADE Technology  7.0.0
Public Member Functions

Convert_CircleToBSplineCurve Class Reference

This algorithm converts a circle into a rational B-spline curve. The circle is a Circ2d from package gp and its parametrization is : P (U) = Loc + R * (Cos(U) * Xdir + Sin(U) * YDir) where Loc is the center of the circle Xdir and Ydir are the normalized directions of the local cartesian coordinate system of the circle. The parametrization range for the circle is U [0, 2Pi]. More...

#include <Convert_CircleToBSplineCurve.hxx>

Inheritance diagram for Convert_CircleToBSplineCurve:
Inheritance graph
[legend]

Public Member Functions

 Convert_CircleToBSplineCurve (const gp_Circ2d &C, const Convert_ParameterisationType Parameterisation=Convert_TgtThetaOver2)
 The equivalent B-spline curve has the same orientation as the circle C. More...
 
 Convert_CircleToBSplineCurve (const gp_Circ2d &C, const Standard_Real U1, const Standard_Real U2, const Convert_ParameterisationType Parameterisation=Convert_TgtThetaOver2)
 The circle C is limited between the parametric values U1, U2 in radians. U1 and U2 [0.0, 2*Pi] . The equivalent B-spline curve is oriented from U1 to U2 and has the same orientation as the circle C. More...
 
- Public Member Functions inherited from Convert_ConicToBSplineCurve
Standard_Integer Degree () const
 Returns the degree of the BSpline curve whose data is computed in this framework. More...
 
Standard_Integer NbPoles () const
 Returns the number of poles of the BSpline curve whose data is computed in this framework. More...
 
Standard_Integer NbKnots () const
 Returns the number of knots of the BSpline curve whose data is computed in this framework. More...
 
Standard_Boolean IsPeriodic () const
 Returns true if the BSpline curve whose data is computed in this framework is periodic. More...
 
gp_Pnt2d Pole (const Standard_Integer Index) const
 Returns the pole of index Index to the poles table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table of the BSpline curve whose data is computed in this framework. More...
 
Standard_Real Weight (const Standard_Integer Index) const
 Returns the weight of the pole of index Index to the poles table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table of the BSpline curve whose data is computed in this framework. More...
 
Standard_Real Knot (const Standard_Integer Index) const
 Returns the knot of index Index to the knots table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of the BSpline curve whose data is computed in this framework. More...
 
Standard_Integer Multiplicity (const Standard_Integer Index) const
 Returns the multiplicity of the knot of index Index to the knots table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of the BSpline curve whose data is computed in this framework. More...
 
void BuildCosAndSin (const Convert_ParameterisationType Parametrisation, Handle< TColStd_HArray1OfReal > &CosNumerator, Handle< TColStd_HArray1OfReal > &SinNumerator, Handle< TColStd_HArray1OfReal > &Denominator, Standard_Integer &Degree, Handle< TColStd_HArray1OfReal > &Knots, Handle< TColStd_HArray1OfInteger > &Mults) const
 
void BuildCosAndSin (const Convert_ParameterisationType Parametrisation, const Standard_Real UFirst, const Standard_Real ULast, Handle< TColStd_HArray1OfReal > &CosNumerator, Handle< TColStd_HArray1OfReal > &SinNumerator, Handle< TColStd_HArray1OfReal > &Denominator, Standard_Integer &Degree, Handle< TColStd_HArray1OfReal > &Knots, Handle< TColStd_HArray1OfInteger > &Mults) const
 

Additional Inherited Members

- Protected Member Functions inherited from Convert_ConicToBSplineCurve
 Convert_ConicToBSplineCurve (const Standard_Integer NumberOfPoles, const Standard_Integer NumberOfKnots, const Standard_Integer Degree)
 
- Protected Attributes inherited from Convert_ConicToBSplineCurve
Handle< TColgp_HArray1OfPnt2d > poles
 
Handle< TColStd_HArray1OfReal > weights
 
Handle< TColStd_HArray1OfReal > knots
 
Handle< TColStd_HArray1OfInteger > mults
 
Standard_Integer degree
 
Standard_Integer nbPoles
 
Standard_Integer nbKnots
 
Standard_Boolean isperiodic
 

Detailed Description

This algorithm converts a circle into a rational B-spline curve. The circle is a Circ2d from package gp and its parametrization is : P (U) = Loc + R * (Cos(U) * Xdir + Sin(U) * YDir) where Loc is the center of the circle Xdir and Ydir are the normalized directions of the local cartesian coordinate system of the circle. The parametrization range for the circle is U [0, 2Pi].

Warnings : The parametrization range for the B-spline curve is not [0, 2Pi].

KeyWords : Convert, Circle, BSplineCurve, 2D .

Constructor & Destructor Documentation

Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve ( const gp_Circ2d C,
const Convert_ParameterisationType  Parameterisation = Convert_TgtThetaOver2 
)

The equivalent B-spline curve has the same orientation as the circle C.

Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve ( const gp_Circ2d C,
const Standard_Real  U1,
const Standard_Real  U2,
const Convert_ParameterisationType  Parameterisation = Convert_TgtThetaOver2 
)

The circle C is limited between the parametric values U1, U2 in radians. U1 and U2 [0.0, 2*Pi] . The equivalent B-spline curve is oriented from U1 to U2 and has the same orientation as the circle C.

Raised if U1 = U2 or U1 = U2 + 2.0 * Pi


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