0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / gce / gce_MakeParab2d.hxx
1 // Created on: 1992-08-26
2 // Created by: Remi GILET
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _gce_MakeParab2d_HeaderFile
18 #define _gce_MakeParab2d_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <gp_Parab2d.hxx>
25 #include <gce_Root.hxx>
26 #include <Standard_Boolean.hxx>
27 class gp_Ax2d;
28 class gp_Ax22d;
29 class gp_Pnt2d;
30
31
32 //! This class implements the following algorithms used to
33 //! create Parab2d from gp.
34 //! Defines an infinite parabola.
35 //! An axis placement one axis defines the local cartesian
36 //! coordinate system ("XAxis") of the parabola.
37 //! The vertex of the parabola is the "Location" point of the
38 //! local coordinate system of the parabola.
39 //! The "XAxis" of the parabola is its axis of symmetry.
40 //! The "XAxis" is oriented from the vertex of the parabola to the
41 //! Focus of the parabola.
42 //! The "YAxis" is parallel to the directrix of the parabola and
43 //! its "Location" point is the vertex of the parabola.
44 //! The equation of the parabola in the local coordinate system is
45 //! Y**2 = (2*P) * X
46 //! P is the distance between the focus and the directrix of the
47 //! parabola called Parameter).
48 //! The focal length F = P/2 is the distance between the vertex
49 //! and the focus of the parabola.
50 //!
51 //! * Create a Parab2d from one apex  and the center.
52 //! * Create a Parab2d with the directrix and the focus point.
53 //! * Create a Parab2d with its vertex point and its axis
54 //! of symmetry and its focus length.
55 class gce_MakeParab2d  : public gce_Root
56 {
57 public:
58
59   DEFINE_STANDARD_ALLOC
60
61   
62
63   //! Creates a parabola with its axis of symmetry ("MirrorAxis")
64   //! and its focal length.
65   //! Warnings : It is possible to have Focal = 0.
66   //! The status is "NullFocalLength" Raised if Focal < 0.0
67   Standard_EXPORT gce_MakeParab2d(const gp_Ax2d& MirrorAxis, const Standard_Real Focal, const Standard_Boolean Sense = Standard_True);
68   
69
70   //! Creates a parabola with its local coordinate system <A>
71   //! and its focal length.
72   //! Warnings : It is possible to have Focal = 0.
73   //! The status is "NullFocalLength" Raised if Focal < 0.0
74   Standard_EXPORT gce_MakeParab2d(const gp_Ax22d& A, const Standard_Real Focal);
75   
76
77   //! Creates a parabola with the directrix and the focus point.
78   //! The sense of parametrization is given by Sense.
79   Standard_EXPORT gce_MakeParab2d(const gp_Ax2d& D, const gp_Pnt2d& F, const Standard_Boolean Sense = Standard_True);
80   
81
82   //! Make an Parab2d with S1 as the Focal point and Center
83   //! as the apex of the parabola
84   //! Warning
85   //! The MakeParab2d class does not prevent the
86   //! construction of a parabola with a null focal distance.
87   //! If an error occurs (that is, when IsDone returns
88   //! false), the Status function returns:
89   //! -   gce_NullFocusLength if Focal is less than 0.0, or
90   //! -   gce_NullAxis if S1 and Center are coincident.
91   Standard_EXPORT gce_MakeParab2d(const gp_Pnt2d& S1, const gp_Pnt2d& Center, const Standard_Boolean Sense = Standard_True);
92   
93   //! Returns the constructed parabola.
94   //! Exceptions StdFail_NotDone if no parabola is constructed.
95   Standard_EXPORT const gp_Parab2d& Value() const;
96   
97   Standard_EXPORT const gp_Parab2d& Operator() const;
98 Standard_EXPORT operator gp_Parab2d() const;
99
100
101
102
103 protected:
104
105
106
107
108
109 private:
110
111
112
113   gp_Parab2d TheParab2d;
114
115
116 };
117
118
119
120
121
122
123
124 #endif // _gce_MakeParab2d_HeaderFile