1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
3 // File: PrimitivesAPI_Sphere.h
4 // Created: 16 Mar 2017
5 // Author: Clarisse Genrault
7 #ifndef PRIMITIVESAPI_SPHERE_H_
8 #define PRIMITIVESAPI_SPHERE_H_
10 #include "PrimitivesAPI.h"
12 #include <PrimitivesPlugin_Sphere.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Selection;
20 /// \class PrimitivesAPI_Sphere
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for primitive Sphere feature.
23 class PrimitivesAPI_Sphere: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit PrimitivesAPI_Sphere(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 explicit PrimitivesAPI_Sphere(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const ModelHighAPI_Selection& theCenterPoint,
34 const ModelHighAPI_Double& theRadius);
38 virtual ~PrimitivesAPI_Sphere();
40 INTERFACE_2(PrimitivesPlugin_Sphere::ID(),
41 centerPoint, PrimitivesPlugin_Sphere::CENTER_POINT_ID(),
42 ModelAPI_AttributeSelection, /** Center point */,
43 radius, PrimitivesPlugin_Sphere::RADIUS_ID(),
44 ModelAPI_AttributeDouble, /** Radius */)
48 void setCenterPoint(const ModelHighAPI_Selection& theCenterPoint);
52 void setRadius(const ModelHighAPI_Double& theRadius);
54 /// Dump wrapped feature
56 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
59 /// Pointer on primitive Sphere object
60 typedef std::shared_ptr<PrimitivesAPI_Sphere> SpherePtr;
62 /// \ingroup CPPHighAPI
63 /// \brief Create primitive Sphere feature.
65 SpherePtr addSphere(const std::shared_ptr<ModelAPI_Document>& thePart,
66 const ModelHighAPI_Selection& theCenterPoint,
67 const ModelHighAPI_Double& theRadius);
69 /// \ingroup CPPHighAPI
70 /// \brief Create primitive Sphere feature.
72 SpherePtr addSphere(const std::shared_ptr<ModelAPI_Document>& thePart,
73 const ModelHighAPI_Double& theRadius);
75 #endif // PRIMITIVESAPI_SPHERE_H_