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_MakeHypr2d_HeaderFile
0018 #define _gce_MakeHypr2d_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Hypr2d.hxx>
0025 #include <gce_Root.hxx>
0026 #include <Standard_Boolean.hxx>
0027 class gp_Pnt2d;
0028 class gp_Ax2d;
0029 class gp_Ax22d;
0030 
0031 
0032 //! This class implements the following algorithms used to
0033 //! create a 2d Hyperbola from gp.
0034 //! * Create a 2d Hyperbola from its center and two points:
0035 //! one on its axis of symmetry giving the major radius, the
0036 //! other giving the value of the small radius.
0037 //! * Create a 2d Hyperbola from its major axis and its major
0038 //! radius and its minor radius.
0039 //!
0040 //! ^YAxis
0041 //! |
0042 //! FirstConjugateBranch
0043 //! |
0044 //! Other            |                Main
0045 //! --------------------- C ------------------------------>XAxis
0046 //! Branch           |                Branch
0047 //! |
0048 //! |
0049 //! SecondConjugateBranch
0050 //! |
0051 //!
0052 //! An axis placement (one axis) is associated with the hyperbola.
0053 //! This axis is the "XAxis" or major axis of the hyperbola. It is
0054 //! the symmetry axis of the main branch of hyperbola.
0055 //! The "YAxis" is normal to this axis and pass through its location
0056 //! point. It is the minor axis.
0057 //!
0058 //! The major radius is the distance between the Location point
0059 //! of the hyperbola C and the vertex of the Main Branch (or the
0060 //! Other branch). The minor radius is the distance between the
0061 //! Location point of the hyperbola C and the vertex of the First
0062 //! (or Second) Conjugate branch.
0063 //! The major radius can be lower than the minor radius.
0064 class gce_MakeHypr2d  : public gce_Root
0065 {
0066 public:
0067 
0068   DEFINE_STANDARD_ALLOC
0069 
0070   
0071   //! Constructs a hyperbola
0072   //! centered on the point Center, where:
0073   //! -   the major axis of the hyperbola is defined by Center and point S1,
0074   //! -   the major radius is the distance between Center and S1, and
0075   //! -   the minor radius is the distance between point S2 and the major axis.
0076   Standard_EXPORT gce_MakeHypr2d(const gp_Pnt2d& S1, const gp_Pnt2d& S2, const gp_Pnt2d& Center);
0077   
0078   //! Constructs a hyperbola with major and minor radii MajorRadius and
0079   //! MinorRadius, where:
0080   //! -   the center of the hyperbola is the origin of the axis MajorAxis, and
0081   //! -   the major axis is defined by MajorAxis if Sense
0082   //! is true, or the opposite axis to MajorAxis if Sense is false; or
0083   //! -   centered on the origin of the coordinate system
0084   //! A, with major and minor radii MajorRadius and
0085   //! MinorRadius, where its major axis is the "X Axis"
0086   //! of A (A is the local coordinate system of the hyperbola).
0087   Standard_EXPORT gce_MakeHypr2d(const gp_Ax2d& MajorAxis, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Boolean Sense);
0088   
0089   //! Creates a Hypr2d centered on the origin of the coordinate system
0090   //! A, with major and minor radii MajorRadius and
0091   //! MinorRadius, where its major axis is the "X Axis"
0092   //! of A (A is the local coordinate system of the hyperbola).
0093   Standard_EXPORT gce_MakeHypr2d(const gp_Ax22d& A, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
0094   
0095   //! Returns the constructed hyperbola.
0096   //! Exceptions StdFail_NotDone if no hyperbola is constructed.
0097   Standard_EXPORT const gp_Hypr2d& Value() const;
0098   
0099   Standard_EXPORT const gp_Hypr2d& Operator() const;
0100 Standard_EXPORT operator gp_Hypr2d() const;
0101 
0102 
0103 
0104 
0105 protected:
0106 
0107 
0108 
0109 
0110 
0111 private:
0112 
0113 
0114 
0115   gp_Hypr2d TheHypr2d;
0116 
0117 
0118 };
0119 
0120 
0121 
0122 
0123 
0124 
0125 
0126 #endif // _gce_MakeHypr2d_HeaderFile