From: eap Date: Wed, 27 Apr 2005 06:13:15 +0000 (+0000) Subject: PAL8581,8660. Add IsParametric parameter to SMESH::Mesh_Editor::Smooth() X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a57449a4972df034fef4bc29b46754b8db4303ce;p=modules%2Fsmesh.git PAL8581,8660. Add IsParametric parameter to SMESH::Mesh_Editor::Smooth() --- diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index 3099baeb0..1d2b909a3 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -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( ... ) diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h index fafade3f3..3c7212eb2 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h @@ -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: diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index 947493d97..cb6de516a 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -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"