|
||||
File indexing completed on 2025-01-18 10:03:36
0001 // Created on: 1993-03-10 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 _Geom_Circle_HeaderFile 0018 #define _Geom_Circle_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Geom_Conic.hxx> 0024 #include <Standard_Integer.hxx> 0025 class gp_Circ; 0026 class gp_Ax2; 0027 class gp_Pnt; 0028 class gp_Vec; 0029 class gp_Trsf; 0030 class Geom_Geometry; 0031 0032 0033 class Geom_Circle; 0034 DEFINE_STANDARD_HANDLE(Geom_Circle, Geom_Conic) 0035 0036 //! Describes a circle in 3D space. 0037 //! A circle is defined by its radius and, as with any conic 0038 //! curve, is positioned in space with a right-handed 0039 //! coordinate system (gp_Ax2 object) where: 0040 //! - the origin is the center of the circle, and 0041 //! - the origin, "X Direction" and "Y Direction" define the 0042 //! plane of the circle. 0043 //! This coordinate system is the local coordinate 0044 //! system of the circle. 0045 //! The "main Direction" of this coordinate system is the 0046 //! vector normal to the plane of the circle. The axis, of 0047 //! which the origin and unit vector are respectively the 0048 //! origin and "main Direction" of the local coordinate 0049 //! system, is termed the "Axis" or "main Axis" of the circle. 0050 //! The "main Direction" of the local coordinate system 0051 //! gives an explicit orientation to the circle (definition of 0052 //! the trigonometric sense), determining the direction in 0053 //! which the parameter increases along the circle. 0054 //! The Geom_Circle circle is parameterized by an angle: 0055 //! P(U) = O + R*Cos(U)*XDir + R*Sin(U)*YDir, where: 0056 //! - P is the point of parameter U, 0057 //! - O, XDir and YDir are respectively the origin, "X 0058 //! Direction" and "Y Direction" of its local coordinate system, 0059 //! - R is the radius of the circle. 0060 //! The "X Axis" of the local coordinate system therefore 0061 //! defines the origin of the parameter of the circle. The 0062 //! parameter is the angle with this "X Direction". 0063 //! A circle is a closed and periodic curve. The period is 0064 //! 2.*Pi and the parameter range is [ 0, 2.*Pi [. 0065 class Geom_Circle : public Geom_Conic 0066 { 0067 0068 public: 0069 0070 0071 //! Constructs a circle by conversion of the gp_Circ circle C. 0072 Standard_EXPORT Geom_Circle(const gp_Circ& C); 0073 0074 //! Constructs a circle of radius Radius, where A2 locates the circle and 0075 //! defines its orientation in 3D space such that: 0076 //! - the center of the circle is the origin of A2, 0077 //! - the origin, "X Direction" and "Y Direction" of A2 0078 //! define the plane of the circle, 0079 //! - A2 is the local coordinate system of the circle. 0080 //! Note: It is possible to create a circle where Radius is equal to 0.0. 0081 //! raised if Radius < 0. 0082 Standard_EXPORT Geom_Circle(const gp_Ax2& A2, const Standard_Real Radius); 0083 0084 0085 //! Set <me> so that <me> has the same geometric properties as C. 0086 Standard_EXPORT void SetCirc (const gp_Circ& C); 0087 0088 //! Assigns the value R to the radius of this circle. 0089 //! Note: it is possible to have a circle with a radius equal to 0.0. 0090 //! Exceptions - Standard_ConstructionError if R is negative. 0091 Standard_EXPORT void SetRadius (const Standard_Real R); 0092 0093 0094 //! returns the non transient circle from gp with the same 0095 //! geometric properties as <me>. 0096 Standard_EXPORT gp_Circ Circ() const; 0097 0098 //! Returns the radius of this circle. 0099 Standard_EXPORT Standard_Real Radius() const; 0100 0101 //! Computes the parameter on the reversed circle for 0102 //! the point of parameter U on this circle. 0103 //! For a circle, the returned value is: 2.*Pi - U. 0104 Standard_EXPORT Standard_Real ReversedParameter (const Standard_Real U) const Standard_OVERRIDE; 0105 0106 //! Returns the eccentricity e = 0 for a circle. 0107 Standard_EXPORT Standard_Real Eccentricity() const Standard_OVERRIDE; 0108 0109 //! Returns the value of the first parameter of this 0110 //! circle. This is 0.0, which gives the start point of this circle, or 0111 //! The start point and end point of a circle are coincident. 0112 Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE; 0113 0114 //! Returns the value of the last parameter of this 0115 //! circle. This is 2.*Pi, which gives the end point of this circle. 0116 //! The start point and end point of a circle are coincident. 0117 Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE; 0118 0119 //! returns True. 0120 Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE; 0121 0122 //! returns True. 0123 Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE; 0124 0125 //! Returns in P the point of parameter U. 0126 //! P = C + R * Cos (U) * XDir + R * Sin (U) * YDir 0127 //! where C is the center of the circle , XDir the XDirection and 0128 //! YDir the YDirection of the circle's local coordinate system. 0129 Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE; 0130 0131 0132 //! Returns the point P of parameter U and the first derivative V1. 0133 Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1) const Standard_OVERRIDE; 0134 0135 0136 //! Returns the point P of parameter U, the first and second 0137 //! derivatives V1 and V2. 0138 Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE; 0139 0140 0141 //! Returns the point P of parameter u, the first second and third 0142 //! derivatives V1 V2 and V3. 0143 Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE; 0144 0145 0146 //! The returned vector gives the value of the derivative for the 0147 //! order of derivation N. 0148 //! Raised if N < 1. 0149 Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE; 0150 0151 //! Applies the transformation T to this circle. 0152 Standard_EXPORT void Transform (const gp_Trsf& T) Standard_OVERRIDE; 0153 0154 //! Creates a new object which is a copy of this circle. 0155 Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; 0156 0157 //! Dumps the content of me into the stream 0158 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; 0159 0160 0161 0162 0163 DEFINE_STANDARD_RTTIEXT(Geom_Circle,Geom_Conic) 0164 0165 protected: 0166 0167 0168 0169 0170 private: 0171 0172 0173 Standard_Real radius; 0174 0175 0176 }; 0177 0178 0179 0180 0181 0182 0183 0184 #endif // _Geom_Circle_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |