X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_RevolutionBoolean.h;h=f4986ffd3bb594b2dd4d5e66684dffd30dc944ea;hb=aee09da348319d21259bee81c45d00a08f657de0;hp=679eb58317eddf25f7ce06a3ccf6d9784ff0ec33;hpb=f98f887290d4e2b4bd6618389911e82b6b9674f3;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.h b/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.h index 679eb5831..f4986ffd3 100644 --- a/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.h +++ b/src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.h @@ -17,6 +17,8 @@ #include class ModelHighAPI_Double; +class ModelHighAPI_Dumper; +class ModelHighAPI_Reference; class ModelHighAPI_Selection; /// \class FeaturesAPI_RevolutionBoolean @@ -30,7 +32,7 @@ public: virtual ~FeaturesAPI_RevolutionBoolean(); INTERFACE_11("", - sketchLauncher, FeaturesPlugin_Revolution::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */, + sketch, FeaturesPlugin_Revolution::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */, baseObjects, FeaturesPlugin_Revolution::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */, axis, FeaturesPlugin_Revolution::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection, /** Axis */, creationMethod, FeaturesPlugin_Revolution::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */, @@ -42,6 +44,10 @@ public: fromOffset, FeaturesPlugin_Revolution::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */, booleanObjects, FeaturesPlugin_CompositeBoolean::OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Boolean objects */) + /// Modify base attribute of the feature. + FEATURESAPI_EXPORT + void setNestedSketch(const ModelHighAPI_Reference& theSketch); + /// Modify base attribute of the feature. FEATURESAPI_EXPORT void setBase(const std::list& theBaseObjects); @@ -69,19 +75,28 @@ public: FEATURESAPI_EXPORT void setBooleanObjects(const std::list& theBooleanObjects); + /// Dump wrapped feature + FEATURESAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const; + protected: /// Constructor without values. FEATURESAPI_EXPORT explicit FeaturesAPI_RevolutionBoolean(const std::shared_ptr& theFeature); + +private: + void execIfBaseNotEmpty(); }; +/// \class FeaturesAPI_RevolutionCut +/// \ingroup CPPHighAPI +/// \brief Interface for RevolutionCut feature. class FeaturesAPI_RevolutionCut: public FeaturesAPI_RevolutionBoolean { public: - FEATURESAPI_EXPORT - virtual std::string getID() { - return FeaturesPlugin_RevolutionCut::ID(); - } + + static std::string ID() { return FeaturesPlugin_RevolutionCut::ID(); } + virtual std::string getID() { return ID(); } /// Constructor without values. FEATURESAPI_EXPORT @@ -150,13 +165,15 @@ RevolutionCutPtr addRevolutionCut(const std::shared_ptr& theP const ModelHighAPI_Double& theFromOffset, const std::list& theBooleanObjects); +/// \class FeaturesAPI_RevolutionFuse +/// \ingroup CPPHighAPI +/// \brief Interface for RevolutionFuse feature. class FeaturesAPI_RevolutionFuse: public FeaturesAPI_RevolutionBoolean { public: - FEATURESAPI_EXPORT - virtual std::string getID() { - return FeaturesPlugin_RevolutionFuse::ID(); - } + + static std::string ID() { return FeaturesPlugin_RevolutionFuse::ID(); } + virtual std::string getID() { return ID(); } /// Constructor without values. FEATURESAPI_EXPORT