From: dbv Date: Mon, 15 Aug 2016 11:02:46 +0000 (+0300) Subject: Issue #1648: Dump Python in the High Level Parameterized Geometry API X-Git-Tag: V_2.5.0~137^2~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ee77a0a0152cd6fe6963d20559d03d865dbbbe2;p=modules%2Fshaper.git Issue #1648: Dump Python in the High Level Parameterized Geometry API Dump for FeaturesAPI_RemoveSubShapes --- diff --git a/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.cpp b/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.cpp index 4d0726eff..d7418c52b 100644 --- a/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.cpp +++ b/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.cpp @@ -6,6 +6,7 @@ #include "FeaturesAPI_RemoveSubShapes.h" +#include #include //================================================================================================== @@ -49,6 +50,19 @@ void FeaturesAPI_RemoveSubShapes::setSubShapesToKeep(const std::listdocument()); + + AttributeSelectionPtr anAttrBaseShape = aBase->selection(FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID()); + AttributeSelectionListPtr anAttrSubShapes = aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID()); + + theDumper << aBase << " = model.addRemoveSubShapes(" << aDocName << ", " << anAttrBaseShape << ")" << std::endl; + theDumper << aDocName << ".setSubShapesToKeep(" << anAttrSubShapes << ")" << std::endl; +} + //================================================================================================== RemoveSubShapesPtr addRemoveSubShapes(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBase) diff --git a/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.h b/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.h index d4de1dcc2..b6e4d587e 100644 --- a/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.h +++ b/src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.h @@ -14,6 +14,7 @@ #include #include +class ModelHighAPI_Dumper; class ModelHighAPI_Selection; /// \class FeaturesAPI_RemoveSubShapes @@ -46,6 +47,10 @@ public: /// Modify tools attribute of the feature. FEATURESAPI_EXPORT void setSubShapesToKeep(const std::list& theSubShapes); + + /// Dump wrapped feature + FEATURESAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; /// Pointer on RemoveSubShapes object.