2 -- Created: Wed Aug 26 14:31:48 1992
5 ---Copyright: Matra Datavision 1992
7 class MakeParab2d from gce inherits Root from gce
9 ---Purpose :This class implements the following algorithms used to
10 -- create Parab2d from gp.
11 -- Defines an infinite parabola.
12 -- An axis placement one axis defines the local cartesian
13 -- coordinate system ("XAxis") of the parabola.
14 -- The vertex of the parabola is the "Location" point of the
15 -- local coordinate system of the parabola.
16 -- The "XAxis" of the parabola is its axis of symmetry.
17 -- The "XAxis" is oriented from the vertex of the parabola to the
18 -- Focus of the parabola.
19 -- The "YAxis" is parallel to the directrix of the parabola and
20 -- its "Location" point is the vertex of the parabola.
21 -- The equation of the parabola in the local coordinate system is
23 -- P is the distance between the focus and the directrix of the
24 -- parabola called Parameter).
25 -- The focal length F = P/2 is the distance between the vertex
26 -- and the focus of the parabola.
28 -- * Create a Parab2d from one apex and the center.
29 -- * Create a Parab2d with the directrix and the focus point.
30 -- * Create a Parab2d with its vertex point and its axis
31 -- of symetry and its focus length.
38 raises NotDone from StdFail
42 Create (MirrorAxis : Ax2d from gp ;
43 Focal : Real from Standard ;
44 Sense : Boolean from Standard = Standard_True)
47 -- Creates a parabola with its axis of symmetry ("MirrorAxis")
48 -- and its focal length.
49 --- Warnings : It is possible to have Focal = 0.
50 -- The status is "NullFocalLength" Raised if Focal < 0.0
52 Create (A : Ax22d from gp ;
53 Focal : Real from Standard )
56 -- Creates a parabola with its local coordinate system <A>
57 -- and its focal length.
58 --- Warnings : It is possible to have Focal = 0.
59 -- The status is "NullFocalLength" Raised if Focal < 0.0
61 Create (D : Ax2d from gp ;
63 Sense : Boolean from Standard = Standard_True)
66 -- Creates a parabola with the directrix and the focus point.
67 -- The sense of parametrization is given by Sense.
69 Create (D : Ax22d from gp ;
73 -- Creates a parabola with the local coordinate system and
75 -- The sense of parametrization is given by Sense.
77 Create(S1 : Pnt2d from gp ;
78 Center : Pnt2d from gp ;
79 Sense : Boolean from Standard = Standard_True) returns MakeParab2d;
80 ---Purpose: Make an Parab2d with S1 as the Focal point and Center
81 -- as the apex of the parabola
83 -- The MakeParab2d class does not prevent the
84 -- construction of a parabola with a null focal distance.
85 -- If an error occurs (that is, when IsDone returns
86 -- false), the Status function returns:
87 -- - gce_NullFocusLength if Focal is less than 0.0, or
88 -- - gce_NullAxis if S1 and Center are coincident.
90 Value(me) returns Parab2d from gp
94 ---Purpose: Returns the constructed parabola.
95 -- Exceptions StdFail_NotDone if no parabola is constructed.
97 Operator(me) returns Parab2d from gp
100 ---C++: alias "Standard_EXPORT operator gp_Parab2d() const;"
104 TheParab2d : Parab2d from gp;
105 --The solution from gp.