Salome HOME
Merge tag 'V_1.3.1' into HEAD
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Movement.cpp
index a65e1d9e4e4c9c294cadefed6543c185bc049e7e..bebbcd735c6ee6584d19a427e01de07c98d04628 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_BodyBuilder.h>
 #include <ModelAPI_ResultBody.h>
 #include <ModelAPI_ResultPart.h>
 #include <ModelAPI_Session.h>
@@ -110,7 +111,7 @@ void FeaturesPlugin_Movement::execute()
         }
       }
       ResultPartPtr aResultPart = document()->copyPart(aCurrentResult, anOrigin, aResultIndex);
-      aResultPart->setShape(*aContext, aMovementAlgo.shape());
+      aResultPart->setTrsf(*aContext, aMovementAlgo.transformation());
       setResult(aResultPart);
     } else {
       ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
@@ -128,15 +129,16 @@ void FeaturesPlugin_Movement::LoadNamingDS(const GeomAlgoAPI_Movement& theMoveme
                                            std::shared_ptr<ModelAPI_ResultBody> theResultBody,
                                            std::shared_ptr<GeomAPI_Shape> theBaseShape)
 {
+  ModelAPI_BodyBuilder* aResultBuilder = theResultBody->getBodyBuilder();
   // Store result.
-  theResultBody->storeModified(theBaseShape, theMovementAlgo.shape());
+  aResultBuilder->storeModified(theBaseShape, theMovementAlgo.shape());
 
   std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = theMovementAlgo.mapOfShapes();
 
   int aMovedTag = 1;
   std::string aMovedName = "Moved";
-  theResultBody->loadAndOrientModifiedShapes(theMovementAlgo.makeShape().get(),
-                                             theBaseShape, GeomAPI_Shape::FACE,
-                                             aMovedTag, aMovedName, *aSubShapes.get());
+  aResultBuilder->loadAndOrientModifiedShapes(theMovementAlgo.makeShape().get(),
+                                              theBaseShape, GeomAPI_Shape::FACE,
+                                              aMovedTag, aMovedName, *aSubShapes.get());
 
 }