Salome HOME
Revert "Revert "Add a new method for translation : translation by two points.""
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Translation.h
index 91fc03c8fd08a9428137dafb0e622d21f7031ec6..62252139b79ec75ab762dac9b371050737c57372 100644 (file)
@@ -47,6 +47,15 @@ public:
                                              double                         theDy,
                                              double                         theDz);
 
+  /// \brief Creates an object which is obtained from current object by moving it along a vector
+  ///        defined by two points.
+  /// \param[in] theSourceShape  the shape to be moved.
+  /// \param[in] theStartPoint   the movement start point.
+  /// \param[in] theEndPoint     the movement end point.
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Translation(std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                                             std::shared_ptr<GeomAPI_Pnt>   theStartPoint,
+                                             std::shared_ptr<GeomAPI_Pnt>   theEndPoint);
+
   /// Checks if data for the translation execution is OK.
   GEOMALGOAPI_EXPORT bool check();
 
@@ -61,6 +70,8 @@ private:
   double myDx; /// Movement dimension on X.
   double myDy; /// Movement dimension on Y.
   double myDz; /// Movement dimension on Z.
+  std::shared_ptr<GeomAPI_Pnt> myStartPoint; /// Movement start point.
+  std::shared_ptr<GeomAPI_Pnt> myEndPoint; /// Movement end point.
 };
 
 #endif