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>
12 class FeaturesPlugin_Boolean : public ModelAPI_Feature
16 inline static const std::string& ID()
18 static const std::string MY_CUT_ID("Boolean");
21 /// attribute name of referenced object
22 inline static const std::string& OBJECT_ID()
24 static const std::string MY_OBJECT_ID("main_object");
27 /// attribute name of tool object
28 inline static const std::string& TOOL_ID()
30 static const std::string MY_TOOL_ID("tool_object");
33 /// attribute name of operation type
34 inline static const std::string& TYPE_ID()
36 static const std::string MY_TOOL_ID("bool_type");
47 /// Returns the kind of a feature
48 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
50 static std::string MY_KIND = FeaturesPlugin_Boolean::ID();
54 /// Creates a new part document if needed
55 FEATURESPLUGIN_EXPORT virtual void execute();
57 /// Request for initialization of data model of the feature: adding all attributes
58 FEATURESPLUGIN_EXPORT virtual void initAttributes();
60 /// Use plugin manager for features creation
61 FeaturesPlugin_Boolean();
64 boost::shared_ptr<GeomAPI_Shape> getShape(const std::string& theAttrName);