1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
3 // File: PrimitivesAPI_Cylinder.h
4 // Created: 12 Jan 2017
5 // Author: Clarisse Genrault
7 #ifndef PRIMITIVESAPI_CYLINDER_H_
8 #define PRIMITIVESAPI_CYLINDER_H_
10 #include "PrimitivesAPI.h"
12 #include <PrimitivesPlugin_Cylinder.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Selection;
20 /// \class PrimitivesAPI_Cylinder
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for primitive Cylinder feature.
23 class PrimitivesAPI_Cylinder: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const ModelHighAPI_Selection& theBasePoint,
34 const ModelHighAPI_Selection& theAxis,
35 const ModelHighAPI_Double& theRadius,
36 const ModelHighAPI_Double& theHeight);
38 /// Constructor with values.
40 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
41 const ModelHighAPI_Selection& theBasePoint,
42 const ModelHighAPI_Selection& theAxis,
43 const ModelHighAPI_Double& theRadius,
44 const ModelHighAPI_Double& theHeight,
45 const ModelHighAPI_Double& theAngle);
49 virtual ~PrimitivesAPI_Cylinder();
51 INTERFACE_6(PrimitivesPlugin_Cylinder::ID(),
52 creationMethod, PrimitivesPlugin_Cylinder::CREATION_METHOD(),
53 ModelAPI_AttributeString, /** Creation method */,
54 basePoint, PrimitivesPlugin_Cylinder::BASE_POINT_ID(),
55 ModelAPI_AttributeSelection, /** Base point */,
56 axis, PrimitivesPlugin_Cylinder::AXIS_ID(),
57 ModelAPI_AttributeSelection, /** Axis */,
58 radius, PrimitivesPlugin_Cylinder::RADIUS_ID(),
59 ModelAPI_AttributeDouble, /** Radius */,
60 height, PrimitivesPlugin_Cylinder::HEIGHT_ID(),
61 ModelAPI_AttributeDouble, /** Height */,
62 angle, PrimitivesPlugin_Cylinder::ANGLE_ID(),
63 ModelAPI_AttributeDouble, /** Angle */)
67 void setSizes(const ModelHighAPI_Double& theRadius,
68 const ModelHighAPI_Double& theHeight);
70 /// Dump wrapped feature
72 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
75 /// Pointer on primitive Cylinder object
76 typedef std::shared_ptr<PrimitivesAPI_Cylinder> CylinderPtr;
78 /// \ingroup CPPHighAPI
79 /// \brief Create primitive Cylinder feature.
81 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
82 const ModelHighAPI_Selection& theBasePoint,
83 const ModelHighAPI_Selection& theAxis,
84 const ModelHighAPI_Double& theRadius,
85 const ModelHighAPI_Double& theHeight);
87 /// \ingroup CPPHighAPI
88 /// \brief Create primitive Cylinder feature.
90 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
91 const ModelHighAPI_Selection& theBasePoint,
92 const ModelHighAPI_Selection& theAxis,
93 const ModelHighAPI_Double& theRadius,
94 const ModelHighAPI_Double& theHeight,
95 const ModelHighAPI_Double& theAngle);
97 /// \ingroup CPPHighAPI
98 /// \brief Create primitive Cylinder feature.
100 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
101 const ModelHighAPI_Double& theRadius,
102 const ModelHighAPI_Double& theHeight);
104 /// \ingroup CPPHighAPI
105 /// \brief Create primitive Cylinder feature.
107 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
108 const ModelHighAPI_Double& theRadius,
109 const ModelHighAPI_Double& theHeight,
110 const ModelHighAPI_Double& theAngle);
112 #endif // PRIMITIVESAPI_CYLINDER_H_