X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_BooleanCut.cpp;h=64b4f4d469603b5a22068113b246c39df22cced3;hb=2ab502106663ac32f9a5d87e4fdc950f5ac6f6b7;hp=496b1fdbc799a0b6aacc29d53b1924e19c1677f0;hpb=50cef8966d30d658565b08428b4b313f3449d23c;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp index 496b1fdbc..64b4f4d46 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "FeaturesAPI_BooleanCut.h" @@ -81,15 +80,23 @@ void FeaturesAPI_BooleanCut::dump(ModelHighAPI_Dumper& theDumper) const AttributeSelectionListPtr aTools = aBase->selectionList(FeaturesPlugin_BooleanCut::TOOL_LIST_ID()); - theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools << ")" << std::endl; + theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools; + + if (!aBase->data()->version().empty()) + theDumper << ", keepSubResults = True"; + + theDumper << ")" << std::endl; } //================================================================================================== BooleanCutPtr addCut(const std::shared_ptr& thePart, const std::list& theMainObjects, - const std::list& theToolObjects) + const std::list& theToolObjects, + const bool keepSubResults) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanCut::ID()); + if (!keepSubResults) + aFeature->data()->setVersion(""); return BooleanCutPtr(new FeaturesAPI_BooleanCut(aFeature, theMainObjects, theToolObjects));