-// 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
//
// 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<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "FeaturesAPI_BooleanCut.h"
FeaturesAPI_BooleanCut::FeaturesAPI_BooleanCut(
const std::shared_ptr<ModelAPI_Feature>& theFeature,
const std::list<ModelHighAPI_Selection>& theMainObjects,
- const std::list<ModelHighAPI_Selection>& theToolObjects)
+ const std::list<ModelHighAPI_Selection>& theToolObjects,
+ const int theVersion)
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
+ fillAttribute(theVersion, theFeature->integer(FeaturesPlugin_Boolean::VERSION_ID()));
fillAttribute(theMainObjects, mymainObjects);
fillAttribute(theToolObjects, mytoolObjects);
aBase->selectionList(FeaturesPlugin_BooleanCut::OBJECT_LIST_ID());
AttributeSelectionListPtr aTools =
aBase->selectionList(FeaturesPlugin_BooleanCut::TOOL_LIST_ID());
+ AttributeIntegerPtr aVersion =
+ aBase->integer(FeaturesPlugin_BooleanCut::VERSION_ID());
- theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools << ")" << std::endl;
+ theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools;
+
+ if (aVersion && aVersion->isInitialized())
+ theDumper << ", " << aVersion->value();
+
+ theDumper << ")" << std::endl;
}
//==================================================================================================
BooleanCutPtr addCut(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
- const std::list<ModelHighAPI_Selection>& theToolObjects)
+ const std::list<ModelHighAPI_Selection>& theToolObjects,
+ const int theVersion)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanCut::ID());
return BooleanCutPtr(new FeaturesAPI_BooleanCut(aFeature,
theMainObjects,
- theToolObjects));
+ theToolObjects,
+ theVersion));
}