0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / Geom / Geom_Parabola.cdl
CommitLineData
b311480e 1-- Created on: 1993-03-10
2-- Created by: JCV
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class Parabola from Geom inherits Conic from Geom
18
19 ---Purpose : Describes a parabola in 3D space.
20 -- A parabola is defined by its focal length (i.e. the
21 -- distance between its focus and its apex) and is
22 -- positioned in space with a coordinate system
23 -- (gp_Ax2 object) where:
24 -- - the origin is the apex of the parabola,
25 -- - the "X Axis" defines the axis of symmetry; the
26 -- parabola is on the positive side of this axis,
27 -- - the origin, "X Direction" and "Y Direction" define the
28 -- plane of the parabola.
29 -- This coordinate system is the local coordinate
30 -- system of the parabola.
31 -- The "main Direction" of this coordinate system is a
32 -- vector normal to the plane of the parabola. The axis,
33 -- of which the origin and unit vector are respectively the
34 -- origin and "main Direction" of the local coordinate
35 -- system, is termed the "Axis" or "main Axis" of the parabola.
36 -- The "main Direction" of the local coordinate system
37 -- gives an explicit orientation to the parabola,
38 -- determining the direction in which the parameter
39 -- increases along the parabola.
40 -- The Geom_Parabola parabola is parameterized as follows:
41 -- P(U) = O + U*U/(4.*F)*XDir + U*YDir
42 -- where:
43 -- - P is the point of parameter U,
44 -- - O, XDir and YDir are respectively the origin, "X
45 -- Direction" and "Y Direction" of its local coordinate system,
46 -- - F is the focal length of the parabola.
47 -- The parameter of the parabola is therefore its Y
48 -- coordinate in the local coordinate system, with the "X
49 -- Axis" of the local coordinate system defining the origin
50 -- of the parameter.
51 -- The parameter range is ] -infinite, +infinite [.
52
53uses Ax1 from gp,
54 Ax2 from gp,
55 Parab from gp,
56 Pnt from gp,
57 Trsf from gp,
58 Vec from gp,
59 Geometry from Geom
60
61raises ConstructionError from Standard,
62 RangeError from Standard
63
64
65is
66
67
6e33d3ce 68 Create (Prb : Parab) returns Parabola;
7fd59977 69 ---Purpose : Creates a parabola from a non transient one.
70
71
6e33d3ce 72 Create (A2 : Ax2; Focal : Real) returns Parabola
7fd59977 73 ---Purpose :
74 -- Creates a parabola with its local coordinate system "A2"
75 -- and it's focal length "Focal".
76 -- The XDirection of A2 defines the axis of symmetry of the
77 -- parabola. The YDirection of A2 is parallel to the directrix
78 -- of the parabola. The Location point of A2 is the vertex of
79 -- the parabola
80 raises ConstructionError;
81 ---Purpose : Raised if Focal < 0.0
82
83
6e33d3ce 84 Create (D : Ax1; F : Pnt) returns Parabola;
7fd59977 85 ---Purpose :
86 -- D is the directrix of the parabola and F the focus point.
87 -- The symmetry axis (XAxis) of the parabola is normal to the
88 -- directrix and pass through the focus point F, but its
89 -- location point is the vertex of the parabola.
90 -- The YAxis of the parabola is parallel to D and its location
91 -- point is the vertex of the parabola. The normal to the plane
92 -- of the parabola is the cross product between the XAxis and the
93 -- YAxis.
94
95
96
97 SetFocal (me : mutable; Focal : Real)
98 ---Purpose : Assigns the value Focal to the focal distance of this parabola.
99 -- Exceptions Standard_ConstructionError if Focal is negative.
100 raises ConstructionError
101 is static;
102
103
104 SetParab (me : mutable; Prb : Parab)
105 ---Purpose: Converts the gp_Parab parabola Prb into this parabola.
106
107 is static;
108
109
110 Parab (me) returns Parab
111 ---Purpose :
112 -- Returns the non transient parabola from gp with the same
113 -- geometric properties as <me>.
114 is static;
115
116
117 ReversedParameter(me; U : Real) returns Real is redefined static;
118 ---Purpose: Computes the parameter on the reversed parabola,
119 -- for the point of parameter U on this parabola.
120 -- For a parabola, the returned value is: -U.
121
122
123 FirstParameter (me) returns Real is redefined static;
124 ---Purpose : Returns the value of the first or last parameter of this
125 -- parabola. This is, respectively:
126 -- - Standard_Real::RealFirst(), or
127 -- - Standard_Real::RealLast().
128
129 LastParameter (me) returns Real is redefined static;
130 ---Purpose : Returns the value of the first or last parameter of this
131 -- parabola. This is, respectively:
132 -- - Standard_Real::RealFirst(), or
133 -- - Standard_Real::RealLast().
134
135 IsClosed (me) returns Boolean is redefined static;
136 ---Purpose : Returns False
137
138
139 IsPeriodic (me) returns Boolean is redefined static;
140 ---Purpose : Returns False
141
142
143 Directrix (me) returns Ax1;
144 ---Purpose : Computes the directrix of this parabola.
145 -- This is a line normal to the axis of symmetry, in the
146 -- plane of this parabola, located on the negative side
147 -- of its axis of symmetry, at a distance from the apex
148 -- equal to the focal length.
149 -- The directrix is returned as an axis (gp_Ax1 object),
150 -- where the origin is located on the "X Axis" of this parabola.
151
152
153
154 Eccentricity (me) returns Real is redefined static;
155 ---Purpose : Returns 1. (which is the eccentricity of any parabola).
156
157
158 Focus (me) returns Pnt;
159 ---Purpose: Computes the focus of this parabola. The focus is on the
160 -- positive side of the "X Axis" of the local coordinate
161 -- system of the parabola.
162
163 Focal (me) returns Real;
164 ---Purpose : Computes the focal distance of this parabola
165 -- The focal distance is the distance between the apex
166 -- and the focus of the parabola.
167
168
169 Parameter (me) returns Real;
170 ---Purpose : Computes the parameter of this parabola which is the
171 -- distance between its focus and its directrix. This
172 -- distance is twice the focal length.
173 -- If P is the parameter of the parabola, the equation of
174 -- the parabola in its local coordinate system is: Y**2 = 2.*P*X.
175
176
177
178 D0(me; U : Real; P : out Pnt) is redefined static;
179 ---Purpose: Returns in P the point of parameter U.
180 -- If U = 0 the returned point is the origin of the XAxis and
181 -- the YAxis of the parabola and it is the vertex of the parabola.
182 -- P = S + F * (U * U * XDir + * U * YDir)
183 -- where S is the vertex of the parabola, XDir the XDirection and
184 -- YDir the YDirection of the parabola's local coordinate system.
185
186
187 D1 (me; U : Real; P : out Pnt; V1 : out Vec) is redefined static;
188 ---Purpose :
189 -- Returns the point P of parameter U and the first derivative V1.
190
191
192 D2 (me; U : Real; P : out Pnt; V1, V2 : out Vec) is redefined static;
193 ---Purpose :
194 -- Returns the point P of parameter U, the first and second
195 -- derivatives V1 and V2.
196
197
198 D3 (me; U : Real; P : out Pnt; V1, V2, V3 : out Vec) is redefined static;
199 ---Purpose :
200 -- Returns the point P of parameter U, the first second and third
201 -- derivatives V1 V2 and V3.
202
203
204 DN (me; U : Real; N : Integer) returns Vec
205 ---Purpose : For the point of parameter U of this parabola,
206 -- computes the vector corresponding to the Nth derivative.
207 -- Exceptions Standard_RangeError if N is less than 1.
208 raises RangeError
209 is redefined static;
210
211
212 Transform (me : mutable; T : Trsf) is redefined static;
213 ---Purpose: Applies the transformation T to this parabola.
214
215 TransformedParameter(me; U : Real; T : Trsf from gp) returns Real
216 ---Purpose: Returns the parameter on the transformed curve for
217 -- the transform of the point of parameter U on <me>.
218 --
219 -- me->Transformed(T)->Value(me->TransformedParameter(U,T))
220 --
221 -- is the same point as
222 --
223 -- me->Value(U).Transformed(T)
224 --
225 -- This methods returns <U> * T.ScaleFactor()
226 is redefined static;
227
228 ParametricTransformation(me; T : Trsf from gp) returns Real
229 ---Purpose: Returns a coefficient to compute the parameter on
230 -- the transformed curve for the transform of the
231 -- point on <me>.
232 --
233 -- Transformed(T)->Value(U * ParametricTransformation(T))
234 --
235 -- is the same point as
236 --
237 -- Value(U).Transformed(T)
238 --
239 -- This methods returns T.ScaleFactor()
240 is redefined static;
241
242
6e33d3ce 243 Copy (me) returns like me
7fd59977 244 is redefined static;
245 ---Purpose: Creates a new object which is a copy of this parabola.
246fields
247
248 focalLength : Real;
249
250end;