Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:32

0001 // Created on: 1992-08-26
0002 // Created by: Remi GILET
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _gce_MakeParab_HeaderFile
0018 #define _gce_MakeParab_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Parab.hxx>
0025 #include <gce_Root.hxx>
0026 class gp_Ax2;
0027 class gp_Ax1;
0028 class gp_Pnt;
0029 
0030 
0031 //! This class implements the following algorithms used to
0032 //! create Parab from gp.
0033 //! Defines the parabola in the parameterization range  :
0034 //! ]-infinite, +infinite[
0035 //! The vertex of the parabola is the "Location" point of the
0036 //! local coordinate system (axis placement) of the parabola.
0037 //!
0038 //! The "XDirection" and the "YDirection" of this system define
0039 //! the plane of the parabola.
0040 //!
0041 //! The "XAxis" of the parabola ("Location", "XDirection") is
0042 //! the axis of symmetry of the parabola. The Xaxis is oriented
0043 //! from the vertex of the parabola to the Focus of the parabola.
0044 //!
0045 //! The "YAxis" of the parabola ("Location", "YDirection") is
0046 //! parallel to the directrix of the parabola.
0047 //!
0048 //! The equation of the parabola in the local coordinates system is
0049 //! Y**2 = (2*P) * X
0050 //! P is the distance between the focus and the directrix of the
0051 //! parabola (called Parameter).
0052 //! The focal length F = P/2 is the distance between the vertex
0053 //! and the focus of the parabola.
0054 //!
0055 //! * Creates a parabola with its local coordinate system "A2"
0056 //! and it's focal length "Focal".
0057 //! * Create a parabola with its directrix and its focus point.
0058 class gce_MakeParab  : public gce_Root
0059 {
0060 public:
0061 
0062   DEFINE_STANDARD_ALLOC
0063 
0064   
0065   //! --- Purpose ;
0066   //! Creates a parabola with its local coordinate system "A2"
0067   //! and it's focal length "Focal".
0068   //! The XDirection of A2 defines the axis of symmetry of the
0069   //! parabola. The YDirection of A2 is parallel to the directrix
0070   //! of the parabola. The Location point of A2 is the vertex of
0071   //! the parabola
0072   //! The status is "NullFocusLength" if Focal < 0.0
0073   Standard_EXPORT gce_MakeParab(const gp_Ax2& A2, const Standard_Real Focal);
0074   
0075 
0076   //! D is the directrix of the parabola and F the focus point.
0077   //! The symmetry axis (XAxis) of the parabola is normal to the
0078   //! directrix and pass through the focus point F, but its
0079   //! location point is the vertex of the parabola.
0080   //! The YAxis of the parabola is parallel to D and its location
0081   //! point is the vertex of the parabola. The normal to the plane
0082   //! of the parabola is the cross product between the XAxis and the
0083   //! YAxis.
0084   Standard_EXPORT gce_MakeParab(const gp_Ax1& D, const gp_Pnt& F);
0085   
0086   //! Returns the constructed parabola.
0087   //! Exceptions StdFail_NotDone if no parabola is constructed.
0088   Standard_EXPORT const gp_Parab& Value() const;
0089   
0090   Standard_EXPORT const gp_Parab& Operator() const;
0091 Standard_EXPORT operator gp_Parab() const;
0092 
0093 
0094 
0095 
0096 protected:
0097 
0098 
0099 
0100 
0101 
0102 private:
0103 
0104 
0105 
0106   gp_Parab TheParab;
0107 
0108 
0109 };
0110 
0111 
0112 
0113 
0114 
0115 
0116 
0117 #endif // _gce_MakeParab_HeaderFile