Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1992-09-28
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 _GC_MakeHyperbola_HeaderFile
0018 #define _GC_MakeHyperbola_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <GC_Root.hxx>
0025 #include <Geom_Hyperbola.hxx>
0026 
0027 class gp_Hypr;
0028 class gp_Ax2;
0029 class gp_Pnt;
0030 
0031 
0032 //! This class implements construction algorithms for a hyperbola in
0033 //! 3D space. The result is a Geom_Hyperbola hyperbola.
0034 //! A MakeHyperbola object provides a framework for:
0035 //! -   defining the construction of the hyperbola,
0036 //! -   implementing the construction algorithm, and
0037 //! -   consulting the results. In particular, the Value
0038 //! function returns the constructed hyperbola.
0039 //! To define the main branch of an hyperbola.
0040 //! The parameterization range is ]-infinite,+infinite[
0041 //! It is possible to get the other branch and the two conjugate
0042 //! branches of the main branch.
0043 //!
0044 //! ^YAxis
0045 //! |
0046 //! FirstConjugateBranch
0047 //! |
0048 //! Other            |                Main
0049 //! --------------------- C ------------------------------>XAxis
0050 //! Branch           |                Branch
0051 //! |
0052 //! SecondConjugateBranch
0053 //! |
0054 //!
0055 //! The major radius is the distance between the Location point
0056 //! of the hyperbola C and the apex of the Main Branch (or the
0057 //! Other branch). The major axis is the XAxis.
0058 //! The minor radius is the distance between the Location point
0059 //! of the hyperbola C and the apex of the First (or Second)
0060 //! Conjugate branch. The minor axis is the YAxis.
0061 //! The major radius can be lower than the minor radius.
0062 class GC_MakeHyperbola  : public GC_Root
0063 {
0064 public:
0065 
0066   DEFINE_STANDARD_ALLOC
0067 
0068   
0069 
0070   //! Creates  an Hyperbola from a non persistent hyperbola  from package gp by conversion.
0071   Standard_EXPORT GC_MakeHyperbola(const gp_Hypr& H);
0072   
0073   //! Constructs a hyperbola centered on the origin of the coordinate system
0074   //! A2, with major and minor radii MajorRadius and MinorRadius, where:
0075   //! the plane of the hyperbola is defined by the "X Axis" and "Y Axis" of A2,
0076   //! -   its major axis is the "X Axis" of A2.
0077   Standard_EXPORT GC_MakeHyperbola(const gp_Ax2& A2, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
0078   
0079   //! Constructs a hyperbola centered on the point Center, where
0080   //! -   the plane of the hyperbola is defined by Center, S1 and S2,
0081   //! -   its major axis is defined by Center and S1,
0082   //! -   its major radius is the distance between Center and S1, and
0083   //! -   its minor radius is the distance between S2 and the major axis;
0084   Standard_EXPORT GC_MakeHyperbola(const gp_Pnt& S1, const gp_Pnt& S2, const gp_Pnt& Center);
0085   
0086   //! Returns the constructed hyperbola.
0087   //! Exceptions StdFail_NotDone if no hyperbola is constructed.
0088   Standard_EXPORT const Handle(Geom_Hyperbola)& Value() const;
0089 
0090   operator const Handle(Geom_Hyperbola)& () const { return Value(); }
0091 
0092 private:
0093   Handle(Geom_Hyperbola) TheHyperbola;
0094 };
0095 
0096 #endif // _GC_MakeHyperbola_HeaderFile