Salome HOME
Update copyrights
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ax3.cpp
index 5dd911edf7e10f1d508a43d38ecfbb4223da46bb..d45c4f75416376ec26e9eab5753967067c1c9fcc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "GeomAPI_Ax3.h"
@@ -107,12 +106,12 @@ std::shared_ptr<GeomAPI_Pnt> GeomAPI_Ax3::to3D(double theX, double theY) const
 std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Ax3::to2D(double theX, double theY, double theZ) const
 {
   gp_Pnt anOriginPnt = MY_AX3->Axis().Location();
-  gp_Vec aVec(anOriginPnt, gp_Pnt(0, 0, 0));
+  gp_Vec aVec(anOriginPnt, gp_Pnt(theX, theY, theZ));
 
   gp_Dir aXDir = MY_AX3->XDirection();
   gp_Dir aYDir = MY_AX3->YDirection();
 
   double aX = aVec.X() * aXDir.X() + aVec.Y() * aXDir.Y() + aVec.Z() * aXDir.Z();
-  double aY = aVec.X() * aYDir.X() + aVec.Y() * aYDir.Y() + aVec.Z() * aYDir.Y();
+  double aY = aVec.X() * aYDir.X() + aVec.Y() * aYDir.Y() + aVec.Z() * aYDir.Z();
   return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aX, aY));
 }