|
|
|||
File indexing completed on 2026-10-05 09:22:03
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_MakeCirc2d_HeaderFile 0018 #define _gce_MakeCirc2d_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <gp_Circ2d.hxx> 0024 #include <gce_Root.hxx> 0025 class gp_Ax2d; 0026 class gp_Ax22d; 0027 class gp_Pnt2d; 0028 0029 //! This class implements construction algorithms for `gp_Circ2d`. 0030 //! Supported constructions include: 0031 //! - circle from axis and radius; 0032 //! - circle concentric to another one, through point or at signed offset; 0033 //! - circle through three points; 0034 //! - circle from center and radius; 0035 //! - circle from center and one point. 0036 class gce_MakeCirc2d : public gce_Root 0037 { 0038 public: 0039 DEFINE_STANDARD_ALLOC 0040 0041 //! Creates a circle from axis and radius. 0042 //! @note The location of `XAxis` is the circle center. 0043 //! @note Construction fails with `gce_NegativeRadius` if `Radius` is negative. 0044 //! @param[in] XAxis axis placement 0045 //! @param[in] Radius radius value 0046 //! @param[in] Sense orientation flag 0047 Standard_EXPORT gce_MakeCirc2d(const gp_Ax2d& XAxis, 0048 const double Radius, 0049 const bool Sense = true); 0050 0051 //! Creates a circle from local coordinate system and radius. 0052 //! @note The location of `Axis` is the circle center. 0053 //! @note Construction fails with `gce_NegativeRadius` if `Radius` is negative. 0054 //! @param[in] Axis axis definition 0055 //! @param[in] Radius radius value 0056 Standard_EXPORT gce_MakeCirc2d(const gp_Ax22d& Axis, const double Radius); 0057 0058 //! Creates a circle concentric to input circle with signed offset. 0059 //! @note Result radius is `Abs(Circ.Radius() + Dist)`. 0060 //! @param[in] Circ source circle 0061 //! @param[in] Dist signed distance 0062 Standard_EXPORT gce_MakeCirc2d(const gp_Circ2d& Circ, const double Dist); 0063 0064 //! Creates a circle concentric to input circle and passing through a point. 0065 //! @param[in] Circ source circle 0066 //! @param[in] Point reference point 0067 Standard_EXPORT gce_MakeCirc2d(const gp_Circ2d& Circ, const gp_Pnt2d& Point); 0068 0069 //! Creates a circle passing through three points. 0070 //! @note The local coordinate system of the result is derived 0071 //! from input points. 0072 //! @param[in] P1 first point 0073 //! @param[in] P2 second point 0074 //! @param[in] P3 third point 0075 Standard_EXPORT gce_MakeCirc2d(const gp_Pnt2d& P1, const gp_Pnt2d& P2, const gp_Pnt2d& P3); 0076 0077 //! Creates a circle from center and radius. 0078 //! @note Construction fails with `gce_NegativeRadius` if `Radius` is negative. 0079 //! @param[in] Center center point 0080 //! @param[in] Radius radius value 0081 //! @param[in] Sense orientation flag 0082 Standard_EXPORT gce_MakeCirc2d(const gp_Pnt2d& Center, 0083 const double Radius, 0084 const bool Sense = true); 0085 0086 //! Creates a circle from center and one point on circle. 0087 //! @note `Sense` controls result orientation. 0088 //! @param[in] Center center point 0089 //! @param[in] Point reference point 0090 //! @param[in] Sense orientation flag 0091 Standard_EXPORT gce_MakeCirc2d(const gp_Pnt2d& Center, 0092 const gp_Pnt2d& Point, 0093 const bool Sense = true); 0094 0095 //! Returns the constructed circle. 0096 //! Exceptions StdFail_NotDone if no circle is constructed. 0097 //! @return resulting circle 0098 Standard_EXPORT const gp_Circ2d& Value() const; 0099 0100 //! Alias for Value() returning a copy. 0101 //! @return resulting object 0102 gp_Circ2d Operator() const { return Value(); } 0103 0104 //! Conversion operator returning the constructed object. 0105 //! @return resulting object 0106 operator gp_Circ2d() const { return Operator(); } 0107 0108 private: 0109 gp_Circ2d TheCirc2d; 0110 }; 0111 0112 #endif // _gce_MakeCirc2d_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|