1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesPlugin_Placement.h
5 // Author: Artem ZHIDKOV
7 #ifndef FeaturesPlugin_Placement_H_
8 #define FeaturesPlugin_Placement_H_
10 #include "FeaturesPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <GeomAlgoAPI_Placement.h>
14 class ModelAPI_ResultBody;
17 class FeaturesPlugin_Placement : public ModelAPI_Feature
21 inline static const std::string& ID()
23 static const std::string MY_PLACEMENT_ID("Placement");
24 return MY_PLACEMENT_ID;
26 /// attribute name of referenced face
27 inline static const std::string& BASE_FACE_ID()
29 static const std::string MY_BASE_FACE_ID("placement_base_face");
30 return MY_BASE_FACE_ID;
32 /// attribute name of attractable face
33 inline static const std::string& ATTRACT_FACE_ID()
35 static const std::string MY_ATTRACT_FACE_ID("placement_attractable_face");
36 return MY_ATTRACT_FACE_ID;
39 /// Returns the kind of a feature
40 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
42 static std::string MY_KIND = FeaturesPlugin_Placement::ID();
46 /// Creates a new part document if needed
47 FEATURESPLUGIN_EXPORT virtual void execute();
49 /// Request for initialization of data model of the feature: adding all attributes
50 FEATURESPLUGIN_EXPORT virtual void initAttributes();
52 /// Use plugin manager for features creation
53 FeaturesPlugin_Placement();
55 /// Load Naming data structure of the feature to the document
56 void LoadNamingDS(GeomAlgoAPI_Placement& theFeature,
57 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
58 std::shared_ptr<GeomAPI_Shape> theSlaveObject);