Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Torus.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Torus.h
4 // Created:     20 Mar 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_TORUS_H_
8 #define GEOMALGOAPI_TORUS_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_Ax2.h>
13
14 /**\class GeomAlgoAPI_Torus
15  * \ingroup DataAlgo
16  * \brief Allows to create Torus Primitives
17  */
18 class GeomAlgoAPI_Torus : public GeomAlgoAPI_MakeShape
19 {
20  public:
21   GEOMALGOAPI_EXPORT GeomAlgoAPI_Torus();
22
23   /// Creates a torus.
24   /// \param theAxis The axis of the torus
25   /// \param theRadius The radius of the torus
26   /// \param theRingRadius The ring radius of the torus
27   GEOMALGOAPI_EXPORT GeomAlgoAPI_Torus(std::shared_ptr<GeomAPI_Ax2> theAxis,
28                                        const double theRadius,
29                                        const double theRingRadius);
30
31   /// Checks if data for the torus construction is OK.
32   GEOMALGOAPI_EXPORT bool check();
33
34   /// Builds the torus.
35   GEOMALGOAPI_EXPORT void build();
36
37  private:
38   std::shared_ptr<GeomAPI_Ax2> myAxis; /// Axis of the torus.
39   double myRadius; /// Radius of the torus.
40   double myRingRadius; /// Ring radius of the torus.
41 };
42
43 #endif // GEOMALGOAPI_TORUS_H_