0024023: Revamp the OCCT Handle -- general
[occt.git] / src / Geom / Geom_Conic.cdl
1 -- Created on: 1993-03-10
2 -- Created by: JCV
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 deferred class Conic from Geom inherits Curve from Geom
18
19         ---Purpose : The abstract class Conic describes the common
20         -- behavior of conic curves in 3D space and, in
21         -- particular, their general characteristics. The Geom
22         -- package provides four concrete classes of conics:
23         -- Geom_Circle, Geom_Ellipse, Geom_Hyperbola and Geom_Parabola.
24         -- A conic is positioned in space with a right-handed
25         -- coordinate system (gp_Ax2 object), where:
26         -- - the origin is the center of the conic (or the apex in
27         --   the case of a parabola),
28         -- - the origin, "X Direction" and "Y Direction" define the
29         --   plane of the conic.
30         -- This coordinate system is the local coordinate
31         -- system of the conic.
32         -- The "main Direction" of this coordinate system is the
33         -- vector normal to the plane of the conic. The axis, of
34         -- which the origin and unit vector are respectively the
35         -- origin and "main Direction" of the local coordinate
36         -- system, is termed the "Axis" or "main Axis" of the conic.
37         -- The "main Direction" of the local coordinate system
38         -- gives an explicit orientation to the conic, determining
39         -- the direction in which the parameter increases along
40         -- the conic. The "X Axis" of the local coordinate system
41         -- also defines the origin of the parameter of the conic.
42       
43
44 uses  Ax1   from gp, 
45       Ax2   from gp, 
46       Pnt   from gp, 
47       Vec   from gp,
48       Shape from GeomAbs
49
50
51 raises ConstructionError from Standard,
52        RangeError        from Standard,
53        DomainError       from Standard
54
55 is
56
57   SetAxis (me : mutable; A1 : Ax1)
58         ---Purpose : Changes the orientation of the conic's plane. The normal
59         --  axis to the plane is A1. The XAxis and the YAxis are recomputed.
60      raises ConstructionError;
61         ---Purpose :
62         --  raised if the A1 is parallel to the XAxis of the conic.
63
64
65   SetLocation (me : mutable; P : Pnt);
66         ---Purpose : changes the location point of the conic.
67
68
69   SetPosition (me : mutable; A2 : Ax2);
70         ---Purpose : changes the local coordinate system of the conic.
71
72
73   Axis (me)  returns Ax1;
74         ---Purpose : Returns the "main Axis" of this conic. This axis is
75         -- normal to the plane of the conic.
76      
77
78   Eccentricity (me)  returns Real
79         ---Purpose :
80         --  Returns the eccentricity value of the conic e.
81         --  e = 0 for a circle
82         --  0 < e < 1 for an ellipse  (e = 0 if MajorRadius = MinorRadius)
83         --  e > 1 for a hyperbola
84         --  e = 1 for a parabola
85         --  Exceptions
86         -- Standard_DomainError in the case of a hyperbola if
87         -- its major radius is null.
88      raises DomainError
89      is deferred;
90
91
92   Location (me)  returns Pnt;
93         ---Purpose :
94         --  Returns the location point of the conic.
95         --  For the circle, the ellipse and the hyperbola it is the center of
96         --  the conic. For the parabola it is the Apex of the parabola.
97
98
99   Position (me)   returns Ax2;
100         ---Purpose :
101         --  Returns the local coordinates system of the conic.
102         --  The main direction of the Axis2Placement is normal to the
103         --  plane of the conic. The X direction of the Axis2placement
104         --  is in the plane of the conic and corresponds to the origin 
105         --  for the conic's parametric value u.
106         ---C++: return const&
107
108
109   XAxis (me)  returns Ax1;
110         ---Purpose :
111         -- Returns the XAxis of the conic.
112         -- This axis defines the origin of parametrization of the conic.
113         -- This axis is perpendicular to the Axis of the conic.
114         -- This axis and the Yaxis define the plane of the conic.
115
116
117   YAxis (me)  returns Ax1;
118         ---Purpose :
119         --  Returns the YAxis of the conic.
120         --  The YAxis is perpendicular to the Xaxis.
121         --  This axis and the Xaxis define the plane of the conic.
122           
123
124   Reverse (me : mutable);
125         ---Purpose :
126         --  Reverses the direction of parameterization of <me>.
127         --  The local coordinate system of the conic is modified.
128
129
130   ReversedParameter(me; U : Real) returns Real
131         ---Purpose: Returns the  parameter on the  reversed  curve for
132         --          the point of parameter U on <me>.
133         --          
134   is deferred;
135
136
137   Continuity (me)   returns Shape from GeomAbs;
138         ---Purpose : The continuity of the conic is Cn.
139         
140   IsCN (me; N : Integer) returns Boolean
141         ---Purpose : Returns True. 
142      raises RangeError;
143         ---Purpose : Raised if N < 0.
144
145 fields
146
147   pos : Ax2 is protected;
148
149 end;
150