1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
3 // File: PrimitivesAPI_Cone.h
4 // Created: 20 Mar 2017
5 // Author: Clarisse Genrault
7 #ifndef PRIMITIVESAPI_CONE_H_
8 #define PRIMITIVESAPI_CONE_H_
10 #include "PrimitivesAPI.h"
12 #include <PrimitivesPlugin_Cone.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Selection;
20 /// \class PrimitivesAPI_Cone
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for primitive Cone feature.
23 class PrimitivesAPI_Cone: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit PrimitivesAPI_Cone(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 explicit PrimitivesAPI_Cone(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const ModelHighAPI_Selection& theBasePoint,
34 const ModelHighAPI_Selection& theAxis,
35 const ModelHighAPI_Double& theBaseRadius,
36 const ModelHighAPI_Double& theTopRadius,
37 const ModelHighAPI_Double& theHeight);
41 virtual ~PrimitivesAPI_Cone();
43 INTERFACE_5(PrimitivesPlugin_Cone::ID(),
44 basePoint, PrimitivesPlugin_Cone::BASE_POINT_ID(),
45 ModelAPI_AttributeSelection, /** Base point */,
46 axis, PrimitivesPlugin_Cone::AXIS_ID(),
47 ModelAPI_AttributeSelection, /** Axis */,
48 baseRadius, PrimitivesPlugin_Cone::BASE_RADIUS_ID(),
49 ModelAPI_AttributeDouble, /** Base radius */,
50 topRadius, PrimitivesPlugin_Cone::TOP_RADIUS_ID(),
51 ModelAPI_AttributeDouble, /** Top radius */,
52 height, PrimitivesPlugin_Cone::HEIGHT_ID(),
53 ModelAPI_AttributeDouble, /** Height */)
57 void setRadius(const ModelHighAPI_Double& theBaseRadius,
58 const ModelHighAPI_Double& theTopRadius);
62 void setHeight(const ModelHighAPI_Double& theHeight);
64 /// Dump wrapped feature
66 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
69 /// Pointer on primitive Cone object
70 typedef std::shared_ptr<PrimitivesAPI_Cone> ConePtr;
72 /// \ingroup CPPHighAPI
73 /// \brief Create primitive Cone feature.
75 ConePtr addCone(const std::shared_ptr<ModelAPI_Document>& thePart,
76 const ModelHighAPI_Selection& theBasePoint,
77 const ModelHighAPI_Selection& theAxis,
78 const ModelHighAPI_Double& theBaseRadius,
79 const ModelHighAPI_Double& theTopRadius,
80 const ModelHighAPI_Double& theHeight);
82 /// \ingroup CPPHighAPI
83 /// \brief Create primitive Cone feature.
85 ConePtr addCone(const std::shared_ptr<ModelAPI_Document>& thePart,
86 const ModelHighAPI_Double& theBaseRadius,
87 const ModelHighAPI_Double& theTopRadius,
88 const ModelHighAPI_Double& theHeight);
90 #endif // PRIMITIVESAPI_CONE_H_