1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D
3 // File: FeaturesPlugin_Scale.h
4 // Created: 13 Jan 2017
5 // Author: Clarisse Genrault (CEA)
7 #ifndef FEATURESPLUGIN_SCALE_H_
8 #define FEATURESPLUGIN_SCALE_H_
10 #include <FeaturesPlugin.h>
12 #include <ModelAPI_Feature.h>
14 #include <GeomAlgoAPI_Scale.h>
16 /** \class FeaturesPlugin_Scale
18 * \brief Feature for changing the scale of an object.
20 class FeaturesPlugin_Scale : public ModelAPI_Feature
24 inline static const std::string& ID()
26 static const std::string MY_SCALE_ID("Scale");
30 /// Attribute name of referenced objects.
31 inline static const std::string& OBJECTS_LIST_ID()
33 static const std::string MY_OBJECTS_LIST_ID("main_objects");
34 return MY_OBJECTS_LIST_ID;
37 /// Attribute name of center point.
38 inline static const std::string& CENTER_POINT_ID()
40 static const std::string MY_CENTER_POINT_ID("center_point");
41 return MY_CENTER_POINT_ID;
44 /// Attribute name of scale factor.
45 inline static const std::string& SCALE_FACTOR_ID()
47 static const std::string MY_SCALE_FACTOR_ID("scale_factor");
48 return MY_SCALE_FACTOR_ID;
51 /// \return the kind of a feature.
52 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
54 static std::string MY_KIND = FeaturesPlugin_Scale::ID();
58 /// Creates a new part document if needed.
59 FEATURESPLUGIN_EXPORT virtual void execute();
61 /// Request for initialization of data model of the feature: adding all attributes.
62 FEATURESPLUGIN_EXPORT virtual void initAttributes();
64 /// Use plugin manager for features creation.
65 FeaturesPlugin_Scale();
68 /// Perform the naming
69 void loadNamingDS(GeomAlgoAPI_Scale& theScaleAlgo,
70 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
71 std::shared_ptr<GeomAPI_Shape> theBaseShape);
74 #endif // FEATURESPLUGIN_SCALE_H_