Salome HOME
Fix for the issue #1755 : for now the sketch solver receives all modified entities...
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_ExtrusionBoolean.h
index a5963a348598bf8189a2a0ce43ff6f71f9e1335a..4e4cbad45d636de552156e348db961f8152bd91d 100644 (file)
@@ -7,51 +7,30 @@
 #ifndef FeaturesPlugin_ExtrusionBoolean_H_
 #define FeaturesPlugin_ExtrusionBoolean_H_
 
-#include <FeaturesPlugin_CompositeBoolean.h>
+#include "FeaturesPlugin_Extrusion.h"
+#include "FeaturesPlugin_CompositeBoolean.h"
 
-/** \class FeaturesPlugin_ExtrusionBoolean
- *  \ingroup Plugins
- */
-class FeaturesPlugin_ExtrusionBoolean : public FeaturesPlugin_CompositeBoolean
+/// \class FeaturesPlugin_ExtrusionBoolean
+/// \ingroup Plugins
+/// \brief Interface for the composite extrusion feature.
+class FeaturesPlugin_ExtrusionBoolean: public FeaturesPlugin_Extrusion, public FeaturesPlugin_CompositeBoolean
 {
- public:
-  /// Attribute name of an object from which the extrusion grows.
-  inline static const std::string& FROM_OBJECT_ID()
-  {
-    static const std::string MY_FROM_OBJECT_ID("from_object");
-    return MY_FROM_OBJECT_ID;
-  }
-
-  /// Attribute name of extrusion from size.
-  inline static const std::string& FROM_SIZE_ID()
-  {
-    static const std::string MY_FROM_SIZE_ID("from_size");
-    return MY_FROM_SIZE_ID;
-  }
-
-  /// attribute name of an object to which the extrusion grows.
-  inline static const std::string& TO_OBJECT_ID()
-  {
-    static const std::string MY_TO_OBJECT_ID("to_object");
-    return MY_TO_OBJECT_ID;
-  }
-
-  /// Attribute name of extrusion to size.
-  inline static const std::string& TO_SIZE_ID()
-  {
-    static const std::string MY_TO_SIZE_ID("to_size");
-    return MY_TO_SIZE_ID;
-  }
+public:
+  /// Request for initialization of data model of the feature: adding all attributes.
+  FEATURESPLUGIN_EXPORT virtual void initAttributes();
 
 protected:
-  /// Init attributes for extrusion.
-  virtual void initMakeSolidsAttributes();
+  FeaturesPlugin_ExtrusionBoolean(){};
 
-  /// Create solids from faces with extrusion.
-  virtual ListOfShape MakeSolids(const ListOfShape& theFaces);
+  // Creates extrusions.
+  bool makeGeneration(ListOfShape& theBaseShapes,
+                      ListOfMakeShape& theMakeShapes);
 
-protected:
-  FeaturesPlugin_ExtrusionBoolean(){};
+  /// Stores generation history.
+  void storeGenerationHistory(ResultBodyPtr theResultBody,
+                              const GeomShapePtr theBaseShape,
+                              const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape,
+                              int& theTag);
 };
 
 #endif