Salome HOME
untabify
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RevolutionDlg.cxx
index 98df2515c9ecddef9be8b96e9ef8e3efed3e5e4e..7fddebc3620f33b193c7b485901abbe17d514cd5 100644 (file)
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RevolutionDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
 // SMESH includes
-//
+
 #include "SMESHGUI_RevolutionDlg.h"
 
 #include "SMESHGUI.h"
@@ -498,7 +497,7 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
     anAxis.vy = SpinBox_DY->GetValue();
     anAxis.vz = SpinBox_DZ->GetValue();
 
-    double anAngle = (SpinBox_Angle->GetValue())*PI/180;
+    double anAngle = (SpinBox_Angle->GetValue())*M_PI/180.;
     long aNbSteps = (long)SpinBox_NbSteps->value();
     double aTolerance = SpinBox_Tolerance->GetValue();
 
@@ -520,6 +519,8 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
       SUIT_OverrideCursor aWaitCursor;
       SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
       
+      myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+
       if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) {
         if( CheckBoxMesh->isChecked() ) {
           if( GetConstructorId() == 0 )
@@ -547,7 +548,6 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
           aMeshEditor->RotationSweep(anElementsId.inout(), anAxis, anAngle, aNbSteps, aTolerance);
       }
 
-      myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
     } catch (...) {
     }
 
@@ -1061,8 +1061,8 @@ void SMESHGUI_RevolutionDlg::onDisplaySimulation(bool toDisplayPreview)
       anAxis.vx = SpinBox_DX->GetValue();
       anAxis.vy = SpinBox_DY->GetValue();
       anAxis.vz = SpinBox_DZ->GetValue();
-      
-      double anAngle = (SpinBox_Angle->GetValue())*PI/180;
+
+      double anAngle = (SpinBox_Angle->GetValue())*M_PI/180.;
       long aNbSteps = (long)SpinBox_NbSteps->value();
       double aTolerance = SpinBox_Tolerance->GetValue();