0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / gce / gce_MakeParab2d.cdl
1 -- File:        Parab2d.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 MakeParab2d from gce inherits Root from gce
8
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
22     --  Y**2 = (2*P) * X
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.
27     --          
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.
32
33 uses Pnt2d   from gp,
34      Ax2d    from gp,
35      Ax22d   from gp,
36      Parab2d from gp
37
38 raises NotDone from StdFail
39
40 is
41
42 Create (MirrorAxis : Ax2d    from gp                      ; 
43         Focal      : Real    from Standard                ;
44         Sense      : Boolean from Standard = Standard_True) 
45     returns MakeParab2d;
46     --- Purpose :
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
51
52 Create (A     : Ax22d   from gp       ; 
53         Focal : Real    from Standard ) 
54     returns MakeParab2d;
55     --- Purpose :
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
60
61 Create (D     : Ax2d  from gp                        ; 
62         F     : Pnt2d from gp                        ;
63         Sense : Boolean from Standard = Standard_True)  
64     returns MakeParab2d;
65     --- Purpose :
66     --  Creates a parabola with the directrix and the focus point.
67     --  The sense of parametrization is given by Sense.
68
69 Create (D     : Ax22d from gp  ; 
70         F     : Pnt2d from gp  )  
71     returns MakeParab2d;
72     --- Purpose :
73     --  Creates a parabola with the local coordinate system and 
74     --  the focus point.
75     --  The sense of parametrization is given by Sense.
76
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
82     --  Warning
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.
89         
90 Value(me) returns Parab2d from gp
91     raises NotDone
92     is static;
93     ---C++: return const&
94     ---Purpose: Returns the constructed parabola.
95     -- Exceptions StdFail_NotDone if no parabola is constructed.
96     
97 Operator(me) returns Parab2d from gp
98     is static;
99     ---C++: return const&
100     ---C++: alias "Standard_EXPORT operator gp_Parab2d() const;"
101
102 fields
103
104     TheParab2d : Parab2d from gp;
105     --The solution from gp.
106     
107 end MakeParab2d;
108
109
110
111