|
||||
File indexing completed on 2025-01-18 10:03:32
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 _GCE2d_MakeHyperbola_HeaderFile 0018 #define _GCE2d_MakeHyperbola_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <GCE2d_Root.hxx> 0025 #include <Geom2d_Hyperbola.hxx> 0026 0027 class gp_Hypr2d; 0028 class gp_Ax2d; 0029 class gp_Ax22d; 0030 class gp_Pnt2d; 0031 0032 0033 //! This class implements the following algorithms used to 0034 //! create Hyperbola from Geom2d. 0035 //! * Create an Hyperbola from two apex and the center. 0036 //! Defines the main branch of an hyperbola. 0037 //! The parameterization range is ]-infinite,+infinite[ 0038 //! It is possible to get the other branch and the two conjugate 0039 //! branches of the main branch. 0040 //! 0041 //! ^YAxis 0042 //! | 0043 //! FirstConjugateBranch 0044 //! | 0045 //! Other | Main 0046 //! --------------------- C ------------------------------>XAxis 0047 //! Branch | Branch 0048 //! | 0049 //! SecondConjugateBranch 0050 //! | 0051 //! 0052 //! The major radius is the distance between the Location point 0053 //! of the hyperbola C and the apex of the main Branch (or the 0054 //! Other branch). The major axis is the "XAxis". 0055 //! The minor radius is the distance between the Location point 0056 //! of the hyperbola C and the apex of the First (or Second) 0057 //! Conjugate branch. The minor axis is the "YAxis". 0058 //! The major radius can be lower than the minor radius. 0059 class GCE2d_MakeHyperbola : public GCE2d_Root 0060 { 0061 public: 0062 0063 DEFINE_STANDARD_ALLOC 0064 0065 0066 0067 //! Creates an Hyperbola from a non persistent one from package gp 0068 Standard_EXPORT GCE2d_MakeHyperbola(const gp_Hypr2d& H); 0069 0070 0071 //! MajorAxis is the "XAxis" of the hyperbola. 0072 //! The major radius of the hyperbola is on this "XAxis" and 0073 //! the minor radius is on the "YAxis" of the hyperbola. 0074 //! The status is "NegativeRadius" if MajorRadius < 0.0 or if 0075 //! MinorRadius < 0.0 0076 Standard_EXPORT GCE2d_MakeHyperbola(const gp_Ax2d& MajorAxis, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Boolean Sense); 0077 0078 0079 //! Axis is the local coordinate system of the hyperbola. 0080 //! The major radius of the hyperbola is on this "XAxis" and 0081 //! the minor radius is on the "YAxis" of the hyperbola. 0082 //! The status is "NegativeRadius" if MajorRadius < 0.0 or if 0083 //! MinorRadius < 0.0 0084 Standard_EXPORT GCE2d_MakeHyperbola(const gp_Ax22d& Axis, const Standard_Real MajorRadius, const Standard_Real MinorRadius); 0085 0086 //! Creates a hyperbol centered on the origin of the coordinate system 0087 //! Axis, with major and minor radii MajorRadius and 0088 //! MinorRadius, where the major axis is the "X Axis" 0089 //! of Axis (Axis is the local coordinate system of the hyperbola). 0090 //! The implicit orientation of the ellipse is: 0091 //! - the sense defined by Axis or H, 0092 //! - the sense defined by points Center, S1 and S2, 0093 //! - the trigonometric sense if Sense is not given or is true, or 0094 //! - the opposite sense if Sense is false. 0095 //! Warning 0096 //! If an error occurs (that is, when IsDone returns 0097 //! false), the Status function returns: 0098 //! - gce_NegativeRadius if MajorRadius or 0099 //! MinorRadius is less than 0.0, or 0100 //! - gce_InvertAxis if the major radius defined by 0101 //! Center and S1 is less than the minor radius 0102 //! defined by Center, S1 and S2.Make an Hyperbola with its center and two apexes. 0103 Standard_EXPORT GCE2d_MakeHyperbola(const gp_Pnt2d& S1, const gp_Pnt2d& S2, const gp_Pnt2d& Center); 0104 0105 //! Returns the constructed hyperbola. 0106 //! Exceptions: StdFail_NotDone if no hyperbola is constructed. 0107 Standard_EXPORT const Handle(Geom2d_Hyperbola)& Value() const; 0108 0109 operator const Handle(Geom2d_Hyperbola)& () const { return Value(); } 0110 0111 private: 0112 Handle(Geom2d_Hyperbola) TheHyperbola; 0113 }; 0114 0115 #endif // _GCE2d_MakeHyperbola_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |