Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Convert / Convert_EllipseToBSplineCurve.cdl
1 -- File:         EllipseToBSplineCurve.cdl
2 -- Created:      Thu Oct 10 14:38:50 1991
3 -- Author:       Jean Claude VAUTHIER
4 ---Copyright:    Matra Datavision 1991, 1992
5
6
7
8
9
10 class EllipseToBSplineCurve   from Convert   inherits ConicToBSplineCurve
11
12         --- Purpose :
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 :
16         --  P (U) = 
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].
21         --- KeyWords :
22         --  Convert, Ellipse, BSplineCurve, 2D .
23
24 uses Elips2d              from gp,
25      ParameterisationType from Convert
26
27 raises DomainError from Standard
28
29 is
30
31   Create (E : Elips2d;
32            Parameterisation : ParameterisationType from Convert 
33             = Convert_TgtThetaOver2 )   returns EllipseToBSplineCurve;
34         --- Purpose : The equivalent B-spline curve has the same orientation
35         --  as the ellipse E.
36
37
38   Create (E : Elips2d; U1, U2 : Real;
39            Parameterisation : ParameterisationType from Convert 
40             = Convert_TgtThetaOver2 )   returns EllipseToBSplineCurve
41         --- Purpose : 
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.
45      raises DomainError;
46         --- Purpose :
47         --  Raised if U1 = U2 or U1 = U2 + 2.0 * Pi
48
49
50
51 end EllipseToBSplineCurve;
52