-// Copyright (C) 2017 CEA/DEN, EDF R&D
+// Copyright (C) 2017-2020 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_Fillet.h"
fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_SINGLE_RADIUS(), mycreationMethod);
fillAttribute(theBaseObjects, mybaseObjects);
fillAttribute(theRadius, myradius);
+
+ execIfBaseNotEmpty();
}
}
fillAttribute(theBaseObjects, mybaseObjects);
fillAttribute(theRadius1, mystartRadius);
fillAttribute(theRadius2, myendRadius);
+
+ execIfBaseNotEmpty();
}
}
theDumper << ", " << anAttrRadius1 << ", " << anAttrRadius2;
}
+ if (!aBase->data()->version().empty())
+ theDumper << ", keepSubResults = True";
+
theDumper << ")" << std::endl;
}
//==================================================================================================
-FilletPtr addFillet(const std::shared_ptr<ModelAPI_Document>& thePart,
- const std::list<ModelHighAPI_Selection>& theBaseObjects,
- const ModelHighAPI_Double& theRadius)
-{
- std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Fillet::ID());
- return FilletPtr(new FeaturesAPI_Fillet(aFeature, theBaseObjects, theRadius));
-}
-
FilletPtr addFillet(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theBaseObjects,
const ModelHighAPI_Double& theRadius1,
- const ModelHighAPI_Double& theRadius2)
+ const ModelHighAPI_Double& theRadius2,
+ const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Fillet::ID());
- return FilletPtr(new FeaturesAPI_Fillet(aFeature, theBaseObjects, theRadius1, theRadius2));
+ if (!keepSubResults)
+ aFeature->data()->setVersion("");
+
+ FilletPtr aFillet;
+ if (theRadius2.value() < 0.0)
+ aFillet.reset(new FeaturesAPI_Fillet(aFeature, theBaseObjects, theRadius1));
+ else
+ aFillet.reset(new FeaturesAPI_Fillet(aFeature, theBaseObjects, theRadius1, theRadius2));
+ return aFillet;
}