Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Cylinder.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Cylinder.h
4 // Created:     05 Jan 2016
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_CYLINDER_H_
8 #define GEOMALGOAPI_CYLINDER_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_Ax2.h>
13 #include <GeomAPI_Pnt.h>
14
15 /**\class GeomAlgoAPI_Cylinder
16  * \ingroup DataAlgo
17  * \brief Allows to create Cylinder Primitives
18  */
19 class GeomAlgoAPI_Cylinder : public GeomAlgoAPI_MakeShape
20 {
21  public:
22   GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder();
23
24   /// Creates a cylinder
25   /// \param theAxis The axis of the cylinder
26   /// \param theRadius The radius of the cylinder
27   /// \param theHeight The height of the cylinder
28   /// \param theAngle The covering angle of the cylinder
29   GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder(std::shared_ptr<GeomAPI_Ax2> theAxis,
30                                           const double theRadius,
31                                           const double theHeight);
32
33   /// Creates a cylinder
34   /// \param theAxis The axis of the cylinder
35   /// \param theRadius The radius of the cylinder
36   /// \param theHeight The height of the cylinder
37   /// \param theAngle The covering angle of the cylinder
38   GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder(std::shared_ptr<GeomAPI_Ax2> theAxis,
39                                           const double theRadius,
40                                           const double theHeight,
41                                           const double theAngle);
42
43   /// Checks if data for the cyminder construction is OK.
44   GEOMALGOAPI_EXPORT bool check();
45
46   /// Builds the cylinder.
47   GEOMALGOAPI_EXPORT void build();
48
49  private:
50   bool withAngle;
51   std::shared_ptr<GeomAPI_Pnt> myBasePoint;
52   std::shared_ptr<GeomAPI_Ax2> myAxis; /// Axis of the cylinder.
53   double myRadius; /// Radius of the cylinder.
54   double myHeight; /// Height of the cylinder.
55   double myAngle; /// Covering polar angle of the cylinder;
56 };
57
58
59 #endif // GEOMALGOAPI_CYLINDER_H_