Salome HOME
Fix for the issue #1928
[modules/shaper.git] / src / GeomAPI / GeomAPI_Trsf.h
index 47bcb2b3ed0ffbcfdaf39dd5deba16a54ff6b6b7..ed97f4bebe32880bb307ba33e64cb9d87d86169d 100644 (file)
@@ -13,6 +13,7 @@
 #include <memory>
 
 class GeomAPI_Ax1;
+class GeomAPI_Pnt;
 
 /**\class GeomAPI_Trsf
  * \ingroup DataModel
@@ -33,7 +34,7 @@ class GeomAPI_Trsf : public GeomAPI_Interface
    */
   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
                                      const double theDistance);
-  
+
   /** \brief Sets a translation transformation using three coordinates.
    *  \param[in] theDx x coordinate of the translation vector
    *  \param[in] theDy y coordinate of the translation vector
@@ -43,6 +44,13 @@ class GeomAPI_Trsf : public GeomAPI_Interface
                                      const double theDy,
                                      const double theDz);
 
+  /** \brief Sets a translation transformation using two points.
+   *  \param[in] theStartPoint  Start point of the translation vector.
+   *  \param[in] theEndPoint    End point of the translation vector.
+   */
+  GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Pnt> theStartPoint,
+                                     const std::shared_ptr<GeomAPI_Pnt> theEndPoint);
+
   /** \brief Sets a rotation transformation.
    *  \param[in] theAxis  rotation axis.
    *  \param[in] theAngle rotation angle(in degree).