0024157: Parallelization of assembly part of BO
[occt.git] / src / GCE2d / GCE2d_MakeParabola.cdl
1 -- Created on: 1992-09-28
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 class MakeParabola from GCE2d inherits Root from GCE2d
23
24         ---Purpose :This class implements the following algorithms used to 
25         --          create Parabola from Geom2d.
26         --          * Create an Parabola from two apex  and the center.
27         --  Defines the parabola in the parameterization range  :
28         --  ]-infinite,+infinite[
29         --  The vertex of the parabola is the "Location" point of the 
30         --  local coordinate system "XAxis" of the parabola. 
31         --  The "XAxis" of the parabola is its axis of symmetry.
32         --  The "Xaxis" is oriented from the vertex of the parabola to the 
33         --  Focus of the parabola.
34         --  The equation of the parabola in the local coordinate system is
35         --  Y**2 = (2*P) * X
36         --  P is the distance between the focus and the directrix of the 
37         --  parabola called Parameter). 
38         --  The focal length F = P/2 is the distance between the vertex 
39         --  and the focus of the parabola.
40
41 uses Pnt2d    from gp,
42      Parab2d  from gp,
43      Ax2d     from gp,
44      Ax22d    from gp,
45      Parabola from Geom2d
46
47 raises NotDone from StdFail
48
49 is
50
51 Create (Prb : Parab2d from gp) returns MakeParabola;
52         --- Purpose : Creates a parabola from a non persistent one.
53
54 Create (Axis       : Ax22d from gp        ; 
55         Focal      : Real from Standard   ) returns MakeParabola;
56         --- Purpose : Creates a parabola with its local coordinate system and it's focal 
57         --  length "Focal".
58         --  The "Location" point of "Axis" is the vertex of the parabola
59         --- Status is "NegativeFocusLength" if Focal < 0.0
60
61 Create (MirrorAxis : Ax2d    from gp      ; 
62         Focal      : Real    from Standard;
63         Sense      : Boolean from Standard) returns MakeParabola;
64         --- Purpose : Creates a parabola with its "MirrorAxis" and it's focal length "Focal".
65         --  MirrorAxis is the axis of symmetry of the curve, it is the
66         --  "XAxis". The "YAxis" is parallel to the directrix of the
67         --  parabola. The "Location" point of "MirrorAxis" is the vertex of the parabola
68         --- Status is "NegativeFocusLength" if Focal < 0.0
69
70 Create (D     : Ax22d from gp  ; 
71         F     : Pnt2d from gp  ) returns MakeParabola;
72         --- Purpose : Creates a parabola with the local coordinate system and the focus point.
73         --  The sense of parametrization is given by Sense.
74
75 Create (D     : Ax2d  from gp                        ; 
76         F     : Pnt2d from gp                        ;
77         Sense : Boolean from Standard = Standard_True) returns MakeParabola;
78         --- Purpose :
79         --  D is the directrix of the parabola and F the focus point.
80         --  The symmetry axis "XAxis" of the parabola is normal to the
81         --  directrix and pass through the focus point F, but its
82         --  "Location" point is the vertex of the parabola.
83         --  The "YAxis" of the parabola is parallel to D and its "Location"
84         --  point is the vertex of the parabola.
85
86 Create(S1,O  : Pnt2d from gp) returns MakeParabola;
87         ---Purpose: Make a parabola with focal point S1 and 
88         --          center O
89         --          The branch of the parabola returned will have <S1> as
90         --          focal point
91         -- The implicit orientation of the parabola is:
92         -- -   the same one as the parabola Prb,
93         -- -   the sense defined by the coordinate system Axis or the directrix D,
94         -- -   the trigonometric sense if Sense is not given or is true, or
95         -- -   the opposite sense if Sense is false.
96         -- Warning
97         -- The MakeParabola class does not prevent the
98         -- construction of a parabola with a null focal distance.
99         -- If an error occurs (that is, when IsDone returns
100         -- false), the Status function returns:
101         -- -   gce_NullFocusLength if Focal is less than 0.0, or
102         -- -   gce_NullAxis if points S1 and O are coincident.
103         
104 Value(me) returns Parabola from Geom2d
105     raises NotDone
106     is static;
107         ---C++: return const&
108         ---Purpose: Returns the constructed parabola.
109         -- Exceptions StdFail_NotDone if no parabola is constructed.
110     
111 Operator(me) returns Parabola from Geom2d
112     is static;
113         ---C++: return const&
114         ---C++: alias "Standard_EXPORT operator Handle_Geom2d_Parabola() const;"
115
116 fields
117
118     TheParabola : Parabola from Geom2d;
119     --The solution from Geom2d.
120     
121 end MakeParabola;