1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: FeaturesPlugin_Movement.h
4 // Created: 8 June 2015
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesPlugin_Movement_H_
8 #define FeaturesPlugin_Movement_H_
10 #include <FeaturesPlugin.h>
12 #include <ModelAPI_Feature.h>
14 #include <GeomAlgoAPI_Movement.h>
16 /** \class FeaturesPlugin_Movement
18 * \brief Feature for movement objects along the axis.
20 class FeaturesPlugin_Movement : public ModelAPI_Feature
24 inline static const std::string& ID()
26 static const std::string MY_MOVEMENT_ID("Movement");
27 return MY_MOVEMENT_ID;
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 an axis.
38 inline static const std::string& AXIS_OBJECT_ID()
40 static const std::string MY_AXIS_OBJECT_ID("axis_object");
41 return MY_AXIS_OBJECT_ID;
44 /// Attribute name of distance.
45 inline static const std::string& DISTANCE_ID()
47 static const std::string MY_DISTANCE_ID("distance");
48 return MY_DISTANCE_ID;
51 /// \return the kind of a feature.
52 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
54 static std::string MY_KIND = FeaturesPlugin_Movement::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_Movement();
68 void LoadNamingDS(const GeomAlgoAPI_Movement& theMovementAlgo,
69 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
70 std::shared_ptr<GeomAPI_Shape> theBaseShape);