1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Boolean.h
4 // Created: 07 June 2016
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesAPI_Boolean_H_
8 #define FeaturesAPI_Boolean_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_Boolean.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Integer;
18 class ModelHighAPI_Selection;
20 /// \class FeaturesAPI_Boolean
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Boolean feature.
23 class FeaturesAPI_Boolean: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit FeaturesAPI_Boolean(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 FeaturesAPI_Boolean(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const ModelHighAPI_Integer& theBoolType,
34 const std::list<ModelHighAPI_Selection>& theMainObjects,
35 const std::list<ModelHighAPI_Selection>& theToolObjects);
39 virtual ~FeaturesAPI_Boolean();
41 INTERFACE_3(FeaturesPlugin_Boolean::ID(),
42 boolType, FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger, /** Operation type */,
43 mainObjects, FeaturesPlugin_Boolean::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList, /** Main objects */,
44 toolObjects, FeaturesPlugin_Boolean::TOOL_LIST_ID(), ModelAPI_AttributeSelectionList, /** Tool objects*/)
46 /// Set operation type.
48 void setBoolType(const ModelHighAPI_Integer& theBoolType);
52 void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
56 void setToolObjects(const std::list<ModelHighAPI_Selection>& theToolObjects);
58 /// Dump wrapped feature
60 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
63 /// Pointer on Boolean object.
64 typedef std::shared_ptr<FeaturesAPI_Boolean> BooleanPtr;
66 /// \ingroup CPPHighAPI
67 /// \brief Create Boolean Cut feature.
69 BooleanPtr addCut(const std::shared_ptr<ModelAPI_Document>& thePart,
70 const std::list<ModelHighAPI_Selection>& theMainObjects,
71 const std::list<ModelHighAPI_Selection>& theToolObjects);
73 /// \ingroup CPPHighAPI
74 /// \brief Create Boolean Fuse feature.
76 BooleanPtr addFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
77 const std::list<ModelHighAPI_Selection>& theObjects);
79 /// \ingroup CPPHighAPI
80 /// \brief Create Boolean Fuse feature.
82 BooleanPtr addFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
83 const std::list<ModelHighAPI_Selection>& theMainObjects,
84 const std::list<ModelHighAPI_Selection>& theToolObjects);
86 /// \ingroup CPPHighAPI
87 /// \brief Create Boolean Common feature.
89 BooleanPtr addCommon(const std::shared_ptr<ModelAPI_Document>& thePart,
90 const std::list<ModelHighAPI_Selection>& theMainObjects,
91 const std::list<ModelHighAPI_Selection>& theToolObjects);
93 /// \ingroup CPPHighAPI
94 /// \brief Create Boolean Smash feature.
96 BooleanPtr addSmash(const std::shared_ptr<ModelAPI_Document>& thePart,
97 const std::list<ModelHighAPI_Selection>& theMainObjects,
98 const std::list<ModelHighAPI_Selection>& theToolObjects);
100 /// \ingroup CPPHighAPI
101 /// \brief Create Boolean Fill feature.
103 BooleanPtr addFill(const std::shared_ptr<ModelAPI_Document>& thePart,
104 const std::list<ModelHighAPI_Selection>& theMainObjects,
105 const std::list<ModelHighAPI_Selection>& theToolObjects);
107 #endif // FeaturesAPI_Boolean_H_