1 -- Created on: 1993-03-24
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 deferred class Conic from Geom2d inherits Curve from Geom2d
25 --- Purpose : The abstract class Conic describes the common
26 -- behavior of conic curves in 2D space and, in
27 -- particular, their general characteristics. The Geom2d
28 -- package provides four specific classes of conics:
29 -- Geom2d_Circle, Geom2d_Ellipse,
30 -- Geom2d_Hyperbola and Geom2d_Parabola.
31 -- A conic is positioned in the plane with a coordinate
32 -- system (gp_Ax22d object), where the origin is the
33 -- center of the conic (or the apex in case of a parabola).
34 -- This coordinate system is the local coordinate
35 -- system of the conic. It gives the conic an explicit
36 -- orientation, determining the direction in which the
37 -- parameter increases along the conic. The "X Axis" of
38 -- the local coordinate system also defines the origin of
39 -- the parameter of the conic.
48 raises ConstructionError from Standard,
49 DomainError from Standard
55 SetAxis (me: mutable; A: Ax22d);
57 ---Purpose: Modifies this conic, redefining its local coordinate system
58 -- partially, by assigning P as its origin
60 SetXAxis (me : mutable; A : Ax2d);
63 SetYAxis (me : mutable; A : Ax2d);
64 ---Purpose: Assigns the origin and unit vector of axis A to the
65 -- origin of the local coordinate system of this conic and either:
66 -- - its "X Direction", or
67 -- - its "Y Direction".
68 -- The other unit vector of the local coordinate system
69 -- of this conic is recomputed normal to A, without
70 -- changing the orientation of the local coordinate
71 -- system (right-handed or left-handed).
73 SetLocation (me : mutable; P : Pnt2d);
74 --- Purpose : Modifies this conic, redefining its local coordinate
75 -- system fully, by assigning A as this coordinate system.
78 XAxis (me) returns Ax2d;
80 -- Returns the "XAxis" of the conic.
81 -- This axis defines the origin of parametrization of the conic.
82 -- This axis and the "Yaxis" define the local coordinate system
84 -- -C++: return const&
87 YAxis (me) returns Ax2d;
89 -- Returns the "YAxis" of the conic.
90 -- The "YAxis" is perpendicular to the "Xaxis".
93 Eccentricity (me) returns Real
95 -- returns the eccentricity value of the conic e.
97 -- 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius)
98 -- e > 1 for a hyperbola
99 -- e = 1 for a parabola
104 Location (me) returns Pnt2d;
106 -- Returns the location point of the conic.
107 -- For the circle, the ellipse and the hyperbola it is the center of
108 -- the conic. For the parabola it is the vertex of the parabola.
112 Position (me) returns Ax22d;
114 -- Returns the local coordinates system of the conic.
115 ---C++: return const&
118 Reverse (me : mutable);
120 -- Reverses the direction of parameterization of <me>.
121 -- The local coordinate system of the conic is modified.
124 ReversedParameter(me; U : Real) returns Real
125 ---Purpose: Returns the parameter on the reversed curve for
126 -- the point of parameter U on <me>.
131 Continuity (me) returns Shape from GeomAbs;
132 --- Purpose : Returns GeomAbs_CN which is the global continuity of any conic.
135 IsCN (me; N : Integer) returns Boolean;
137 -- Returns True, the order of continuity of a conic is infinite.
145 pos : Ax22d is protected;