1 // File: FeaturesPlugin_Placement.h
3 // Author: Artem ZHIDKOV
5 #ifndef FeaturesPlugin_Placement_H_
6 #define FeaturesPlugin_Placement_H_
8 #include "FeaturesPlugin.h"
9 #include <ModelAPI_Feature.h>
10 #include <GeomAlgoAPI_Placement.h>
12 class ModelAPI_ResultBody;
15 class FeaturesPlugin_Placement : public ModelAPI_Feature
19 inline static const std::string& ID()
21 static const std::string MY_PLACEMENT_ID("Placement");
22 return MY_PLACEMENT_ID;
24 /// attribute name of referenced face
25 inline static const std::string& BASE_FACE_ID()
27 static const std::string MY_BASE_FACE_ID("placement_base_face");
28 return MY_BASE_FACE_ID;
30 /// attribute name of attractable face
31 inline static const std::string& ATTRACT_FACE_ID()
33 static const std::string MY_ATTRACT_FACE_ID("placement_attractable_face");
34 return MY_ATTRACT_FACE_ID;
37 /// Returns the kind of a feature
38 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
40 static std::string MY_KIND = FeaturesPlugin_Placement::ID();
44 /// Creates a new part document if needed
45 FEATURESPLUGIN_EXPORT virtual void execute();
47 /// Request for initialization of data model of the feature: adding all attributes
48 FEATURESPLUGIN_EXPORT virtual void initAttributes();
50 /// Use plugin manager for features creation
51 FeaturesPlugin_Placement();
53 /// Load Naming data structure of the feature to the document
54 void LoadNamingDS(GeomAlgoAPI_Placement& theFeature,
55 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
56 std::shared_ptr<GeomAPI_Shape> theSlaveObject);