7fd59977 |
1 | -- File: MakeParab.cdl |
2 | -- Created: Wed Aug 26 14:31:48 1992 |
3 | -- Author: Remi GILET |
4 | -- <reg@topsn3> |
5 | ---Copyright: Matra Datavision 1992 |
6 | |
7 | class MakeParab from gce inherits Root from gce |
8 | |
9 | ---Purpose :This class implements the following algorithms used to |
10 | -- create Parab from gp. |
11 | -- Defines the parabola in the parameterization range : |
12 | -- ]-infinite, +infinite[ |
13 | -- The vertex of the parabola is the "Location" point of the |
14 | -- local coordinate system (axis placement) of the parabola. |
15 | -- |
16 | -- The "XDirection" and the "YDirection" of this system define |
17 | -- the plane of the parabola. |
18 | -- |
19 | -- The "XAxis" of the parabola ("Location", "XDirection") is |
20 | -- the axis of symmetry of the parabola. The Xaxis is oriented |
21 | -- from the vertex of the parabola to the Focus of the parabola. |
22 | -- |
23 | -- The "YAxis" of the parabola ("Location", "YDirection") is |
24 | -- parallel to the directrix of the parabola. |
25 | -- |
26 | -- The equation of the parabola in the local coordinates system is |
27 | -- Y**2 = (2*P) * X |
28 | -- P is the distance between the focus and the directrix of the |
29 | -- parabola (called Parameter). |
30 | -- The focal length F = P/2 is the distance between the vertex |
31 | -- and the focus of the parabola. |
32 | -- |
33 | -- * Creates a parabola with its local coordinate system "A2" |
34 | -- and it's focal length "Focal". |
35 | -- * Create a parabola with its directrix and its focus point. |
36 | |
37 | uses Pnt from gp, |
38 | Parab from gp, |
39 | Ax2 from gp, |
40 | Ax1 from gp |
41 | |
42 | raises NotDone from StdFail |
43 | |
44 | is |
45 | |
46 | Create (A2 : Ax2 from gp ; |
47 | Focal : Real from Standard) returns MakeParab; |
48 | --- Purpose ; |
49 | -- Creates a parabola with its local coordinate system "A2" |
50 | -- and it's focal length "Focal". |
51 | -- The XDirection of A2 defines the axis of symmetry of the |
52 | -- parabola. The YDirection of A2 is parallel to the directrix |
53 | -- of the parabola. The Location point of A2 is the vertex of |
54 | -- the parabola |
55 | -- The status is "NullFocusLength" if Focal < 0.0 |
56 | |
57 | |
58 | Create (D : Ax1 from gp ; |
59 | F : Pnt from gp ) returns MakeParab; |
60 | --- Purpose : |
61 | -- D is the directrix of the parabola and F the focus point. |
62 | -- The symmetry axis (XAxis) of the parabola is normal to the |
63 | -- directrix and pass through the focus point F, but its |
64 | -- location point is the vertex of the parabola. |
65 | -- The YAxis of the parabola is parallel to D and its location |
66 | -- point is the vertex of the parabola. The normal to the plane |
67 | -- of the parabola is the cross product between the XAxis and the |
68 | -- YAxis. |
69 | |
70 | Value(me) returns Parab from gp |
71 | raises NotDone |
72 | is static; |
73 | ---C++: return const& |
74 | ---Purpose: Returns the constructed parabola. |
75 | -- Exceptions StdFail_NotDone if no parabola is constructed. |
76 | |
77 | Operator(me) returns Parab from gp |
78 | is static; |
79 | ---C++: return const& |
80 | ---C++: alias "Standard_EXPORT operator gp_Parab() const;" |
81 | |
82 | fields |
83 | |
84 | TheParab : Parab from gp; |
85 | --The solution from gp. |
86 | |
87 | end MakeParab; |
88 | |
89 | |
90 | |
91 | |