Salome HOME
[Code coverage GeomAlgoAPI]: Remove default constructors of algorithms
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Cone.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Cone.h
4 // Created:     20 Mar 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_CONE_H_
8 #define GEOMALGOAPI_CONE_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_Ax2.h>
13
14 /**\class GeomAlgoAPI_Cone
15  * \ingroup DataAlgo
16  * \brief Allows to create Cone Primitives
17  */
18 class GeomAlgoAPI_Cone : public GeomAlgoAPI_MakeShape
19 {
20  public:
21   /// Creates a cone.
22   /// \param theAxis The axis of the cone
23   /// \param theBaseRadius The base radius of the cone
24   /// \param theTopRadius The top radius of the cone
25   /// \param theHeight The height of the cone
26   GEOMALGOAPI_EXPORT GeomAlgoAPI_Cone(std::shared_ptr<GeomAPI_Ax2> theAxis,
27                                       const double theBaseRadius,
28                                       const double theTopRadius,
29                                       const double theHeight);
30
31   /// Checks if data for the cone construction is OK.
32   GEOMALGOAPI_EXPORT bool check();
33
34   /// Builds the cone.
35   GEOMALGOAPI_EXPORT void build();
36
37  private:
38   std::shared_ptr<GeomAPI_Ax2> myAxis; /// Axis of the cone.
39   double myBaseRadius; /// Base radius of the cone.
40   double myTopRadius; /// Top radius of the cone.
41   double myHeight; /// Height of the cone.
42 };
43
44 #endif // GEOMALGOAPI_CONE_H_