1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_Cylinder.h
4 // Created: 05 Jan 2016
5 // Author: Clarisse Genrault (CEA)
7 #ifndef GEOMALGOAPI_CYLINDER_H_
8 #define GEOMALGOAPI_CYLINDER_H_
10 #include <GeomAlgoAPI_MakeShape.h>
12 #include <GeomAPI_Ax2.h>
13 #include <GeomAPI_Pnt.h>
15 /**\class GeomAlgoAPI_Cylinder
17 * \brief Allows to create Cylinder Primitives
19 class GeomAlgoAPI_Cylinder : public GeomAlgoAPI_MakeShape
22 GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder();
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 GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder(std::shared_ptr<GeomAPI_Ax2> theAxis,
29 const double theRadius,
30 const double theHeight);
32 /// Creates a cylinder.
33 /// \param theAxis The axis of the cylinder
34 /// \param theRadius The radius of the cylinder
35 /// \param theHeight The height of the cylinder
36 /// \param theAngle The covering angle of the cylinder
37 GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder(std::shared_ptr<GeomAPI_Ax2> theAxis,
38 const double theRadius,
39 const double theHeight,
40 const double theAngle);
42 /// Checks if data for the cyminder construction is OK.
43 GEOMALGOAPI_EXPORT bool check();
45 /// Builds the cylinder.
46 GEOMALGOAPI_EXPORT void build();
49 bool withAngle; /// Boolean indicating if the type of cylinder (full or portion).
50 std::shared_ptr<GeomAPI_Pnt> myBasePoint; /// Center of the lower base of the cylinder.
51 std::shared_ptr<GeomAPI_Ax2> myAxis; /// Axis of the cylinder.
52 double myRadius; /// Radius of the cylinder.
53 double myHeight; /// Height of the cylinder.
54 double myAngle; /// Covering polar angle of the cylinder;
58 #endif // GEOMALGOAPI_CYLINDER_H_