|
||||
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_MakeEllipse_HeaderFile 0018 #define _GCE2d_MakeEllipse_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_Ellipse.hxx> 0026 0027 class gp_Elips2d; 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 Ellipse from Geom2d. 0035 //! * Create an Ellipse from two apex and the center. 0036 //! Defines an ellipse in 2D space. 0037 //! The parametrization range is [0,2*PI]. 0038 //! The ellipse is a closed and periodic curve. 0039 //! The center of the ellipse is the "Location" point of its 0040 //! axis placement "XAxis". 0041 //! The "XAxis" of the ellipse defines the origin of the 0042 //! parametrization, it is the major axis of the ellipse. 0043 //! The YAxis is the minor axis of the ellipse. 0044 class GCE2d_MakeEllipse : public GCE2d_Root 0045 { 0046 public: 0047 0048 DEFINE_STANDARD_ALLOC 0049 0050 0051 0052 //! Creates an ellipse from a non persistent one from package gp 0053 Standard_EXPORT GCE2d_MakeEllipse(const gp_Elips2d& E); 0054 0055 0056 //! MajorAxis is the local coordinate system of the ellipse. 0057 //! It is the "XAxis". The minor axis is the YAxis of the 0058 //! ellipse. 0059 //! Sense give the sense of parametrization of the Ellipse. 0060 //! It is not forbidden to create an ellipse with MajorRadius = 0061 //! MinorRadius. 0062 //! The status is "InvertRadius" if MajorRadius < MinorRadius or 0063 //! "NegativeRadius" if MinorRadius < 0. 0064 Standard_EXPORT GCE2d_MakeEllipse(const gp_Ax2d& MajorAxis, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Boolean Sense = Standard_True); 0065 0066 0067 //! Axis is the local coordinate system of the ellipse. 0068 //! It is not forbidden to create an ellipse with MajorRadius = 0069 //! MinorRadius. 0070 //! The status is "InvertRadius" if MajorRadius < MinorRadius or 0071 //! "NegativeRadius" if MinorRadius < 0. 0072 Standard_EXPORT GCE2d_MakeEllipse(const gp_Ax22d& Axis, const Standard_Real MajorRadius, const Standard_Real MinorRadius); 0073 0074 //! Make an Ellipse centered on the point Center, where 0075 //! - the major axis of the ellipse is defined by Center and S1, 0076 //! - its major radius is the distance between Center and S1, and 0077 //! - its minor radius is the distance between S2 and the major axis. 0078 //! The implicit orientation of the ellipse is: 0079 //! - the sense defined by Axis or E, 0080 //! - the sense defined by points Center, S1 and S2, 0081 //! - the trigonometric sense if Sense is not given or is true, or 0082 //! - the opposite sense if Sense is false. 0083 Standard_EXPORT GCE2d_MakeEllipse(const gp_Pnt2d& S1, const gp_Pnt2d& S2, const gp_Pnt2d& Center); 0084 0085 //! Returns the constructed ellipse. 0086 //! Exceptions StdFail_NotDone if no ellipse is constructed. 0087 Standard_EXPORT const Handle(Geom2d_Ellipse)& Value() const; 0088 0089 operator const Handle(Geom2d_Ellipse)& () const { return Value(); } 0090 0091 private: 0092 Handle(Geom2d_Ellipse) TheEllipse; 0093 }; 0094 0095 #endif // _GCE2d_MakeEllipse_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |