|
|
|||
File indexing completed on 2026-10-06 09:20:18
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 _GC_MakeArcOfCircle_HeaderFile 0018 #define _GC_MakeArcOfCircle_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <GC_Root.hxx> 0025 #include <Geom_TrimmedCurve.hxx> 0026 0027 class gp_Circ; 0028 class gp_Pnt; 0029 class gp_Vec; 0030 0031 //! Implements construction algorithms for an 0032 //! arc of circle in 3D space. The result is a Geom_TrimmedCurve curve. 0033 //! A MakeArcOfCircle object provides a framework for: 0034 //! - defining the construction of the arc of circle, 0035 //! - implementing the construction algorithm, and 0036 //! - consulting the results. In particular, the 0037 //! Value function returns the constructed arc of circle. 0038 class GC_MakeArcOfCircle : public GC_Root 0039 { 0040 public: 0041 DEFINE_STANDARD_ALLOC 0042 0043 //! Creates an arc of circle from angular bounds. 0044 //! @param[in] theCirc source circle 0045 //! @param[in] theAlpha1 first angle (radians) 0046 //! @param[in] theAlpha2 second angle (radians) 0047 //! @param[in] theSense orientation of resulting arc 0048 Standard_EXPORT GC_MakeArcOfCircle(const gp_Circ& theCirc, 0049 const double theAlpha1, 0050 const double theAlpha2, 0051 const bool theSense); 0052 0053 //! Creates an arc of circle from a point and an angular bound. 0054 //! @param[in] theCirc source circle 0055 //! @param[in] theP point on circle 0056 //! @param[in] theAlpha target angle (radians) 0057 //! @param[in] theSense orientation of resulting arc 0058 Standard_EXPORT GC_MakeArcOfCircle(const gp_Circ& theCirc, 0059 const gp_Pnt& theP, 0060 const double theAlpha, 0061 const bool theSense); 0062 0063 //! Creates an arc of circle from two points on the circle. 0064 //! @param[in] theCirc source circle 0065 //! @param[in] theP1 first point on circle 0066 //! @param[in] theP2 second point on circle 0067 //! @param[in] theSense orientation of resulting arc 0068 Standard_EXPORT GC_MakeArcOfCircle(const gp_Circ& theCirc, 0069 const gp_Pnt& theP1, 0070 const gp_Pnt& theP2, 0071 const bool theSense); 0072 0073 //! Creates an arc of circle passing through three points. 0074 //! @param[in] theP1 first point 0075 //! @param[in] theP2 second point 0076 //! @param[in] theP3 third point 0077 Standard_EXPORT GC_MakeArcOfCircle(const gp_Pnt& theP1, const gp_Pnt& theP2, const gp_Pnt& theP3); 0078 0079 //! Creates an arc of circle from two points and a tangent at the first point. 0080 //! @param[in] theP1 start point 0081 //! @param[in] theV tangent vector at start point 0082 //! @param[in] theP2 end point 0083 //! @note The tangent direction is given by the input vector. 0084 //! The orientation of the arc is: 0085 //! - the sense determined by the order of the three input points; 0086 //! - the sense defined by the input vector; or 0087 //! - for the other constructors: 0088 //! - the sense of the source circle if the orientation flag is true, or 0089 //! - the opposite sense if `theSense` is false. 0090 //! @note Angles are expressed in radians. 0091 //! @note Construction fails with `gce_ConfusedPoints` if `theP1` and `theP2` 0092 //! are coincident. 0093 //! @note Construction fails with `gce_IntersectionError` if the supporting 0094 //! lines used to define circle center do not intersect. 0095 Standard_EXPORT GC_MakeArcOfCircle(const gp_Pnt& theP1, const gp_Vec& theV, const gp_Pnt& theP2); 0096 0097 //! Returns the constructed arc of circle. 0098 //! Exceptions StdFail_NotDone if no arc of circle is constructed. 0099 //! @return resulting arc 0100 Standard_EXPORT const occ::handle<Geom_TrimmedCurve>& Value() const; 0101 0102 //! Conversion operator returning the constructed object. 0103 //! @return resulting object 0104 operator const occ::handle<Geom_TrimmedCurve>&() const { return Value(); } 0105 0106 private: 0107 occ::handle<Geom_TrimmedCurve> TheArc; 0108 }; 0109 0110 #endif // _GC_MakeArcOfCircle_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|