X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_ExtrusionBoolean.h;h=4e4cbad45d636de552156e348db961f8152bd91d;hb=fb54db5e1466b16dfc029c4a7364a67a9a6a8c24;hp=c8962430dc775cf6ed2977aa15804bf2c7e2e98f;hpb=77b93142eb8ba33bfb9a42040c2fd8926ffea5c8;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.h b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.h index c8962430d..4e4cbad45 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.h +++ b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.h @@ -7,76 +7,30 @@ #ifndef FeaturesPlugin_ExtrusionBoolean_H_ #define FeaturesPlugin_ExtrusionBoolean_H_ -#include +#include "FeaturesPlugin_Extrusion.h" +#include "FeaturesPlugin_CompositeBoolean.h" -/** \class FeaturesPlugin_ExtrusionBoolean - * \ingroup Plugins - * \brief Interface for the composite extrusion feature. - */ -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 for creation method - inline static const std::string& CREATION_METHOD() - { - static const std::string METHOD_ATTR("CreationMethod"); - return METHOD_ATTR; - } - - /// attribute name of extrusion size - inline static const std::string& TO_SIZE_ID() - { - static const std::string MY_TO_SIZE_ID("to_size"); - return MY_TO_SIZE_ID; - } - - /// attribute name of extrusion 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 offset - inline static const std::string& TO_OFFSET_ID() - { - static const std::string MY_TO_OFFSET_ID("to_offset"); - return MY_TO_OFFSET_ID; - } - - /// 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 offset - inline static const std::string& FROM_OFFSET_ID() - { - static const std::string MY_FROM_OFFSET_ID("from_offset"); - return MY_FROM_OFFSET_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 void makeSolids(const ListOfShape& theFaces, - ListOfShape& theResults, - std::list>& theAlgos); + // 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 theMakeShape, + int& theTag); }; #endif