]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAPI/GeomAPI_Circ.h
Salome HOME
Improvement #651: Arc direction must be flexible
[modules/shaper.git] / src / GeomAPI / GeomAPI_Circ.h
index 71ede7631191fcebb7cafe906944a10eb8ecc64b..3791071dd0e35890be5ba40bfa916de0294b32cc 100644 (file)
@@ -10,6 +10,7 @@
 #include <GeomAPI_Interface.h>
 #include <memory>
 
+class GeomAPI_Ax2;
 class GeomAPI_Pnt;
 class GeomAPI_Dir;
 
@@ -21,6 +22,16 @@ class GeomAPI_Dir;
 class GeomAPI_Circ : public GeomAPI_Interface
 {
  public:
+
+  /** \brief Constructs a circle of radius Radius, where theAx2 locates the circle and defines its orientation in 3D space such that:\n
+   *  - the center of the circle is the origin of theAx2;\n
+   *  - the origin, "X Direction" and "Y Direction" of theAx2 define the plane of the circle;\n
+   *  - theAx2 is the local coordinate system of the circle.\n
+   *    Note: It is possible to create a circle where Radius is equal to 0.0. raised if Radius < 0.
+   */
+  GEOMAPI_EXPORT GeomAPI_Circ(const std::shared_ptr<GeomAPI_Ax2> theAx2,
+                              const double theRadius);
+
   /// Creation of circle defined by center point, direction and circle radius
   GEOMAPI_EXPORT GeomAPI_Circ(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
                const std::shared_ptr<GeomAPI_Dir>& theDir, double theRadius);
@@ -34,6 +45,18 @@ class GeomAPI_Circ : public GeomAPI_Interface
   /// Project point on circle
   GEOMAPI_EXPORT const std::shared_ptr<GeomAPI_Pnt> project(
       const std::shared_ptr<GeomAPI_Pnt>& 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] theOrigin point of origin.
+   *  \param[in] theDir direction of axis.
+   */
+  GEOMAPI_EXPORT const bool parameter(const std::shared_ptr<GeomAPI_Pnt> thePoint,
+                                      const double theTolerance,
+                                      double& theParameter) const;
 };
 
 #endif