1 // File: FeaturesPlugin_Boolean.h
2 // Created: 02 Sept 2014
3 // Author: Vitaly SMETANNIKOV
5 #ifndef FeaturesPlugin_Cut_H_
6 #define FeaturesPlugin_Cut_H_
8 #include "FeaturesPlugin.h"
9 #include <ModelAPI_Feature.h>
10 #include <GeomAPI_Shape.h>
11 #include <GeomAlgoAPI_Boolean.h>
13 class FeaturesPlugin_Boolean : public ModelAPI_Feature
17 inline static const std::string& ID()
19 static const std::string MY_CUT_ID("Boolean");
22 /// attribute name of referenced object
23 inline static const std::string& OBJECT_ID()
25 static const std::string MY_OBJECT_ID("main_object");
28 /// attribute name of tool object
29 inline static const std::string& TOOL_ID()
31 static const std::string MY_TOOL_ID("tool_object");
34 /// attribute name of operation type
35 inline static const std::string& TYPE_ID()
37 static const std::string MY_TOOL_ID("bool_type");
48 /// Returns the kind of a feature
49 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
51 static std::string MY_KIND = FeaturesPlugin_Boolean::ID();
55 /// Creates a new part document if needed
56 FEATURESPLUGIN_EXPORT virtual void execute();
58 /// Request for initialization of data model of the feature: adding all attributes
59 FEATURESPLUGIN_EXPORT virtual void initAttributes();
61 /// Use plugin manager for features creation
62 FeaturesPlugin_Boolean();
65 std::shared_ptr<GeomAPI_Shape> getShape(const std::string& theAttrName);
67 /// Load Naming data structure of the feature to the document
68 void LoadNamingDS(GeomAlgoAPI_Boolean* theFeature,
69 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
70 std::shared_ptr<GeomAPI_Shape> theObject,
71 std::shared_ptr<GeomAPI_Shape> theTool,