Salome HOME
Test case for issue #2918.
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Translation.cpp
index e303f2b125c2def5ee388fcf618885bc56292b9d..eff54dc689f759480f280cca2cc47ef3a11f5a39 100644 (file)
@@ -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
 //
 // 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 <FeaturesPlugin_Translation.h>
@@ -185,10 +184,14 @@ void FeaturesPlugin_Translation::performTranslationByAxisAndDistance()
       }
 
       ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-      aResultBody->storeModified(aBaseShape, aTranslationAlgo->shape());
+
+      ListOfShape aShapes;
+      aShapes.push_back(aBaseShape);
       FeaturesPlugin_Tools::loadModifiedShapes(aResultBody,
-                                               aBaseShape,
+                                               aShapes,
+                                               ListOfShape(),
                                                aTranslationAlgo,
+                                               aTranslationAlgo->shape(),
                                                "Translated");
       setResult(aResultBody, aResultIndex);
     }
@@ -261,10 +264,14 @@ void FeaturesPlugin_Translation::performTranslationByDimensions()
       }
 
       ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-      aResultBody->storeModified(aBaseShape, aTranslationAlgo->shape());
+
+      ListOfShape aShapes;
+      aShapes.push_back(aBaseShape);
       FeaturesPlugin_Tools::loadModifiedShapes(aResultBody,
-                                               aBaseShape,
+                                               aShapes,
+                                               ListOfShape(),
                                                aTranslationAlgo,
+                                               aTranslationAlgo->shape(),
                                                "Translated");
       setResult(aResultBody, aResultIndex);
     }
@@ -350,10 +357,14 @@ void FeaturesPlugin_Translation::performTranslationByTwoPoints()
       }
 
       ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-      aResultBody->storeModified(aBaseShape, aTranslationAlgo->shape());
+
+      ListOfShape aShapes;
+      aShapes.push_back(aBaseShape);
       FeaturesPlugin_Tools::loadModifiedShapes(aResultBody,
-                                               aBaseShape,
+                                               aShapes,
+                                               ListOfShape(),
                                                aTranslationAlgo,
+                                               aTranslationAlgo->shape(),
                                                "Translated");
       setResult(aResultBody, aResultIndex);
     }