]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesAPI/FeaturesAPI_Chamfer.cpp
Salome HOME
Task 3.2. To keep compounds’ sub-shapes for all operations (issue #3139)
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Chamfer.cpp
index 0d1e815c11f38777273ff58170387f09e5a3a003..4a3b02efd36a8da5e309b5181fe0f75a64cc5452 100644 (file)
@@ -107,6 +107,9 @@ void FeaturesAPI_Chamfer::dump(ModelHighAPI_Dumper& theDumper) const
     theDumper << ", False, " << anAttrD << ", " << anAttrAngle;
   }
 
+  if (!aBase->data()->version().empty())
+    theDumper << ", keepSubResults = True";
+
   theDumper << ")" << std::endl;
 }
 
@@ -123,9 +126,12 @@ ChamferPtr addChamfer(const std::shared_ptr<ModelAPI_Document>& thePart,
                       const std::list<ModelHighAPI_Selection>& theBaseObjects,
                       const bool performDistances,
                       const ModelHighAPI_Double& theVal1,
-                      const ModelHighAPI_Double& theVal2)
+                      const ModelHighAPI_Double& theVal2,
+                      const bool keepSubResults)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Chamfer::ID());
+  if (!keepSubResults)
+    aFeature->data()->setVersion("");
   return ChamferPtr(new FeaturesAPI_Chamfer(aFeature, theBaseObjects, performDistances,
                                             theVal1, theVal2));
 }