|
|
|||
File indexing completed on 2026-07-23 09:17: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_MakeHypr_HeaderFile 0018 #define _gce_MakeHypr_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <gp_Hypr.hxx> 0025 #include <gce_Root.hxx> 0026 class gp_Ax2; 0027 class gp_Pnt; 0028 0029 //! This class implements the following algorithms used to 0030 //! create Hyperbola from gp. 0031 //! * Create an Hyperbola from its center, and two points: 0032 //! one on its axis of symmetry giving the major radius, the 0033 //! other giving the value of the small radius. 0034 //! The three points give the plane of the hyperbola. 0035 //! * Create an hyperbola from its axisplacement and its 0036 //! MajorRadius and its MinorRadius. 0037 //! 0038 //! ^YAxis 0039 //! | 0040 //! FirstConjugateBranch 0041 //! | 0042 //! Other | Main 0043 //! --------------------- C ------------------------------>XAxis 0044 //! Branch | Branch 0045 //! | 0046 //! | 0047 //! SecondConjugateBranch 0048 //! | 0049 //! 0050 //! The local cartesian coordinate system of the ellipse is an 0051 //! axis placement (two axis). 0052 //! 0053 //! The "XDirection" and the "YDirection" of the axis placement 0054 //! define the plane of the hyperbola. 0055 //! 0056 //! The "Direction" of the axis placement defines the normal axis 0057 //! to the hyperbola's plane. 0058 //! 0059 //! The "XAxis" of the hyperbola ("Location", "XDirection") is the 0060 //! major axis and the "YAxis" of the hyperbola ("Location", 0061 //! "YDirection") is the minor axis. 0062 //! 0063 //! Warnings : 0064 //! The major radius (on the major axis) can be lower than the 0065 //! minor radius (on the minor axis). 0066 class gce_MakeHypr : public gce_Root 0067 { 0068 public: 0069 DEFINE_STANDARD_ALLOC 0070 0071 //! A2 is the local coordinate system of the hyperbola. 0072 //! In the local coordinates system A2 the equation of the 0073 //! hyperbola is : 0074 //! X*X / MajorRadius*MajorRadius - Y*Y / MinorRadius*MinorRadius = 1.0 0075 //! It is not forbidden to create an Hyperbola with MajorRadius = 0076 //! MinorRadius. 0077 //! For the hyperbola the MajorRadius can be lower than the 0078 //! MinorRadius. 0079 //! The status is "NegativeRadius" if MajorRadius < 0.0 and 0080 //! "InvertRadius" if MinorRadius > MajorRadius. 0081 Standard_EXPORT gce_MakeHypr(const gp_Ax2& A2, 0082 const Standard_Real MajorRadius, 0083 const Standard_Real MinorRadius); 0084 0085 //! Constructs a hyperbola 0086 //! - centered on the point Center, where: 0087 //! - the plane of the hyperbola is defined by Center, S1 and S2, 0088 //! - its major axis is defined by Center and S1, 0089 //! - its major radius is the distance between Center and S1, and 0090 //! - its minor radius is the distance between S2 and the major axis. 0091 //! Warning 0092 //! If an error occurs (that is, when IsDone returns 0093 //! false), the Status function returns: 0094 //! - gce_NegativeRadius if MajorRadius is less than 0.0; 0095 //! - gce_InvertRadius if: 0096 //! - the major radius (computed with Center, S1) is 0097 //! less than the minor radius (computed with Center, S1 and S2), or 0098 //! - MajorRadius is less than MinorRadius; or 0099 //! - gce_ColinearPoints if S1, S2 and Center are collinear. 0100 Standard_EXPORT gce_MakeHypr(const gp_Pnt& S1, const gp_Pnt& S2, const gp_Pnt& Center); 0101 0102 //! Returns the constructed hyperbola. 0103 //! Exceptions StdFail_NotDone if no hyperbola is constructed. 0104 Standard_EXPORT const gp_Hypr& Value() const; 0105 0106 Standard_EXPORT const gp_Hypr& Operator() const; 0107 Standard_EXPORT operator gp_Hypr() const; 0108 0109 protected: 0110 private: 0111 gp_Hypr TheHypr; 0112 }; 0113 0114 #endif // _gce_MakeHypr_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|