1 -- File: Geom2d_Conic.cdl
2 -- Created: Wed Mar 24 17:59:38 1993
5 -- Copyright: Matra Datavision 1993
7 ---Copyright: Matra Datavision 1991
9 deferred class Conic from Geom2d inherits Curve from Geom2d
11 --- Purpose : The abstract class Conic describes the common
12 -- behavior of conic curves in 2D space and, in
13 -- particular, their general characteristics. The Geom2d
14 -- package provides four specific classes of conics:
15 -- Geom2d_Circle, Geom2d_Ellipse,
16 -- Geom2d_Hyperbola and Geom2d_Parabola.
17 -- A conic is positioned in the plane with a coordinate
18 -- system (gp_Ax22d object), where the origin is the
19 -- center of the conic (or the apex in case of a parabola).
20 -- This coordinate system is the local coordinate
21 -- system of the conic. It gives the conic an explicit
22 -- orientation, determining the direction in which the
23 -- parameter increases along the conic. The "X Axis" of
24 -- the local coordinate system also defines the origin of
25 -- the parameter of the conic.
34 raises ConstructionError from Standard,
35 DomainError from Standard
41 SetAxis (me: mutable; A: Ax22d);
43 ---Purpose: Modifies this conic, redefining its local coordinate system
44 -- partially, by assigning P as its origin
46 SetXAxis (me : mutable; A : Ax2d);
49 SetYAxis (me : mutable; A : Ax2d);
50 ---Purpose: Assigns the origin and unit vector of axis A to the
51 -- origin of the local coordinate system of this conic and either:
52 -- - its "X Direction", or
53 -- - its "Y Direction".
54 -- The other unit vector of the local coordinate system
55 -- of this conic is recomputed normal to A, without
56 -- changing the orientation of the local coordinate
57 -- system (right-handed or left-handed).
59 SetLocation (me : mutable; P : Pnt2d);
60 --- Purpose : Modifies this conic, redefining its local coordinate
61 -- system fully, by assigning A as this coordinate system.
64 XAxis (me) returns Ax2d;
66 -- Returns the "XAxis" of the conic.
67 -- This axis defines the origin of parametrization of the conic.
68 -- This axis and the "Yaxis" define the local coordinate system
70 -- -C++: return const&
73 YAxis (me) returns Ax2d;
75 -- Returns the "YAxis" of the conic.
76 -- The "YAxis" is perpendicular to the "Xaxis".
79 Eccentricity (me) returns Real
81 -- returns the eccentricity value of the conic e.
83 -- 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius)
84 -- e > 1 for a hyperbola
85 -- e = 1 for a parabola
90 Location (me) returns Pnt2d;
92 -- Returns the location point of the conic.
93 -- For the circle, the ellipse and the hyperbola it is the center of
94 -- the conic. For the parabola it is the vertex of the parabola.
98 Position (me) returns Ax22d;
100 -- Returns the local coordinates system of the conic.
101 ---C++: return const&
104 Reverse (me : mutable);
106 -- Reverses the direction of parameterization of <me>.
107 -- The local coordinate system of the conic is modified.
110 ReversedParameter(me; U : Real) returns Real
111 ---Purpose: Returns the parameter on the reversed curve for
112 -- the point of parameter U on <me>.
117 Continuity (me) returns Shape from GeomAbs;
118 --- Purpose : Returns GeomAbs_CN which is the global continuity of any conic.
121 IsCN (me; N : Integer) returns Boolean;
123 -- Returns True, the order of continuity of a conic is infinite.
131 pos : Ax22d is protected;