1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesPlugin_Boolean.h
4 // Created: 02 Sept 2014
5 // Author: Vitaly SMETANNIKOV
7 #ifndef FeaturesPlugin_Cut_H_
8 #define FeaturesPlugin_Cut_H_
10 #include "FeaturesPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <GeomAPI_Shape.h>
13 #include <GeomAlgoAPI_Boolean.h>
15 class FeaturesPlugin_Boolean : public ModelAPI_Feature
19 inline static const std::string& ID()
21 static const std::string MY_ID("Boolean");
24 /// attribute name of referenced object
25 inline static const std::string& OBJECT_ID()
27 static const std::string MY_OBJECT_ID("main_object");
30 /// attribute name of tool object
31 inline static const std::string& TOOL_ID()
33 static const std::string MY_TOOL_ID("tool_object");
36 /// attribute name of operation type
37 inline static const std::string& TYPE_ID()
39 static const std::string MY_TYPE_ID("bool_type");
50 /// Returns the kind of a feature
51 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
53 static std::string MY_KIND = FeaturesPlugin_Boolean::ID();
57 /// Creates a new part document if needed
58 FEATURESPLUGIN_EXPORT virtual void execute();
60 /// Request for initialization of data model of the feature: adding all attributes
61 FEATURESPLUGIN_EXPORT virtual void initAttributes();
63 /// Use plugin manager for features creation
64 FeaturesPlugin_Boolean();
67 std::shared_ptr<GeomAPI_Shape> getShape(const std::string& theAttrName);
69 /// Load Naming data structure of the feature to the document
70 void LoadNamingDS(GeomAlgoAPI_Boolean* theFeature,
71 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
72 std::shared_ptr<GeomAPI_Shape> theObject,
73 std::shared_ptr<GeomAPI_Shape> theTool,