1 -- Created on: 1992-09-28
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MakeParabola from GCE2d inherits Root from GCE2d
19 ---Purpose :This class implements the following algorithms used to
20 -- create Parabola from Geom2d.
21 -- * Create an Parabola from two apex and the center.
22 -- Defines the parabola in the parameterization range :
23 -- ]-infinite,+infinite[
24 -- The vertex of the parabola is the "Location" point of the
25 -- local coordinate system "XAxis" of the parabola.
26 -- The "XAxis" of the parabola is its axis of symmetry.
27 -- The "Xaxis" is oriented from the vertex of the parabola to the
28 -- Focus of the parabola.
29 -- The equation of the parabola in the local coordinate system is
31 -- P is the distance between the focus and the directrix of the
32 -- parabola called Parameter).
33 -- The focal length F = P/2 is the distance between the vertex
34 -- and the focus of the parabola.
42 raises NotDone from StdFail
46 Create (Prb : Parab2d from gp) returns MakeParabola;
47 --- Purpose : Creates a parabola from a non persistent one.
49 Create (Axis : Ax22d from gp ;
50 Focal : Real from Standard ) returns MakeParabola;
51 --- Purpose : Creates a parabola with its local coordinate system and it's focal
53 -- The "Location" point of "Axis" is the vertex of the parabola
54 --- Status is "NegativeFocusLength" if Focal < 0.0
56 Create (MirrorAxis : Ax2d from gp ;
57 Focal : Real from Standard;
58 Sense : Boolean from Standard) returns MakeParabola;
59 --- Purpose : Creates a parabola with its "MirrorAxis" and it's focal length "Focal".
60 -- MirrorAxis is the axis of symmetry of the curve, it is the
61 -- "XAxis". The "YAxis" is parallel to the directrix of the
62 -- parabola. The "Location" point of "MirrorAxis" is the vertex of the parabola
63 --- Status is "NegativeFocusLength" if Focal < 0.0
65 Create (D : Ax22d from gp ;
66 F : Pnt2d from gp ) returns MakeParabola;
67 --- Purpose : Creates a parabola with the local coordinate system and the focus point.
68 -- The sense of parametrization is given by Sense.
70 Create (D : Ax2d from gp ;
72 Sense : Boolean from Standard = Standard_True) returns MakeParabola;
74 -- D is the directrix of the parabola and F the focus point.
75 -- The symmetry axis "XAxis" of the parabola is normal to the
76 -- directrix and pass through the focus point F, but its
77 -- "Location" point is the vertex of the parabola.
78 -- The "YAxis" of the parabola is parallel to D and its "Location"
79 -- point is the vertex of the parabola.
81 Create(S1,O : Pnt2d from gp) returns MakeParabola;
82 ---Purpose: Make a parabola with focal point S1 and
84 -- The branch of the parabola returned will have <S1> as
86 -- The implicit orientation of the parabola is:
87 -- - the same one as the parabola Prb,
88 -- - the sense defined by the coordinate system Axis or the directrix D,
89 -- - the trigonometric sense if Sense is not given or is true, or
90 -- - the opposite sense if Sense is false.
92 -- The MakeParabola class does not prevent the
93 -- construction of a parabola with a null focal distance.
94 -- If an error occurs (that is, when IsDone returns
95 -- false), the Status function returns:
96 -- - gce_NullFocusLength if Focal is less than 0.0, or
97 -- - gce_NullAxis if points S1 and O are coincident.
99 Value(me) returns Parabola from Geom2d
102 ---C++: return const&
103 ---Purpose: Returns the constructed parabola.
104 -- Exceptions StdFail_NotDone if no parabola is constructed.
106 Operator(me) returns Parabola from Geom2d
108 ---C++: return const&
109 ---C++: alias "Standard_EXPORT operator Handle_Geom2d_Parabola() const;"
113 TheParabola : Parabola from Geom2d;
114 --The solution from Geom2d.