Salome HOME
Task 3.2. To keep compounds’ sub-shapes for all operations (issue #3139)
[modules/shaper.git] / src / GeomAPI / GeomAPI_Pnt.cpp
index 4f7607c8fe5d7524df48e78b4abee954912eae09..2dec8f3bb4e712b66186dca3cc81462c23553a8e 100644 (file)
@@ -18,6 +18,7 @@
 //
 
 #include<GeomAPI_Pnt.h>
+#include <GeomAPI_Ax1.h>
 #include<GeomAPI_XYZ.h>
 #include<GeomAPI_Pnt2d.h>
 #include<GeomAPI_Dir.h>
@@ -127,3 +128,8 @@ std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Pnt::to2D(const std::shared_ptr<GeomAPI_P
   gp_Pnt2d aRes = ProjLib::Project(aPln, *MY_PNT);
   return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aRes.X(), aRes.Y()));
 }
+
+void GeomAPI_Pnt::rotate(const std::shared_ptr<GeomAPI_Ax1>& theAxis, const double theAngle)
+{
+  MY_PNT->Rotate(theAxis->impl<gp_Ax1>(), theAngle / 180.0 * M_PI);
+}