]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL8581,8660. Add IsParametric parameter to SMESH::Mesh_Editor::Smooth()
authoreap <eap@opencascade.com>
Wed, 27 Apr 2005 06:13:15 +0000 (06:13 +0000)
committereap <eap@opencascade.com>
Wed, 27 Apr 2005 06:13:15 +0000 (06:13 +0000)
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.h
src/SMESHGUI/SMESH_msg_en.po

index 3099baeb0130867ac3831c27de0a76c55e90ebae..1d2b909a3209f0f97df8fe4380a1cbe07e7fdec4 100644 (file)
@@ -205,22 +205,31 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( QWidget* parent, const char* name,
   SpinBox_AspectRatio = new SMESHGUI_SpinBox(GroupArguments, "SpinBox_AspectRatio");
   GroupArgumentsLayout->addWidget( SpinBox_AspectRatio, 5, 2 );
 
+  // Check box "Is Parametric"
+  CheckBoxParametric = new QCheckBox( GroupArguments, "CheckBoxParametric" );
+  CheckBoxParametric->setText( tr( "IS_PARAMETRIC" ) );
+  GroupArgumentsLayout->addMultiCellWidget( CheckBoxParametric, 6, 6, 0, 2 );
 
   SMESHGUI_SmoothingDlgLayout->addWidget( GroupArguments, 1, 0 );
   
   /* Initialisations */
   ComboBoxMethod->insertItem(tr("LAPLACIAN"));
   ComboBoxMethod->insertItem(tr("CENTROIDAL"));
+  ComboBoxMethod->setCurrentItem(0);
+
+  CheckBoxParametric->setChecked( TRUE );
 
   QIntValidator* anIntValidator = new QIntValidator(SpinBox_IterationLimit);
   SpinBox_IterationLimit->setValidator(anIntValidator);
   SpinBox_IterationLimit->setRange( 1, 999999 );
+  SpinBox_IterationLimit->setValue(20);
   SpinBox_AspectRatio->RangeStepAndValidator( 0.0, +999999.999, 0.1, 3 );
+  SpinBox_AspectRatio->SetValue(1.1);
 
   GroupArguments->show();
   myConstructorId = 0 ;
   Constructor1->setChecked( TRUE );
-  mySelection = Sel;  
+  mySelection = Sel;
 
   mySMESHGUI  = SMESHGUI::GetSMESHGUI() ;
   mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
@@ -281,13 +290,14 @@ void SMESHGUI_SmoothingDlg::Init()
 {
   myBusy = false;  
           
-  ComboBoxMethod->setCurrentItem(0);
+//   ComboBoxMethod->setCurrentItem(0);
   
-  SpinBox_IterationLimit->setValue(20);
-  SpinBox_AspectRatio->SetValue(1.1);
+//   SpinBox_IterationLimit->setValue(20);
+//   SpinBox_AspectRatio->SetValue(1.1);
   
   myEditCurrentArgument = LineEditElements;
   LineEditElements->setFocus();
+  LineEditNodes->clear();
   myElementsId = "";
   myNbOkElements = 0 ;
   myNbOkNodes = 0 ;
@@ -337,7 +347,7 @@ void SMESHGUI_SmoothingDlg::ClickOnApply()
            aNodesId[i] = aListNodesId[i].toInt();
        }
       else
-       anElementsId->length(0);
+       aNodesId->length(0);
       
       long anIterationLimit = (long)SpinBox_IterationLimit->value();
       double aMaxAspectRatio = SpinBox_AspectRatio->GetValue();
@@ -351,7 +361,9 @@ void SMESHGUI_SmoothingDlg::ClickOnApply()
        {
          SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
          QApplication::setOverrideCursor(Qt::waitCursor);
-         aResult = aMeshEditor->Smooth(anElementsId.inout(), aNodesId.inout(), anIterationLimit, aMaxAspectRatio, aMethod);
+         aResult = aMeshEditor->Smooth(anElementsId.inout(), aNodesId.inout(),
+                                        anIterationLimit, aMaxAspectRatio, aMethod,
+                                        CheckBoxParametric->isChecked());
          QApplication::restoreOverrideCursor();
        }
       catch( ... )
index fafade3f33bb697de5a0213232b154507d5572e4..3c7212eb284eae3a329c2054513d28018a1db822 100644 (file)
@@ -86,26 +86,27 @@ private:
     SMESH_Actor*                  myActor;
     Handle(SMESH_LogicalFilter)   myMeshOrSubMeshOrGroupFilter;
 
-    QButtonGroup* GroupConstructors;
-    QRadioButton* Constructor1;
-    QGroupBox* GroupButtons;
-    QPushButton* buttonOk;
-    QPushButton* buttonCancel;
-    QPushButton* buttonApply;
-    QGroupBox* GroupArguments;
-    QLabel* TextLabelElements;
-    QPushButton* SelectElementsButton;
-    QLineEdit* LineEditElements;
-    QCheckBox* CheckBoxMesh;
-    QLabel* TextLabelNodes;
-    QPushButton* SelectNodesButton;
-    QLineEdit* LineEditNodes;
-    QLabel* TextLabelMethod;
-    QComboBox* ComboBoxMethod;
-    QLabel* TextLabelLimit;
-    QSpinBox* SpinBox_IterationLimit;
-    QLabel* TextLabelAspectRatio;
+    QButtonGroup    * GroupConstructors;
+    QRadioButton    * Constructor1;
+    QGroupBox       * GroupButtons;
+    QPushButton     * buttonOk;
+    QPushButton     * buttonCancel;
+    QPushButton     * buttonApply;
+    QGroupBox       * GroupArguments;
+    QLabel          * TextLabelElements;
+    QPushButton     * SelectElementsButton;
+    QLineEdit       * LineEditElements;
+    QCheckBox       * CheckBoxMesh;
+    QLabel          * TextLabelNodes;
+    QPushButton     * SelectNodesButton;
+    QLineEdit       * LineEditNodes;
+    QLabel          * TextLabelMethod;
+    QComboBox       * ComboBoxMethod;
+    QLabel          * TextLabelLimit;
+    QSpinBox        * SpinBox_IterationLimit;
+    QLabel          * TextLabelAspectRatio;
     SMESHGUI_SpinBox* SpinBox_AspectRatio;
+    QCheckBox       * CheckBoxParametric;
     
 private slots:
 
index 947493d9738ef1924ea41184f47ac1738e7c9a68..cb6de516a8691c4ea7364fc5a620c35c59ca4de5 100644 (file)
@@ -1468,6 +1468,9 @@ msgstr "Laplacian"
 msgid "SMESHGUI_SmoothingDlg::CENTROIDAL"
 msgstr "Centroidal"
 
+msgid "SMESHGUI_SmoothingDlg::IS_PARAMETRIC"
+msgstr "in parametric space"
+
 #----------------------------------------------------
 
 msgid "SMESHGUI_ExtrusionDlg::EXTRUSION_ALONG_LINE"