Open CASCADE Technology  7.0.0
Public Member Functions

Convert_EllipseToBSplineCurve Class Reference

This algorithm converts a ellipse into a rational B-spline curve. The ellipse is represented an Elips2d from package gp with the parametrization : P (U) = Loc + (MajorRadius * Cos(U) * Xdir + MinorRadius * Sin(U) * Ydir) where Loc is the center of the ellipse, Xdir and Ydir are the normalized directions of the local cartesian coordinate system of the ellipse. The parametrization range is U [0, 2PI]. KeyWords : Convert, Ellipse, BSplineCurve, 2D . More...

#include <Convert_EllipseToBSplineCurve.hxx>

Inheritance diagram for Convert_EllipseToBSplineCurve:
Inheritance graph
[legend]

Public Member Functions

 Convert_EllipseToBSplineCurve (const gp_Elips2d &E, const Convert_ParameterisationType Parameterisation=Convert_TgtThetaOver2)
 The equivalent B-spline curve has the same orientation as the ellipse E. More...
 
 Convert_EllipseToBSplineCurve (const gp_Elips2d &E, const Standard_Real U1, const Standard_Real U2, const Convert_ParameterisationType Parameterisation=Convert_TgtThetaOver2)
 The ellipse E is limited between the parametric values U1, U2. The equivalent B-spline curve is oriented from U1 to U2 and has the same orientation as E. 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 ellipse into a rational B-spline curve. The ellipse is represented an Elips2d from package gp with the parametrization : P (U) = Loc + (MajorRadius * Cos(U) * Xdir + MinorRadius * Sin(U) * Ydir) where Loc is the center of the ellipse, Xdir and Ydir are the normalized directions of the local cartesian coordinate system of the ellipse. The parametrization range is U [0, 2PI]. KeyWords : Convert, Ellipse, BSplineCurve, 2D .

Constructor & Destructor Documentation

Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve ( const gp_Elips2d E,
const Convert_ParameterisationType  Parameterisation = Convert_TgtThetaOver2 
)

The equivalent B-spline curve has the same orientation as the ellipse E.

Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve ( const gp_Elips2d E,
const Standard_Real  U1,
const Standard_Real  U2,
const Convert_ParameterisationType  Parameterisation = Convert_TgtThetaOver2 
)

The ellipse E is limited between the parametric values U1, U2. The equivalent B-spline curve is oriented from U1 to U2 and has the same orientation as E.

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


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