![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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 * std::cos(U) * Xdir + MinorRadius * std::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>

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. | |
| Convert_EllipseToBSplineCurve (const gp_Elips2d &E, const double U1, const double 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. | |
Public Member Functions inherited from Convert_ConicToBSplineCurve | |
| int | Degree () const |
| Returns the degree of the BSpline curve whose data is computed in this framework. | |
| int | NbPoles () const |
| Returns the number of poles of the BSpline curve whose data is computed in this framework. | |
| int | NbKnots () const |
| Returns the number of knots of the BSpline curve whose data is computed in this framework. | |
| bool | IsPeriodic () const |
| Returns true if the BSpline curve whose data is computed in this framework is periodic. | |
| gp_Pnt2d | Pole (const int theIndex) const |
| Returns the pole of index Index to the poles table of the BSpline curve whose data is computed in this framework. | |
| double | Weight (const int theIndex) 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. | |
| double | Knot (const int theIndex) const |
| Returns the knot of index Index to the knots table of the BSpline curve whose data is computed in this framework. | |
| int | Multiplicity (const int theIndex) 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. | |
| const NCollection_Array1< gp_Pnt2d > & | Poles () const |
| Returns the poles of the BSpline curve. | |
| const NCollection_Array1< double > & | Weights () const |
| Returns the weights of the BSpline curve. | |
| const NCollection_Array1< double > & | Knots () const |
| Returns the knots of the BSpline curve. | |
| const NCollection_Array1< int > & | Multiplicities () const |
| Returns the multiplicities of the BSpline curve. | |
| void | BuildCosAndSin (const Convert_ParameterisationType theParametrisation, occ::handle< NCollection_HArray1< double > > &theCosNumerator, occ::handle< NCollection_HArray1< double > > &theSinNumerator, occ::handle< NCollection_HArray1< double > > &theDenominator, int &theDegree, occ::handle< NCollection_HArray1< double > > &theKnots, occ::handle< NCollection_HArray1< int > > &theMults) const |
| Legacy API returning handle arrays for compatibility. | |
| void | BuildCosAndSin (const Convert_ParameterisationType theParametrisation, const double theUFirst, const double theULast, occ::handle< NCollection_HArray1< double > > &theCosNumerator, occ::handle< NCollection_HArray1< double > > &theSinNumerator, occ::handle< NCollection_HArray1< double > > &theDenominator, int &theDegree, occ::handle< NCollection_HArray1< double > > &theKnots, occ::handle< NCollection_HArray1< int > > &theMults) const |
| Legacy API returning handle arrays for compatibility. | |
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 * std::cos(U) * Xdir + MinorRadius * std::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 .
| 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 double | U1, | ||
| const double | 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