Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Pipe.cpp
index 2578c836c64956f8525f79ab06c64af2622342f6..210a8c4b04957695652e32c7cd64d9c7944e115f 100644 (file)
@@ -144,7 +144,7 @@ void GeomAlgoAPI_Pipe::build(const GeomShapePtr theBaseShape,
     return;
   }
 
-  aPathWire.Move(getPathToBaseTranslation(aBaseShape, aPathWire));
+  aPathWire.Move(getPathToBaseTranslation(theBaseShape->impl<TopoDS_Shape>(), aPathWire));
 
   // Getting Bi-Normal.
   if(!theBiNormal.get()) {
@@ -221,7 +221,8 @@ void GeomAlgoAPI_Pipe::build(const ListOfShape& theBaseShapes,
     return;
   }
 
-  gp_Trsf aTrsf = getPathToBaseTranslation(aBaseShape, aPathWire);
+  TopoDS_Shape aReallyBase = theBaseShapes.front()->impl<TopoDS_Shape>();
+  gp_Trsf aTrsf = getPathToBaseTranslation(aReallyBase, aPathWire);
   aPathWire.Move(aTrsf);
 
   // Get locations after moving path shape.
@@ -322,6 +323,8 @@ void GeomAlgoAPI_Pipe::build(const ListOfShape& theBaseShapes,
   GeomShapePtr aFromShape(new GeomAPI_Shape), aToShape(new GeomAPI_Shape);
   aFromShape->setImpl(new TopoDS_Shape(aPipeBuilder->FirstShape()));
   aToShape->setImpl(new TopoDS_Shape(aPipeBuilder->LastShape()));
+  fixOrientation(aFromShape);
+  fixOrientation(aToShape);
   this->addFromShape(aFromShape);
   this->addToShape(aToShape);