X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ExtrusionAlongPathDlg.cxx;h=80298f7c88fc14a4098e55dcda168686af36dfe4;hb=c5e983833f160443bd4ac2bbf2082b64e3458a13;hp=e4920f9c9285cd3c662d5e51eaca2b7d060ae5d7;hpb=d303154d91eb916a55ac93a372cbdb918aa18d14;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index e4920f9c9..80298f7c8 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -154,6 +154,8 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod QGridLayout* GroupArgumentsLayout = new QGridLayout(GroupArguments); GroupArgumentsLayout->setSpacing(SPACING); GroupArgumentsLayout->setMargin(MARGIN); + myIdValidator = new SMESHGUI_IdValidator(this); + // Controls for elements selection ElementsLab = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments); @@ -161,7 +163,7 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod SelectElementsButton->setIcon(selectImage); ElementsLineEdit = new QLineEdit(GroupArguments); - ElementsLineEdit->setValidator(new SMESHGUI_IdValidator(this)); + ElementsLineEdit->setValidator(myIdValidator); // Controls for the whole mesh selection MeshCheck = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments); @@ -251,11 +253,14 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod AngleSpin = new SMESHGUI_SpinBox(AnglesGrp); + LinearAnglesCheck = new QCheckBox(tr("LINEAR_ANGLES"), AnglesGrp); + // layouting AnglesGrpLayout->addWidget(AnglesList, 0, 0, 4, 1); AnglesGrpLayout->addWidget(AddAngleButton, 0, 1); AnglesGrpLayout->addWidget(RemoveAngleButton, 2, 1); AnglesGrpLayout->addWidget(AngleSpin, 0, 2); + AnglesGrpLayout->addWidget(LinearAnglesCheck, 4, 0); AnglesGrpLayout->setRowMinimumHeight(1, 10); AnglesGrpLayout->setRowStretch(3, 10); @@ -279,7 +284,7 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons); GroupButtonsLayout->setSpacing(SPACING); GroupButtonsLayout->setMargin(MARGIN); - OkButton = new QPushButton(tr("SMESH_BUT_OK"), GroupButtons); + OkButton = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons); OkButton->setAutoDefault(true); OkButton->setDefault(true); @@ -579,17 +584,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, - AnglesGrp->isChecked(), anAngles.inout(), + AnglesGrp->isChecked(), anAngles, BasePointGrp->isChecked(), aBasePoint, retVal); else - retVal = aMeshEditor->ExtrusionAlongPath(anElementsId.inout(), myPathMesh, + retVal = aMeshEditor->ExtrusionAlongPath(anElementsId, myPathMesh, myPathShape, aNodeStart, - AnglesGrp->isChecked(), anAngles.inout(), + AnglesGrp->isChecked(), anAngles, BasePointGrp->isChecked(), aBasePoint); //wc.stop(); @@ -1110,6 +1118,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::onSelectMesh() bool toSelectMesh = MeshCheck->isChecked(); ElementsLineEdit->setReadOnly(toSelectMesh); + ElementsLineEdit->setValidator(toSelectMesh ? 0 : myIdValidator); ElementsLab->setText(toSelectMesh ? tr("SMESH_NAME") : tr("SMESH_ID_ELEMENTS")); ElementsLineEdit->clear();