1 -- File: EllipseToBSplineCurve.cdl
2 -- Created: Thu Oct 10 14:38:50 1991
3 -- Author: Jean Claude VAUTHIER
4 ---Copyright: Matra Datavision 1991, 1992
10 class EllipseToBSplineCurve from Convert inherits ConicToBSplineCurve
13 -- This algorithm converts a ellipse into a rational B-spline curve.
14 -- The ellipse is represented an Elips2d from package gp with
15 -- the parametrization :
17 -- Loc + (MajorRadius * Cos(U) * Xdir + MinorRadius * Sin(U) * Ydir)
18 -- where Loc is the center of the ellipse, Xdir and Ydir are the
19 -- normalized directions of the local cartesian coordinate system of
20 -- the ellipse. The parametrization range is U [0, 2PI].
22 -- Convert, Ellipse, BSplineCurve, 2D .
25 ParameterisationType from Convert
27 raises DomainError from Standard
32 Parameterisation : ParameterisationType from Convert
33 = Convert_TgtThetaOver2 ) returns EllipseToBSplineCurve;
34 --- Purpose : The equivalent B-spline curve has the same orientation
38 Create (E : Elips2d; U1, U2 : Real;
39 Parameterisation : ParameterisationType from Convert
40 = Convert_TgtThetaOver2 ) returns EllipseToBSplineCurve
42 -- The ellipse E is limited between the parametric values U1, U2.
43 -- The equivalent B-spline curve is oriented from U1 to U2 and has
44 -- the same orientation as E.
47 -- Raised if U1 = U2 or U1 = U2 + 2.0 * Pi
51 end EllipseToBSplineCurve;