PAL8581,8660. Add IsParametric parameter to SMESH::Mesh_Editor::Smooth()

This commit is contained in:
eap 2005-04-27 06:13:15 +00:00
parent a29cea0f7d
commit a57449a497
3 changed files with 41 additions and 25 deletions

View 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( ... )

View 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:

View 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"