Salome HOME
#1112 tab key doesn't work on the last field of left panels
[modules/shaper.git] / src / GeomAPI / GeomAPI_Circ2d.h
index 58a292c162dd49fec0ce435562a1f5be72526d52..478c9986a76e7d3648569f78c7973b71e1c3a4a7 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        GeomAPI_Circ2d.h
 // Created:     29 May 2014
 // Author:      Artem ZHIDKOV
@@ -6,7 +8,7 @@
 #define GeomAPI_Circ2d_H_
 
 #include <GeomAPI_Interface.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class GeomAPI_Pnt2d;
 class GeomAPI_Dir2d;
@@ -16,26 +18,52 @@ class GeomAPI_Dir2d;
  * \brief Circle in 2D
  */
 
-class GEOMAPI_EXPORT GeomAPI_Circ2d : public GeomAPI_Interface
+class GeomAPI_Circ2d : public GeomAPI_Interface
 {
  public:
   /// Creation of circle defined by center point and circle radius
-  GeomAPI_Circ2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                 const boost::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint);
+  GEOMAPI_EXPORT 
+  GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                 const std::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint);
 
   /// Creation of circle defined by center point, direction and circle radius
-  GeomAPI_Circ2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theCenter,
-                 const boost::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius);
+  GEOMAPI_EXPORT 
+  GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                 const std::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius);
 
   /// Return center of the circle
-  const boost::shared_ptr<GeomAPI_Pnt2d> center() const;
+  GEOMAPI_EXPORT 
+  const std::shared_ptr<GeomAPI_Pnt2d> center() const;
 
   /// Return radius of the circle
+  GEOMAPI_EXPORT 
   double radius() const;
 
   /// Project point on line
-  const boost::shared_ptr<GeomAPI_Pnt2d> project(
-      const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
+  GEOMAPI_EXPORT 
+  const std::shared_ptr<GeomAPI_Pnt2d> project(
+      const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
+
+  /** \brief Computes the parameter of a given point on a circle. The point must be
+   *         located either on the circle itself or relatively to the latter
+   *         at a distance less than the tolerance value. Return FALSE if the point
+   *         is beyond the tolerance limit or if computation fails.
+   *         Max Tolerance value is currently limited to 1.e-4
+   *  \param[in] thePoint point of origin.
+   *  \param[in] theTolerance tolerance of computation.
+   *  \param[out] theParameter resulting parameter.
+   */
+  GEOMAPI_EXPORT const bool parameter(const std::shared_ptr<GeomAPI_Pnt2d> thePoint,
+                                      const double theTolerance,
+                                      double& theParameter) const;
+
+  /** \brief Returns in thePoint the point of parameter theU.
+   *  P = C + R * Cos (U) * XDir + R * Sin (U) * YDir where C is the center of the circle,
+   *  XDir the XDirection and YDir the YDirection of the circle's local coordinate system.
+   *  \param[in] theU parameter.
+   *  \param[out] thePoint resulting point.
+   */
+  GEOMAPI_EXPORT void D0(const double theU, std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 };
 
 #endif