mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-07 05:44:16 +05:00
0019928: EDF 771 SMESH : Extrusion (Revolution) with normal to a face
This commit is contained in:
parent
8976fc48ed
commit
996a005965
@ -337,6 +337,7 @@ SMESHGUI_ExtrusionDlg::~SMESHGUI_ExtrusionDlg()
|
|||||||
void SMESHGUI_ExtrusionDlg::Init (bool ResetControls)
|
void SMESHGUI_ExtrusionDlg::Init (bool ResetControls)
|
||||||
{
|
{
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
myIDs.clear();
|
||||||
|
|
||||||
LineEditElements->clear();
|
LineEditElements->clear();
|
||||||
myNbOkElements = 0;
|
myNbOkElements = 0;
|
||||||
@ -400,6 +401,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
|
|||||||
GroupArguments->setTitle(tr("EXTRUSION_1D"));
|
GroupArguments->setTitle(tr("EXTRUSION_1D"));
|
||||||
if (!CheckBoxMesh->isChecked())
|
if (!CheckBoxMesh->isChecked())
|
||||||
{
|
{
|
||||||
|
LineEditElements->clear();
|
||||||
|
myIDs.clear();
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(EdgeSelection);
|
aViewWindow->SetSelectionMode(EdgeSelection);
|
||||||
}
|
}
|
||||||
@ -410,6 +413,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
|
|||||||
GroupArguments->setTitle(tr("EXTRUSION_2D"));
|
GroupArguments->setTitle(tr("EXTRUSION_2D"));
|
||||||
if (!CheckBoxMesh->isChecked())
|
if (!CheckBoxMesh->isChecked())
|
||||||
{
|
{
|
||||||
|
LineEditElements->clear();
|
||||||
|
myIDs.clear();
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(FaceSelection);
|
aViewWindow->SetSelectionMode(FaceSelection);
|
||||||
}
|
}
|
||||||
@ -884,10 +889,13 @@ void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
||||||
{
|
{
|
||||||
if (toSelectMesh)
|
if (toSelectMesh) {
|
||||||
|
myIDs = LineEditElements->text();
|
||||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||||
|
|
||||||
myFilterBtn->setEnabled(!toSelectMesh);
|
myFilterBtn->setEnabled(!toSelectMesh);
|
||||||
|
|
||||||
if (myEditCurrentArgument != LineEditElements) {
|
if (myEditCurrentArgument != LineEditElements) {
|
||||||
@ -910,7 +918,7 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(EdgeSelection);
|
aViewWindow->SetSelectionMode(EdgeSelection);
|
||||||
}
|
}
|
||||||
else if (aConstructorId == 0)
|
else if (aConstructorId == 1)
|
||||||
{
|
{
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(FaceSelection);
|
aViewWindow->SetSelectionMode(FaceSelection);
|
||||||
@ -922,6 +930,9 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
|
|
||||||
|
if (!toSelectMesh)
|
||||||
|
LineEditElements->setText( myIDs );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -135,6 +135,7 @@ private:
|
|||||||
QPushButton* buttonHelp;
|
QPushButton* buttonHelp;
|
||||||
|
|
||||||
QString myHelpFileName;
|
QString myHelpFileName;
|
||||||
|
QString myIDs;
|
||||||
|
|
||||||
QPushButton* myFilterBtn;
|
QPushButton* myFilterBtn;
|
||||||
SMESHGUI_FilterDlg* myFilterDlg;
|
SMESHGUI_FilterDlg* myFilterDlg;
|
||||||
|
@ -383,6 +383,7 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls)
|
|||||||
LineEditElements->clear();
|
LineEditElements->clear();
|
||||||
myElementsId = "";
|
myElementsId = "";
|
||||||
myNbOkElements = 0;
|
myNbOkElements = 0;
|
||||||
|
myIDs.clear();
|
||||||
|
|
||||||
myActor = 0;
|
myActor = 0;
|
||||||
myMesh = SMESH::SMESH_Mesh::_nil();
|
myMesh = SMESH::SMESH_Mesh::_nil();
|
||||||
@ -412,14 +413,13 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
||||||
{
|
{
|
||||||
//disconnect(mySelectionMgr, 0, this, 0);
|
disconnect(mySelectionMgr, 0, this, 0);
|
||||||
|
|
||||||
SALOME_ListIO io;
|
/* SALOME_ListIO io;
|
||||||
mySelectionMgr->selectedObjects( io );
|
mySelectionMgr->selectedObjects( io );
|
||||||
SALOME_ListIO aList;
|
SALOME_ListIO aList;
|
||||||
mySelectionMgr->setSelectedObjects( aList );
|
mySelectionMgr->setSelectedObjects( aList );*/
|
||||||
// LineEditElements->clear();
|
|
||||||
myNbOkElements = 0;
|
|
||||||
buttonApply->setEnabled(false);
|
buttonApply->setEnabled(false);
|
||||||
buttonOk->setEnabled(false);
|
buttonOk->setEnabled(false);
|
||||||
mySimulation->SetVisibility(false);
|
mySimulation->SetVisibility(false);
|
||||||
@ -447,6 +447,9 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
|||||||
|
|
||||||
if (!CheckBoxMesh->isChecked())
|
if (!CheckBoxMesh->isChecked())
|
||||||
{
|
{
|
||||||
|
LineEditElements->clear();
|
||||||
|
myIDs.clear();
|
||||||
|
myNbOkElements = 0;
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(aSelMode);
|
aViewWindow->SetSelectionMode(aSelMode);
|
||||||
}
|
}
|
||||||
@ -457,8 +460,8 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
|
|||||||
if (CheckBoxMesh->isChecked())
|
if (CheckBoxMesh->isChecked())
|
||||||
onSelectMesh(true);
|
onSelectMesh(true);
|
||||||
|
|
||||||
//connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||||
mySelectionMgr->setSelectedObjects( io );
|
// mySelectionMgr->setSelectedObjects( io );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -836,6 +839,7 @@ void SMESHGUI_RevolutionDlg::SetEditCurrentArgument()
|
|||||||
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
|
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
|
||||||
} else {
|
} else {
|
||||||
int aConstructorId = GetConstructorId();
|
int aConstructorId = GetConstructorId();
|
||||||
|
myEditCurrentArgument = (QWidget*)SpinBox_X;
|
||||||
if (aConstructorId == 0)
|
if (aConstructorId == 0)
|
||||||
{
|
{
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
@ -928,8 +932,10 @@ void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
||||||
{
|
{
|
||||||
if (toSelectMesh)
|
if (toSelectMesh) {
|
||||||
|
myIDs = LineEditElements->text();
|
||||||
TextLabelElements->setText(tr("SMESH_NAME"));
|
TextLabelElements->setText(tr("SMESH_NAME"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
|
||||||
myFilterBtn->setEnabled(!toSelectMesh);
|
myFilterBtn->setEnabled(!toSelectMesh);
|
||||||
@ -956,7 +962,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(EdgeSelection);
|
aViewWindow->SetSelectionMode(EdgeSelection);
|
||||||
}
|
}
|
||||||
else if (aConstructorId == 0)
|
else if (aConstructorId == 1)
|
||||||
{
|
{
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode(FaceSelection);
|
aViewWindow->SetSelectionMode(FaceSelection);
|
||||||
@ -969,6 +975,9 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
|
|
||||||
|
if (!toSelectMesh)
|
||||||
|
LineEditElements->setText( myIDs );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -152,6 +152,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
QString myHelpFileName;
|
QString myHelpFileName;
|
||||||
|
QString myIDs;
|
||||||
|
|
||||||
QPushButton* myFilterBtn;
|
QPushButton* myFilterBtn;
|
||||||
SMESHGUI_FilterDlg* myFilterDlg;
|
SMESHGUI_FilterDlg* myFilterDlg;
|
||||||
|
Loading…
Reference in New Issue
Block a user