|
||||
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_MakeElips_HeaderFile 0018 #define _gce_MakeElips_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <gp_Elips.hxx> 0025 #include <gce_Root.hxx> 0026 class gp_Ax2; 0027 class gp_Pnt; 0028 0029 0030 //! This class implements the following algorithms used to 0031 //! create an ellipse from gp. 0032 //! 0033 //! * Create an ellipse from its center, and two points: 0034 //! one on the ciconference giving the major radius, the 0035 //! other giving the value of the small radius. 0036 class gce_MakeElips : public gce_Root 0037 { 0038 public: 0039 0040 DEFINE_STANDARD_ALLOC 0041 0042 0043 //! The major radius of the ellipse is on the "XAxis" and the 0044 //! minor radius is on the "YAxis" of the ellipse. The "XAxis" 0045 //! is defined with the "XDirection" of A2 and the "YAxis" is 0046 //! defined with the "YDirection" of A2. 0047 //! Warnings : 0048 //! It is not forbidden to create an ellipse with 0049 //! MajorRadius = MinorRadius. 0050 Standard_EXPORT gce_MakeElips(const gp_Ax2& A2, const Standard_Real MajorRadius, const Standard_Real MinorRadius); 0051 0052 //! Make an ellipse with its center and two points. 0053 //! Warning 0054 //! The MakeElips class does not prevent the 0055 //! construction of an ellipse where the MajorRadius is 0056 //! equal to the MinorRadius. 0057 //! If an error occurs (that is, when IsDone returns 0058 //! false), the Status function returns: 0059 //! - gce_InvertRadius if MajorRadius is less than MinorRadius; 0060 //! - gce_NegativeRadius if MinorRadius is less than 0.0; 0061 //! - gce_NullAxis if the points S1 and Center are coincident; or 0062 //! - gce_InvertAxis if: 0063 //! - the major radius computed with Center and S1 0064 //! is less than the minor radius computed with Center, S1 and S2, or 0065 //! - Center, S1 and S2 are collinear. 0066 Standard_EXPORT gce_MakeElips(const gp_Pnt& S1, const gp_Pnt& S2, const gp_Pnt& Center); 0067 0068 //! Returns the constructed ellipse. 0069 //! Exceptions StdFail_NotDone if no ellipse is constructed. 0070 Standard_EXPORT const gp_Elips& Value() const; 0071 0072 Standard_EXPORT const gp_Elips& Operator() const; 0073 Standard_EXPORT operator gp_Elips() const; 0074 0075 0076 0077 0078 protected: 0079 0080 0081 0082 0083 0084 private: 0085 0086 0087 0088 gp_Elips TheElips; 0089 0090 0091 }; 0092 0093 0094 0095 0096 0097 0098 0099 #endif // _gce_MakeElips_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |