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_Box
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for primitive Box 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.
31 /*PRIMITIVESAPI_EXPORT
32 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const ModelHighAPI_Double& theDx,
34 const ModelHighAPI_Double& theDy,
35 const ModelHighAPI_Double& theDz);*/
37 /// Constructor with values.
39 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
40 const ModelHighAPI_Selection& theBasePoint,
41 const ModelHighAPI_Selection& theAxis,
42 const ModelHighAPI_Double& theRadius,
43 const ModelHighAPI_Double& theHeight);
45 /// Constructor with values.
47 explicit PrimitivesAPI_Cylinder(const std::shared_ptr<ModelAPI_Feature>& theFeature,
48 const ModelHighAPI_Selection& theBasePoint,
49 const ModelHighAPI_Selection& theAxis,
50 const ModelHighAPI_Double& theRadius,
51 const ModelHighAPI_Double& theHeight,
52 const ModelHighAPI_Double& theAngle);
56 virtual ~PrimitivesAPI_Cylinder();
58 INTERFACE_6(PrimitivesPlugin_Cylinder::ID(),
59 creationMethod, PrimitivesPlugin_Cylinder::CREATION_METHOD(),
60 ModelAPI_AttributeString, /** Creation method */,
61 basePoint, PrimitivesPlugin_Cylinder::BASE_POINT_ID(),
62 ModelAPI_AttributeSelection, /** Dimension in X */,
63 axis, PrimitivesPlugin_Cylinder::AXIS_ID(),
64 ModelAPI_AttributeSelection, /** Dimension in Y */,
65 radius, PrimitivesPlugin_Cylinder::RADIUS_ID(),
66 ModelAPI_AttributeDouble, /** Dimension in Z */,
67 height, PrimitivesPlugin_Cylinder::HEIGHT_ID(),
68 ModelAPI_AttributeDouble, /** First point */,
69 angle, PrimitivesPlugin_Cylinder::ANGLE_ID(),
70 ModelAPI_AttributeDouble, /** Second point */)
74 void setSizes(const ModelHighAPI_Double& theRadius,
75 const ModelHighAPI_Double& theHeight);
77 /// Dump wrapped feature
79 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
82 /// Pointer on primitive Box object
83 typedef std::shared_ptr<PrimitivesAPI_Cylinder> CylinderPtr;
85 /// \ingroup CPPHighAPI
86 /// \brief Create primitive Box feature.
88 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
89 const ModelHighAPI_Selection& theBasePoint,
90 const ModelHighAPI_Selection& theAxis,
91 const ModelHighAPI_Double& theRadius,
92 const ModelHighAPI_Double& theHeight);
94 /// \ingroup CPPHighAPI
95 /// \brief Create primitive Box feature.
97 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
98 const ModelHighAPI_Selection& theBasePoint,
99 const ModelHighAPI_Selection& theAxis,
100 const ModelHighAPI_Double& theRadius,
101 const ModelHighAPI_Double& theHeight,
102 const ModelHighAPI_Double& theAngle);
104 /// \ingroup CPPHighAPI
105 /// \brief Create primitive Box feature.
107 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
108 const ModelHighAPI_Double& theRadius,
109 const ModelHighAPI_Double& theHeight);
111 /// \ingroup CPPHighAPI
112 /// \brief Create primitive Box feature.
114 CylinderPtr addCylinder(const std::shared_ptr<ModelAPI_Document>& thePart,
115 const ModelHighAPI_Double& theRadius,
116 const ModelHighAPI_Double& theHeight,
117 const ModelHighAPI_Double& theAngle);
119 #endif // PRIMITIVESAPI_CYLINDER_H_