Salome HOME
IPAL22903: TC650: Store/Restore last GUI state does not work for Isos
[modules/geom.git] / src / GEOMImpl / GEOMImpl_RotateDriver.cxx
index a11e17b0c0ad3c67a3076cff99f91c6b34681f76..9f1e3035b68d9d1519ea1e2961b55acf24289d70 100644 (file)
@@ -1,23 +1,23 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  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
+// 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
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include <Standard_Stream.hxx>
@@ -100,7 +100,7 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
     gp_Dir aDir(gp_Vec(aP1, aP2));
     gp_Ax1 anAx1(aP1, aDir);
     Standard_Real anAngle = RI.GetAngle();
-    if (fabs(anAngle) < Precision::Angular()) anAngle += 2*PI; // NPAL19665,19769
+    if (fabs(anAngle) < Precision::Angular()) anAngle += 2.*M_PI; // NPAL19665,19769
     aTrsf.SetRotation(anAx1, anAngle);
 
     //NPAL18620: performance problem: multiple locations are accumulated
@@ -135,7 +135,7 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
     gp_Dir aDir (aVec1 ^ aVec2);
     gp_Ax1 anAx1 (aCP, aDir);
     Standard_Real anAngle = aVec1.Angle(aVec2);
-    if (fabs(anAngle) < Precision::Angular()) anAngle += 2*PI; // NPAL19665
+    if (fabs(anAngle) < Precision::Angular()) anAngle += 2.*M_PI; // NPAL19665
     aTrsf.SetRotation(anAx1, anAngle);
     //NPAL18620: performance problem: multiple locations are accumulated
     //           in shape and need a great time to process
@@ -177,7 +177,7 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
         B.Add(aCompound, anOriginal);
       }
       else {
-        aTrsf.SetRotation(AX1, i*angle*PI180);
+        aTrsf.SetRotation(AX1, i*angle*M_PI/180.);
         //TopLoc_Location aLocRes (aTrsf * aTrsfOrig); // gp_Trsf::Multiply() has a bug
         gp_Trsf aTrsfNew (aTrsfOrig);
         aTrsfNew.PreMultiply(aTrsf);
@@ -274,7 +274,7 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
           B.Add(aCompound, anOriginal.Located(aLocRes));
         }
         else {
-          aTrsf2.SetRotation(AX1, j*ang*PI180);
+          aTrsf2.SetRotation(AX1, j*ang*M_PI/180.);
           //TopLoc_Location aLocRes (aTrsf2 * aTrsf1 * aTrsfOrig); // gp_Trsf::Multiply() has a bug
           gp_Trsf aTrsfNew (aTrsfOrig);
           aTrsfNew.PreMultiply(aTrsf1);