X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_RevolutionBoolean.h;h=2d6fab5af22a5b313461208cea1d7cf570c339bc;hb=4f565b2204d3fba046aa8c851abada2a5a17bf6c;hp=b645190f7f8f193594a170075999174e48a65a21;hpb=ea4d65430ad05a8f47f4c2d95c4b09260d6ed3ab;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h b/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h index b645190f7..2d6fab5af 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h +++ b/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h @@ -7,82 +7,31 @@ #ifndef FeaturesPlugin_RevolutionBoolean_H_ #define FeaturesPlugin_RevolutionBoolean_H_ -#include - -/** \class FeaturesPlugin_RevolutionBoolean - * \ingroup Plugins - * \brief Interface for the composite revolution feature. - */ -class FeaturesPlugin_RevolutionBoolean : public FeaturesPlugin_CompositeBoolean +#include "FeaturesPlugin_Revolution.h" +#include "FeaturesPlugin_CompositeBoolean.h" + +/// \class FeaturesPlugin_RevolutionBoolean +/// \ingroup Plugins +/// \brief Interface for the composite revolution feature. +class FeaturesPlugin_RevolutionBoolean : public FeaturesPlugin_Revolution, + public FeaturesPlugin_CompositeBoolean { public: - /// Attribute name of an revolution axis. - inline static const std::string& AXIS_OBJECT_ID() - { - static const std::string MY_AXIS_ID("axis_object"); - return MY_AXIS_ID; - } - - /// 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 revolution to angle. - inline static const std::string& TO_ANGLE_ID() - { - static const std::string MY_TO_ANGLE_ID("to_angle"); - return MY_TO_ANGLE_ID; - } - - /// Attribute name of revolution from angle. - inline static const std::string& FROM_ANGLE_ID() - { - static const std::string MY_FROM_ANGLE_ID("from_angle"); - return MY_FROM_ANGLE_ID; - } - - /// Attribute name of an object to which the revolution 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 revolution 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; - } + /// Request for initialization of data model of the feature: adding all attributes. + FEATURESPLUGIN_EXPORT virtual void initAttributes(); protected: - /// Init attributes for revolution. - virtual void initMakeSolidsAttributes(); + FeaturesPlugin_RevolutionBoolean(){}; - /// Create solids from faces with revolution. - virtual void makeSolids(const ListOfShape& theFaces, - ListOfShape& theResults, - ListOfMakeShape& theAlgos); + // Creates revolutions. + bool makeGeneration(ListOfShape& theBaseShapes, + ListOfMakeShape& theMakeShapes); -protected: - FeaturesPlugin_RevolutionBoolean(){}; + /// Stores generation history. + void storeGenerationHistory(ResultBodyPtr theResultBody, + const GeomShapePtr theBaseShape, + const std::shared_ptr theMakeShape, + int& theTag); }; #endif