|
|
|||
Warning, file /include/opencascade/Geom2d_Conic.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // Created on: 1993-03-24 0002 // Created by: JCV 0003 // Copyright (c) 1993-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 _Geom2d_Conic_HeaderFile 0018 #define _Geom2d_Conic_HeaderFile 0019 0020 #include <gp_Ax22d.hxx> 0021 #include <Geom2d_Curve.hxx> 0022 0023 class Geom2d_Conic; 0024 DEFINE_STANDARD_HANDLE(Geom2d_Conic, Geom2d_Curve) 0025 0026 //! The abstract class Conic describes the common 0027 //! behavior of conic curves in 2D space and, in 0028 //! particular, their general characteristics. The Geom2d 0029 //! package provides four specific classes of conics: 0030 //! Geom2d_Circle, Geom2d_Ellipse, 0031 //! Geom2d_Hyperbola and Geom2d_Parabola. 0032 //! A conic is positioned in the plane with a coordinate 0033 //! system (gp_Ax22d object), where the origin is the 0034 //! center of the conic (or the apex in case of a parabola). 0035 //! This coordinate system is the local coordinate 0036 //! system of the conic. It gives the conic an explicit 0037 //! orientation, determining the direction in which the 0038 //! parameter increases along the conic. The "X Axis" of 0039 //! the local coordinate system also defines the origin of 0040 //! the parameter of the conic. 0041 class Geom2d_Conic : public Geom2d_Curve 0042 { 0043 public: 0044 //! Modifies this conic, redefining its local coordinate system 0045 //! partially, by assigning theA as its axis 0046 void SetAxis(const gp_Ax22d& theA) { pos.SetAxis(theA); } 0047 0048 //! Assigns the origin and unit vector of axis theA to the 0049 //! origin of the local coordinate system of this conic and X Direction. 0050 //! The other unit vector of the local coordinate system 0051 //! of this conic is recomputed normal to theA, without 0052 //! changing the orientation of the local coordinate 0053 //! system (right-handed or left-handed). 0054 void SetXAxis(const gp_Ax2d& theAX) { pos.SetXAxis(theAX); } 0055 0056 //! Assigns the origin and unit vector of axis theA to the 0057 //! origin of the local coordinate system of this conic and Y Direction. 0058 //! The other unit vector of the local coordinate system 0059 //! of this conic is recomputed normal to theA, without 0060 //! changing the orientation of the local coordinate 0061 //! system (right-handed or left-handed). 0062 void SetYAxis(const gp_Ax2d& theAY) { pos.SetYAxis(theAY); } 0063 0064 //! Modifies this conic, redefining its local coordinate 0065 //! system partially, by assigning theP as its origin. 0066 void SetLocation(const gp_Pnt2d& theP) { pos.SetLocation(theP); } 0067 0068 //! Returns the "XAxis" of the conic. 0069 //! This axis defines the origin of parametrization of the conic. 0070 //! This axis and the "Yaxis" define the local coordinate system 0071 //! of the conic. 0072 //! -C++: return const& 0073 Standard_EXPORT gp_Ax2d XAxis() const; 0074 0075 //! Returns the "YAxis" of the conic. 0076 //! The "YAxis" is perpendicular to the "Xaxis". 0077 Standard_EXPORT gp_Ax2d YAxis() const; 0078 0079 //! returns the eccentricity value of the conic e. 0080 //! e = 0 for a circle 0081 //! 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius) 0082 //! e > 1 for a hyperbola 0083 //! e = 1 for a parabola 0084 Standard_EXPORT virtual Standard_Real Eccentricity() const = 0; 0085 0086 //! Returns the location point of the conic. 0087 //! For the circle, the ellipse and the hyperbola it is the center of 0088 //! the conic. For the parabola it is the vertex of the parabola. 0089 const gp_Pnt2d& Location() const { return pos.Location(); } 0090 0091 //! Returns the local coordinates system of the conic. 0092 const gp_Ax22d& Position() const { return pos; } 0093 0094 //! Reverses the direction of parameterization of <me>. 0095 //! The local coordinate system of the conic is modified. 0096 Standard_EXPORT void Reverse() Standard_OVERRIDE; 0097 0098 //! Returns the parameter on the reversed curve for 0099 //! the point of parameter U on <me>. 0100 Standard_EXPORT virtual Standard_Real ReversedParameter(const Standard_Real U) const 0101 Standard_OVERRIDE = 0; 0102 0103 //! Returns GeomAbs_CN which is the global continuity of any conic. 0104 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; 0105 0106 //! Returns True, the order of continuity of a conic is infinite. 0107 Standard_EXPORT Standard_Boolean IsCN(const Standard_Integer N) const Standard_OVERRIDE; 0108 0109 //! Dumps the content of me into the stream 0110 Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, 0111 Standard_Integer theDepth = -1) const Standard_OVERRIDE; 0112 0113 DEFINE_STANDARD_RTTIEXT(Geom2d_Conic, Geom2d_Curve) 0114 0115 protected: 0116 gp_Ax22d pos; 0117 }; 0118 0119 #endif // _Geom2d_Conic_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|