Salome HOME
Fix due to the coding standards.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Shape.cpp
index fd1d6adeb9fc13d4430149af8e9b0ef1b65b8a29..c1df335558bd9f4f7680e158f68a43984bd27619 100644 (file)
@@ -490,3 +490,13 @@ bool GeomAPI_Shape::isIntersect(const GeomShapePtr theShape) const
 
   return false;
 }
+
+void GeomAPI_Shape::translate(const std::shared_ptr<GeomAPI_Dir> theDir, const double theOffset)
+{
+  gp_Dir aDir = theDir->impl<gp_Dir>();
+  gp_Vec aTrsfVec(aDir.XYZ() * theOffset);
+  gp_Trsf aTranslation;
+  aTranslation.SetTranslation(aTrsfVec);
+  TopoDS_Shape aResult = MY_SHAPE->Moved(aTranslation);
+  setImpl(new TopoDS_Shape(aResult));
+}