Salome HOME
Deleting the option of "Scale" feature from dimensions in X, in Y and in Z.
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Scale.h
1 // Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Scale.h
4 // Created:     24 Jan 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef FEATURESAPI_SCALE_H_
8 #define FEATURESAPI_SCALE_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Scale.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Dumper;
19 class ModelHighAPI_Selection;
20
21 /// \class FeaturesAPI_Scale
22 /// \ingroup CPPHighAPI
23 /// \brief Interface for Scale feature.
24 class FeaturesAPI_Scale: public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values.
28   FEATURESAPI_EXPORT
29   explicit FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30
31   /// Constructor with values.
32   FEATURESAPI_EXPORT
33   explicit FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature,
34                              const std::list<ModelHighAPI_Selection>& theMainObjects,
35                              const ModelHighAPI_Selection& theCenterPoint,
36                              const ModelHighAPI_Double& theScaleFactor);
37
38   /// Destructor.
39   FEATURESAPI_EXPORT
40   virtual ~FeaturesAPI_Scale();
41
42   INTERFACE_3(FeaturesPlugin_Scale::ID(),
43               mainObjects, FeaturesPlugin_Scale::OBJECTS_LIST_ID(),
44               ModelAPI_AttributeSelectionList, /** Main objects */,
45               centerPoint, FeaturesPlugin_Scale::CENTER_POINT_ID(),
46               ModelAPI_AttributeSelection, /** Center point */,
47               scaleFactor, FeaturesPlugin_Scale::SCALE_FACTOR_ID(),
48               ModelAPI_AttributeDouble, /** Scale factor */)
49
50   /// Set main objects.
51   FEATURESAPI_EXPORT
52   void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
53
54   /// Modify center_point attribute of the feature.
55   FEATURESAPI_EXPORT
56   void setCenterPoint(const ModelHighAPI_Selection& theCenterPoint);
57
58   /// Modify Creation Method and scale_factor attribute of the feature.
59   FEATURESAPI_EXPORT
60   void setScaleFactor(const ModelHighAPI_Double& theScaleFactor);
61
62   /// Dump wrapped feature
63   FEATURESAPI_EXPORT
64   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
65 };
66
67 /// Pointer on Scale object.
68 typedef std::shared_ptr<FeaturesAPI_Scale> ScalePtr;
69
70 /// \ingroup CPPHighAPI
71 /// \brief Create Scale feature.
72 FEATURESAPI_EXPORT
73 ScalePtr addScale(const std::shared_ptr<ModelAPI_Document>& thePart,
74                   const std::list<ModelHighAPI_Selection>& theMainObjects,
75                   const ModelHighAPI_Selection& theCenterPoint,
76                   const ModelHighAPI_Double& theScaleFactor);
77
78 #endif // FEATURESAPI_SCALE_H_