0024927: Getting rid of "Persistent" functionality -- Storable
[occt.git] / src / gp / gp_Parab2d.cdl
CommitLineData
b311480e 1-- Copyright (c) 1991-1999 Matra Datavision
973c2be1 2-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 3--
973c2be1 4-- This file is part of Open CASCADE Technology software library.
b311480e 5--
d5f74e42 6-- This library is free software; you can redistribute it and/or modify it under
7-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8-- by the Free Software Foundation, with special exception defined in the file
9-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 11--
973c2be1 12-- Alternatively, this file may be used under the terms of Open CASCADE
13-- commercial license or contractual agreement.
7fd59977 14
087da3bd 15class Parab2d from gp
7fd59977 16
17 ---Purpose: Describes a parabola in the plane (2D space).
18 -- A parabola is defined by its focal length (that is, the
19 -- distance between its focus and apex) and positioned in
20 -- the plane with a coordinate system (a gp_Ax22d object) where:
21 -- - the origin of the coordinate system is on the apex of
22 -- the parabola, and
23 -- - the "X Axis" of the coordinate system is the axis of
24 -- symmetry; the parabola is on the positive side of this axis.
25 -- This coordinate system is the "local coordinate system"
26 -- of the parabola. Its orientation (direct or indirect sense)
27 -- gives an implicit orientation to the parabola.
28 -- In this coordinate system, the equation for the parabola is:
29 -- Y**2 = (2*P) * X.
30 -- where P, referred to as the parameter of the parabola, is
31 -- the distance between the focus and the directrix (P is
32 -- twice the focal length).
33 -- See Also
34 -- GCE2d_MakeParab2d which provides functions for
35 -- more complex parabola constructions
36 -- Geom2d_Parabola which provides additional functions
37 -- for constructing parabolas and works, in particular, with
38 -- the parametric equations of parabolas
39
40
41uses Ax2d from gp,
42 Ax22d from gp,
43 Pnt2d from gp,
44 Trsf2d from gp,
45 Vec2d from gp
46
47raises ConstructionError from Standard
48
49
50is
51
52
53
54 Create returns Parab2d;
55 ---C++: inline
56 --- Purpose : Creates an indefinite parabola.
57
58
59 Create (MirrorAxis : Ax2d;
60 Focal : Real;
61 Sense : Boolean from Standard = Standard_True) returns Parab2d
62 ---C++: inline
63 --- Purpose :
64 -- Creates a parabola with its vertex point, its axis of symmetry
65 -- ("XAxis") and its focal length.
66 -- The sense of parametrization is given by Sense.
67 -- Warnings : It is possible to have Focal = 0.
68 -- Raises ConstructionError if Focal < 0.0
69
70 raises ConstructionError;
71
72
73 Create (A : Ax22d;
74 Focal : Real) returns Parab2d
75 ---C++: inline
76 --- Purpose :
77 -- Creates a parabola with its vertex point, its axis of symmetry
78 -- ("XAxis") and its focal length.
79 -- The sense of parametrization is given by A.
80 -- Warnings : It is possible to have Focal = 0.
81 -- Raises ConstructionError if Focal < 0.0
82
83 raises ConstructionError;
84
85
86 Create (D : Ax2d;
87 F : Pnt2d;
88 Sense : Boolean from Standard = Standard_True) returns Parab2d;
89 --- Purpose :
90 -- Creates a parabola with the directrix and the focus point.
91 -- The sense of parametrization is given by Sense.
92
93
94 Create (D : Ax22d; F : Pnt2d) returns Parab2d;
95 --- Purpose :
96 -- Creates a parabola with the directrix and the focus point.
97 -- The Sense of parametrization is given by D.
98
99
100 SetFocal (me : in out; Focal : Real)
101 ---C++: inline
102 --- Purpose :
103 -- Changes the focal distance of the parabola
104 -- Warnings : It is possible to have Focal = 0.
105 -- Raises ConstructionError if Focal < 0.0
106
107 raises ConstructionError
108 is static;
109
110
111 SetLocation (me : in out; P : Pnt2d) is static;
112 ---C++: inline
113 --- Purpose :
114 -- Changes the "Location" point of the parabola. It is the
115 -- vertex of the parabola.
116
117
118 SetMirrorAxis (me : in out; A : Ax2d) is static;
119 ---C++: inline
120 --- Purpose : Modifies this parabola, by redefining its local coordinate system so that
121 -- its origin and "X Direction" become those of the axis
122 -- MA. The "Y Direction" of the local coordinate system is
123 -- then recomputed. The orientation of the local
124 -- coordinate system is not modified.
125
126
127 SetAxis (me : in out; A : Ax22d) is static;
128 ---C++: inline
129 --- Purpose :
130 -- Changes the local coordinate system of the parabola.
131 -- The "Location" point of A becomes the vertex of the parabola.
132
133
134 Coefficients (me; A, B, C, D, E, F : out Real) is static;
135 --- Purpose :
136 -- Computes the coefficients of the implicit equation of the parabola.
137 -- A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
138
139
140 Directrix (me) returns Ax2d is static;
141 ---C++: inline
142 --- Purpose :
143 -- Computes the directrix of the parabola.
144 -- The directrix is:
145 -- - a line parallel to the "Y Direction" of the local
146 -- coordinate system of this parabola, and
147 -- - located on the negative side of the axis of symmetry,
148 -- at a distance from the apex which is equal to the focal length of this parabola.
149 -- The directrix is returned as an axis (a gp_Ax2d object),
150 -- the origin of which is situated on the "X Axis" of this parabola.
151
152
153 Focal (me) returns Real is static;
154 ---C++: inline
155 --- Purpose :
156 -- Returns the distance between the vertex and the focus
157 -- of the parabola.
158
159
160 Focus (me) returns Pnt2d is static;
161 ---C++: inline
162 --- Purpose : Returns the focus of the parabola.
163
164
165 Location (me) returns Pnt2d is static;
166 ---C++: inline
167 --- Purpose : Returns the vertex of the parabola.
168
169
170 MirrorAxis (me) returns Ax2d is static;
171 ---C++: inline
172 --- Purpose :
173 -- Returns the symmetry axis of the parabola.
174 -- The "Location" point of this axis is the vertex of the parabola.
175
176 Axis (me) returns Ax22d is static;
177 ---C++: inline
178 --- Purpose :
179 -- Returns the local coordinate system of the parabola.
180 -- The "Location" point of this axis is the vertex of the parabola.
181
182 Parameter (me) returns Real is static;
183 ---C++: inline
184 --- Purpose :
185 -- Returns the distance between the focus and the
186 -- directrix of the parabola.
187
188
189
190
191 Reverse (me : in out) is static;
192 ---C++: inline
193
194 Reversed (me) returns Parab2d is static;
195 ---C++: inline
196 ---Purpose:
197 -- Reverses the orientation of the local coordinate system
198 -- of this parabola (the "Y Direction" is reversed).
199 -- Therefore, the implicit orientation of this parabola is reversed.
200 -- Note:
201 -- - Reverse assigns the result to this parabola, while
202 -- - Reversed creates a new one.
203
204 IsDirect (me) returns Boolean is static;
205 ---C++: inline
206 --- Purpose : Returns true if the local coordinate system is direct
207 -- and false in the other case.
208
209 Mirror (me : in out; P : Pnt2d) is static;
210
211 Mirrored (me; P : Pnt2d) returns Parab2d is static;
212
213
214 --- Purpose :
215 -- Performs the symmetrical transformation of a parabola with respect
216 -- to the point P which is the center of the symmetry
217
218
219 Mirror (me : in out; A : Ax2d) is static;
220
221 Mirrored (me; A : Ax2d) returns Parab2d is static;
222 --- Purpose :
223 -- Performs the symmetrical transformation of a parabola with respect
224 -- to an axis placement which is the axis of the symmetry.
225
226
227
228
229 Rotate (me : in out; P : Pnt2d; Ang : Real) is static;
230 ---C++: inline
231
232 Rotated (me; P : Pnt2d; Ang : Real) returns Parab2d is static;
233 ---C++: inline
234 --- Purpose :
235 -- Rotates a parabola. P is the center of the rotation.
236 -- Ang is the angular value of the rotation in radians.
237
238
239
240 Scale (me : in out; P : Pnt2d; S : Real) is static;
241 ---C++: inline
242
243 Scaled (me; P : Pnt2d; S : Real) returns Parab2d is static;
244 ---C++: inline
245 --- Purpose :
246 -- Scales a parabola. S is the scaling value.
247 -- If S is negative the direction of the symmetry axis
248 -- "XAxis" is reversed and the direction of the "YAxis" too.
249
250
251
252 Transform (me : in out; T : Trsf2d) is static;
253 ---C++: inline
254
255 Transformed (me; T : Trsf2d) returns Parab2d is static;
256 ---C++: inline
257 --- Purpose :
258 -- Transforms an parabola with the transformation T from class Trsf2d.
259
260
261
262
263 Translate (me : in out; V : Vec2d) is static;
264 ---C++: inline
265
266 Translated (me; V : Vec2d) returns Parab2d is static;
267 ---C++: inline
268 --- Purpose :
269 -- Translates a parabola in the direction of the vector V.
270 -- The magnitude of the translation is the vector's magnitude.
271
272
273
274
275 Translate (me : in out; P1, P2 : Pnt2d ) is static;
276 ---C++: inline
277
278 Translated (me; P1, P2 : Pnt2d) returns Parab2d is static;
279 ---C++: inline
280 --- Purpose :
281 -- Translates a parabola from the point P1 to the point P2.
282
283
284fields
285
286 pos : Ax22d;
287 focalLength : Real;
288
289end;