Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/GC_MakeCircle.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: 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_MakeCircle_HeaderFile
0018 #define _GC_MakeCircle_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_Circle.hxx>
0026 
0027 class gp_Circ;
0028 class gp_Ax2;
0029 class gp_Pnt;
0030 class gp_Dir;
0031 class gp_Ax1;
0032 
0033 //! Implements construction algorithms for circles in 3D space.
0034 //!
0035 //! * Create a circle parallel to another and passing
0036 //! through a point.
0037 //! * Create a Circle parallel to another at the distance
0038 //! Dist.
0039 //! * Create a Circle passing through 3 points.
0040 //! * Create a Circle with its center and the normal of its
0041 //! plane and its radius.
0042 //! * Create a Circle with its axis and radius.
0043 //! The circle parameter is the angle in radians.
0044 //! The parametrization range is [0,2*PI].
0045 //! The circle is a closed and periodic curve.
0046 //! The center of the circle is the Location point of its axis
0047 //! placement. The XDirection of the axis placement defines the
0048 //! origin of the parametrization.
0049 class GC_MakeCircle : public GC_Root
0050 {
0051 public:
0052   DEFINE_STANDARD_ALLOC
0053 
0054   //! Creates a circle from a `gp_Circ`.
0055   //! @param[in] theC source circle
0056   Standard_EXPORT GC_MakeCircle(const gp_Circ& theC);
0057 
0058   //! Creates a circle from axis placement and radius.
0059   //! @param[in] theA2 local coordinate system of the circle
0060   //! @param[in] theRadius circle radius
0061   //! @note Radius equal to `0.0` is allowed.
0062   //! @note The status is `gce_NegativeRadius` if `theRadius < 0.0`.
0063   Standard_EXPORT GC_MakeCircle(const gp_Ax2& theA2, const double theRadius);
0064 
0065   //! Creates a circle concentric to the input circle with an offset radius.
0066   //! @param[in] theCirc reference circle
0067   //! @param[in] theDist radius offset
0068   Standard_EXPORT GC_MakeCircle(const gp_Circ& theCirc, const double theDist);
0069 
0070   //! Creates a circle concentric to the input circle and passing through the input point.
0071   //! @param[in] theCirc source circle
0072   //! @param[in] thePoint point on resulting circle
0073   Standard_EXPORT GC_MakeCircle(const gp_Circ& theCirc, const gp_Pnt& thePoint);
0074 
0075   //! Creates a circle passing through three points.
0076   //! @param[in] theP1 first point
0077   //! @param[in] theP2 second point
0078   //! @param[in] theP3 third point
0079   Standard_EXPORT GC_MakeCircle(const gp_Pnt& theP1, const gp_Pnt& theP2, const gp_Pnt& theP3);
0080 
0081   //! Creates a circle from center point, normal and radius.
0082   //! @param[in] theCenter circle center
0083   //! @param[in] theNorm normal direction of circle plane
0084   //! @param[in] theRadius circle radius
0085   Standard_EXPORT GC_MakeCircle(const gp_Pnt& theCenter,
0086                                 const gp_Dir& theNorm,
0087                                 const double  theRadius);
0088 
0089   //! Creates a circle from center point, axis point and radius.
0090   //! @param[in] theCenter circle center
0091   //! @param[in] thePtAxis point defining normal direction
0092   //! @param[in] theRadius circle radius
0093   //! @note The direction is defined by vector (`theCenter`,`thePtAxis`).
0094   Standard_EXPORT GC_MakeCircle(const gp_Pnt& theCenter,
0095                                 const gp_Pnt& thePtAxis,
0096                                 const double  theRadius);
0097 
0098   //! Creates a circle from axis and radius.
0099   //! @param[in] theAxis circle axis
0100   //! @param[in] theRadius circle radius
0101   Standard_EXPORT GC_MakeCircle(const gp_Ax1& theAxis, const double theRadius);
0102 
0103   //! Returns the constructed circle.
0104   //! Exceptions
0105   //! StdFail_NotDone if no circle is constructed.
0106   //! @return resulting circle
0107   Standard_EXPORT const occ::handle<Geom_Circle>& Value() const;
0108 
0109   //! Conversion operator returning the constructed object.
0110   //! @return resulting object
0111   operator const occ::handle<Geom_Circle>&() const { return Value(); }
0112 
0113 private:
0114   occ::handle<Geom_Circle> TheCircle;
0115 };
0116 
0117 #endif // _GC_MakeCircle_HeaderFile