mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
PAL8581,8660. Add IsParametric parameter to SMESH::Mesh_Editor::Smooth()
This commit is contained in:
parent
a29cea0f7d
commit
a57449a497
@ -205,22 +205,31 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( QWidget* parent, const char* name,
|
|||||||
SpinBox_AspectRatio = new SMESHGUI_SpinBox(GroupArguments, "SpinBox_AspectRatio");
|
SpinBox_AspectRatio = new SMESHGUI_SpinBox(GroupArguments, "SpinBox_AspectRatio");
|
||||||
GroupArgumentsLayout->addWidget( SpinBox_AspectRatio, 5, 2 );
|
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 );
|
SMESHGUI_SmoothingDlgLayout->addWidget( GroupArguments, 1, 0 );
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
ComboBoxMethod->insertItem(tr("LAPLACIAN"));
|
ComboBoxMethod->insertItem(tr("LAPLACIAN"));
|
||||||
ComboBoxMethod->insertItem(tr("CENTROIDAL"));
|
ComboBoxMethod->insertItem(tr("CENTROIDAL"));
|
||||||
|
ComboBoxMethod->setCurrentItem(0);
|
||||||
|
|
||||||
|
CheckBoxParametric->setChecked( TRUE );
|
||||||
|
|
||||||
QIntValidator* anIntValidator = new QIntValidator(SpinBox_IterationLimit);
|
QIntValidator* anIntValidator = new QIntValidator(SpinBox_IterationLimit);
|
||||||
SpinBox_IterationLimit->setValidator(anIntValidator);
|
SpinBox_IterationLimit->setValidator(anIntValidator);
|
||||||
SpinBox_IterationLimit->setRange( 1, 999999 );
|
SpinBox_IterationLimit->setRange( 1, 999999 );
|
||||||
|
SpinBox_IterationLimit->setValue(20);
|
||||||
SpinBox_AspectRatio->RangeStepAndValidator( 0.0, +999999.999, 0.1, 3 );
|
SpinBox_AspectRatio->RangeStepAndValidator( 0.0, +999999.999, 0.1, 3 );
|
||||||
|
SpinBox_AspectRatio->SetValue(1.1);
|
||||||
|
|
||||||
GroupArguments->show();
|
GroupArguments->show();
|
||||||
myConstructorId = 0 ;
|
myConstructorId = 0 ;
|
||||||
Constructor1->setChecked( TRUE );
|
Constructor1->setChecked( TRUE );
|
||||||
mySelection = Sel;
|
mySelection = Sel;
|
||||||
|
|
||||||
mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
|
mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
|
||||||
mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
|
mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
|
||||||
@ -281,13 +290,14 @@ void SMESHGUI_SmoothingDlg::Init()
|
|||||||
{
|
{
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
|
||||||
ComboBoxMethod->setCurrentItem(0);
|
// ComboBoxMethod->setCurrentItem(0);
|
||||||
|
|
||||||
SpinBox_IterationLimit->setValue(20);
|
// SpinBox_IterationLimit->setValue(20);
|
||||||
SpinBox_AspectRatio->SetValue(1.1);
|
// SpinBox_AspectRatio->SetValue(1.1);
|
||||||
|
|
||||||
myEditCurrentArgument = LineEditElements;
|
myEditCurrentArgument = LineEditElements;
|
||||||
LineEditElements->setFocus();
|
LineEditElements->setFocus();
|
||||||
|
LineEditNodes->clear();
|
||||||
myElementsId = "";
|
myElementsId = "";
|
||||||
myNbOkElements = 0 ;
|
myNbOkElements = 0 ;
|
||||||
myNbOkNodes = 0 ;
|
myNbOkNodes = 0 ;
|
||||||
@ -337,7 +347,7 @@ void SMESHGUI_SmoothingDlg::ClickOnApply()
|
|||||||
aNodesId[i] = aListNodesId[i].toInt();
|
aNodesId[i] = aListNodesId[i].toInt();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
anElementsId->length(0);
|
aNodesId->length(0);
|
||||||
|
|
||||||
long anIterationLimit = (long)SpinBox_IterationLimit->value();
|
long anIterationLimit = (long)SpinBox_IterationLimit->value();
|
||||||
double aMaxAspectRatio = SpinBox_AspectRatio->GetValue();
|
double aMaxAspectRatio = SpinBox_AspectRatio->GetValue();
|
||||||
@ -351,7 +361,9 @@ void SMESHGUI_SmoothingDlg::ClickOnApply()
|
|||||||
{
|
{
|
||||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
|
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
|
||||||
QApplication::setOverrideCursor(Qt::waitCursor);
|
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();
|
QApplication::restoreOverrideCursor();
|
||||||
}
|
}
|
||||||
catch( ... )
|
catch( ... )
|
||||||
|
@ -86,26 +86,27 @@ private:
|
|||||||
SMESH_Actor* myActor;
|
SMESH_Actor* myActor;
|
||||||
Handle(SMESH_LogicalFilter) myMeshOrSubMeshOrGroupFilter;
|
Handle(SMESH_LogicalFilter) myMeshOrSubMeshOrGroupFilter;
|
||||||
|
|
||||||
QButtonGroup* GroupConstructors;
|
QButtonGroup * GroupConstructors;
|
||||||
QRadioButton* Constructor1;
|
QRadioButton * Constructor1;
|
||||||
QGroupBox* GroupButtons;
|
QGroupBox * GroupButtons;
|
||||||
QPushButton* buttonOk;
|
QPushButton * buttonOk;
|
||||||
QPushButton* buttonCancel;
|
QPushButton * buttonCancel;
|
||||||
QPushButton* buttonApply;
|
QPushButton * buttonApply;
|
||||||
QGroupBox* GroupArguments;
|
QGroupBox * GroupArguments;
|
||||||
QLabel* TextLabelElements;
|
QLabel * TextLabelElements;
|
||||||
QPushButton* SelectElementsButton;
|
QPushButton * SelectElementsButton;
|
||||||
QLineEdit* LineEditElements;
|
QLineEdit * LineEditElements;
|
||||||
QCheckBox* CheckBoxMesh;
|
QCheckBox * CheckBoxMesh;
|
||||||
QLabel* TextLabelNodes;
|
QLabel * TextLabelNodes;
|
||||||
QPushButton* SelectNodesButton;
|
QPushButton * SelectNodesButton;
|
||||||
QLineEdit* LineEditNodes;
|
QLineEdit * LineEditNodes;
|
||||||
QLabel* TextLabelMethod;
|
QLabel * TextLabelMethod;
|
||||||
QComboBox* ComboBoxMethod;
|
QComboBox * ComboBoxMethod;
|
||||||
QLabel* TextLabelLimit;
|
QLabel * TextLabelLimit;
|
||||||
QSpinBox* SpinBox_IterationLimit;
|
QSpinBox * SpinBox_IterationLimit;
|
||||||
QLabel* TextLabelAspectRatio;
|
QLabel * TextLabelAspectRatio;
|
||||||
SMESHGUI_SpinBox* SpinBox_AspectRatio;
|
SMESHGUI_SpinBox* SpinBox_AspectRatio;
|
||||||
|
QCheckBox * CheckBoxParametric;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
@ -1468,6 +1468,9 @@ msgstr "Laplacian"
|
|||||||
msgid "SMESHGUI_SmoothingDlg::CENTROIDAL"
|
msgid "SMESHGUI_SmoothingDlg::CENTROIDAL"
|
||||||
msgstr "Centroidal"
|
msgstr "Centroidal"
|
||||||
|
|
||||||
|
msgid "SMESHGUI_SmoothingDlg::IS_PARAMETRIC"
|
||||||
|
msgstr "in parametric space"
|
||||||
|
|
||||||
#----------------------------------------------------
|
#----------------------------------------------------
|
||||||
|
|
||||||
msgid "SMESHGUI_ExtrusionDlg::EXTRUSION_ALONG_LINE"
|
msgid "SMESHGUI_ExtrusionDlg::EXTRUSION_ALONG_LINE"
|
||||||
|
Loading…
Reference in New Issue
Block a user