1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Circ.h
4 // Created: 24 Jun 2014
5 // Author: Artem ZHIDKOV
7 #ifndef GeomAPI_Circ_H_
8 #define GeomAPI_Circ_H_
10 #include <GeomAPI_Interface.h>
17 /**\class GeomAPI_Circ
22 class GeomAPI_Circ : public GeomAPI_Interface
26 /** \brief Constructs a circle of radius Radius, where theAx2 locates the circle and defines its orientation in 3D space such that:\n
27 * - the center of the circle is the origin of theAx2;\n
28 * - the origin, "X Direction" and "Y Direction" of theAx2 define the plane of the circle;\n
29 * - theAx2 is the local coordinate system of the circle.\n
30 * Note: It is possible to create a circle where Radius is equal to 0.0. raised if Radius < 0.
32 GEOMAPI_EXPORT GeomAPI_Circ(const std::shared_ptr<GeomAPI_Ax2> theAx2,
33 const double theRadius);
35 /// Creation of circle defined by center point, direction and circle radius
36 GEOMAPI_EXPORT GeomAPI_Circ(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
37 const std::shared_ptr<GeomAPI_Dir>& theDir, double theRadius);
39 /// Return center of the circle
40 GEOMAPI_EXPORT const std::shared_ptr<GeomAPI_Pnt> center() const;
42 /// Return radius of the circle
43 GEOMAPI_EXPORT double radius() const;
45 /// Project point on circle
46 GEOMAPI_EXPORT const std::shared_ptr<GeomAPI_Pnt> project(
47 const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
49 /** \brief Computes the parameter of a given point on a circle. The point must be
50 * located either on the circle itself or relatively to the latter
51 * at a distance less than the tolerance value. Return FALSE if the point
52 * is beyond the tolerance limit or if computation fails.
53 * Max Tolerance value is currently limited to 1.e-4
54 * \param[in] thePoint point of origin.
55 * \param[in] theTolerance tolerance of computation.
56 * \param[out] theParameter resulting parameter.
58 GEOMAPI_EXPORT const bool parameter(const std::shared_ptr<GeomAPI_Pnt> thePoint,
59 const double theTolerance,
60 double& theParameter) const;