Salome HOME
0020145: EDF 666 SMESH: Modifications of GEOM groups are not taken into account
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ExtrusionAlongPathDlg.cxx
index bd1f3bb6cd7019a68a883a1d080e5d3852182521..1d8de2a1c77eba036731adfb002c69a05190cde7 100644 (file)
@@ -1,6 +1,6 @@
-//  SMESH SMESHGUI : GUI for SMESH component
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  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
 //  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
 //
+//  SMESH SMESHGUI : GUI for SMESH component
 //  File   : SMESHGUI_ExtrusionAlongPathDlg.cxx
 //  Author : Vadim SANDLER
 //  Module : SMESH
 //  $Header:
-
+//
 #include "SMESHGUI_ExtrusionAlongPathDlg.h"
 
 #include "SMESHGUI.h"
@@ -259,6 +258,8 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
 
   AngleSpin = new SMESHGUI_SpinBox(AnglesGrp);
 
+  LinearAnglesCheck = new QCheckBox(tr("LINEAR_ANGLES"), AnglesGrp);
+
   // layouting
   QVBoxLayout* bLayout = new QVBoxLayout();
   bLayout->addWidget(AddAngleButton);
@@ -268,6 +269,7 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   AnglesGrpLayout->addMultiCellWidget(AnglesList, 0, 1, 0, 0);
   AnglesGrpLayout->addMultiCellLayout(bLayout,    0, 1, 1, 1);
   AnglesGrpLayout->addWidget(         AngleSpin,  0,    2   );
+  AnglesGrpLayout->addWidget( LinearAnglesCheck,  2,    0   );
   AnglesGrpLayout->setRowStretch(1, 10);
 
   // CheckBox for groups generation
@@ -297,7 +299,7 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6); GroupButtonsLayout->setMargin(11);
 
-  OkButton = new QPushButton(tr("SMESH_BUT_OK"), GroupButtons);
+  OkButton = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons);
   OkButton->setAutoDefault(true);
   OkButton->setDefault(true);
 
@@ -604,17 +606,20 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
   try {
     SUIT_OverrideCursor wc;
     SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+    if ( LinearAnglesCheck->isChecked() )
+      anAngles = aMeshEditor->LinearAnglesVariation( myPathMesh, myPathShape, anAngles );
+
     SMESH::SMESH_MeshEditor::Extrusion_Error retVal;
     if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
       SMESH::ListOfGroups_var groups = 
-        aMeshEditor->ExtrusionAlongPathMakeGroups(anElementsId.inout(), myPathMesh,
+        aMeshEditor->ExtrusionAlongPathMakeGroups(anElementsId, myPathMesh,
                                                   myPathShape, aNodeStart,
-                                                  AnglesCheck->isChecked(), anAngles.inout(),
+                                                  AnglesCheck->isChecked(), anAngles,
                                                   BasePointCheck->isChecked(), aBasePoint, retVal);
     else
-      retVal = aMeshEditor->ExtrusionAlongPath(anElementsId.inout(), myPathMesh,
+      retVal = aMeshEditor->ExtrusionAlongPath(anElementsId, myPathMesh,
                                                myPathShape, aNodeStart,
-                                               AnglesCheck->isChecked(), anAngles.inout(),
+                                               AnglesCheck->isChecked(), anAngles,
                                                BasePointCheck->isChecked(), aBasePoint);
 
     //wc.stop();