X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_RevolutionBoolean.h;h=2d6fab5af22a5b313461208cea1d7cf570c339bc;hb=ebc5236aba00c21e854d6705d1cbbc6599e1bf36;hp=354f5badce048f6c30915df19c872104ac133be9;hpb=7e53ef4d34d299d8f78e72795b0178238ded5874;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h b/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h index 354f5badc..2d6fab5af 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h +++ b/src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h @@ -7,65 +7,31 @@ #ifndef FeaturesPlugin_RevolutionBoolean_H_ #define FeaturesPlugin_RevolutionBoolean_H_ -#include - -/** \class FeaturesPlugin_RevolutionBoolean - * \ingroup Plugins - */ -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 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 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 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; - } + /// 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 ListOfShape MakeSolids(const ListOfShape& theFaces); + // 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