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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _gce_MakeParab_HeaderFile
18 #define _gce_MakeParab_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <gp_Parab.hxx>
25 #include <gce_Root.hxx>
26 #include <Standard_Real.hxx>
27 class StdFail_NotDone;
34 //! This class implements the following algorithms used to
35 //! create Parab from gp.
36 //! Defines the parabola in the parameterization range :
37 //! ]-infinite, +infinite[
38 //! The vertex of the parabola is the "Location" point of the
39 //! local coordinate system (axis placement) of the parabola.
41 //! The "XDirection" and the "YDirection" of this system define
42 //! the plane of the parabola.
44 //! The "XAxis" of the parabola ("Location", "XDirection") is
45 //! the axis of symmetry of the parabola. The Xaxis is oriented
46 //! from the vertex of the parabola to the Focus of the parabola.
48 //! The "YAxis" of the parabola ("Location", "YDirection") is
49 //! parallel to the directrix of the parabola.
51 //! The equation of the parabola in the local coordinates system is
53 //! P is the distance between the focus and the directrix of the
54 //! parabola (called Parameter).
55 //! The focal length F = P/2 is the distance between the vertex
56 //! and the focus of the parabola.
58 //! * Creates a parabola with its local coordinate system "A2"
59 //! and it's focal length "Focal".
60 //! * Create a parabola with its directrix and its focus point.
61 class gce_MakeParab : public gce_Root
69 //! Creates a parabola with its local coordinate system "A2"
70 //! and it's focal length "Focal".
71 //! The XDirection of A2 defines the axis of symmetry of the
72 //! parabola. The YDirection of A2 is parallel to the directrix
73 //! of the parabola. The Location point of A2 is the vertex of
75 //! The status is "NullFocusLength" if Focal < 0.0
76 Standard_EXPORT gce_MakeParab(const gp_Ax2& A2, const Standard_Real Focal);
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. The normal to the plane
85 //! of the parabola is the cross product between the XAxis and the
87 Standard_EXPORT gce_MakeParab(const gp_Ax1& D, const gp_Pnt& F);
89 //! Returns the constructed parabola.
90 //! Exceptions StdFail_NotDone if no parabola is constructed.
91 Standard_EXPORT const gp_Parab& Value() const;
93 Standard_EXPORT const gp_Parab& Operator() const;
94 Standard_EXPORT operator gp_Parab() const;
120 #endif // _gce_MakeParab_HeaderFile