X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Circ.h;h=32cac89686e2ee8ebb7e5a0b2054cf773c4bb3fd;hb=592f9b635dddfc888cc2e14d8e996e0e21d904b3;hp=2532ef2edd3bc7c95f5cd99a72821757fec285b1;hpb=3874b57fe5aba25ff5aee2a07654fc23c1ee8eb0;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Circ.h b/src/GeomAPI/GeomAPI_Circ.h index 2532ef2ed..32cac8968 100644 --- a/src/GeomAPI/GeomAPI_Circ.h +++ b/src/GeomAPI/GeomAPI_Circ.h @@ -10,6 +10,7 @@ #include #include +class GeomAPI_Ax2; class GeomAPI_Pnt; class GeomAPI_Dir; @@ -18,22 +19,45 @@ class GeomAPI_Dir; * \brief Circle in 3D */ -class GEOMAPI_EXPORT GeomAPI_Circ : public GeomAPI_Interface +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 theAx2, + const double theRadius); + /// Creation of circle defined by center point, direction and circle radius - GeomAPI_Circ(const std::shared_ptr& theCenter, + GEOMAPI_EXPORT GeomAPI_Circ(const std::shared_ptr& theCenter, const std::shared_ptr& theDir, double theRadius); /// Return center of the circle - const std::shared_ptr center() const; + GEOMAPI_EXPORT const std::shared_ptr center() const; /// Return radius of the circle - double radius() const; + GEOMAPI_EXPORT double radius() const; /// Project point on circle - const std::shared_ptr project( + GEOMAPI_EXPORT const std::shared_ptr project( const std::shared_ptr& 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 thePoint, + const double theTolerance, + double& theParameter) const; }; #endif