X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Circ2d.h;h=42e47defaba1018dcc460823afbae2dd476b5ac7;hb=bdbfb368d71ed11cc0391354a7d86c880cd94949;hp=1226a5f78f20cb3553b337d65f25271ac236bb78;hpb=a3508b5b0db5dd5857049f3f046bd628030d9bb9;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Circ2d.h b/src/GeomAPI/GeomAPI_Circ2d.h index 1226a5f78..42e47defa 100644 --- a/src/GeomAPI/GeomAPI_Circ2d.h +++ b/src/GeomAPI/GeomAPI_Circ2d.h @@ -10,8 +10,10 @@ #include #include +class GeomAPI_Ax3; class GeomAPI_Pnt2d; class GeomAPI_Dir2d; +class GeomAPI_Shape; /**\class GeomAPI_Circ2d * \ingroup DataModel @@ -22,27 +24,48 @@ class GeomAPI_Circ2d : public GeomAPI_Interface { public: /// Creation of circle defined by center point and circle radius - GEOMAPI_EXPORT + GEOMAPI_EXPORT GeomAPI_Circ2d(const std::shared_ptr& theCenter, const std::shared_ptr& theCirclePoint); /// Creation of circle defined by center point, direction and circle radius - GEOMAPI_EXPORT + GEOMAPI_EXPORT GeomAPI_Circ2d(const std::shared_ptr& theCenter, const std::shared_ptr& theDir, double theRadius); /// Return center of the circle - GEOMAPI_EXPORT + GEOMAPI_EXPORT const std::shared_ptr center() const; /// Return radius of the circle - GEOMAPI_EXPORT + GEOMAPI_EXPORT double radius() const; /// Project point on line - GEOMAPI_EXPORT + 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; + + /** \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& thePoint); }; #endif