mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
0019939: EDF 762 SMESH : Definition of groups from other existing groups
?Union of two groups?, ?Union of two groups? and ?Cut of two groups? dialog boxes are updated for supporting works with several groups instead of two groups only New ?Create group of underlying entities? dialog box is provided. It is intended for creating groups of entities from existing groups of superior dimensions (groups of nodes from group of faces, for example). Dialog contains 1) line edit for defining name of new group, 2) combo-box for defining dimension of elements (nodes, edges, etc), 3) list-box for defining source groups
This commit is contained in:
parent
893e1c2982
commit
634461f414
@ -1879,29 +1879,38 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 810: // Union Groups
|
||||
case 811: // Intersect groups
|
||||
case 812: // Cut groups
|
||||
{
|
||||
if ( !vtkwnd )
|
||||
{
|
||||
SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "NOT_A_VTK_VIEWER" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( checkLock( aStudy ) )
|
||||
break;
|
||||
|
||||
EmitSignalDeactivateDialog();
|
||||
|
||||
int aMode;
|
||||
if ( theCommandID == 810 ) aMode = SMESHGUI_GroupOpDlg::UNION;
|
||||
else if ( theCommandID == 811 ) aMode = SMESHGUI_GroupOpDlg::INTERSECT;
|
||||
else aMode = SMESHGUI_GroupOpDlg::CUT;
|
||||
SMESHGUI_GroupOpDlg* aDlg = 0;
|
||||
if ( theCommandID == 810 )
|
||||
aDlg = new SMESHGUI_UnionGroupsDlg( this );
|
||||
else if ( theCommandID == 811 )
|
||||
aDlg = new SMESHGUI_IntersectGroupsDlg( this );
|
||||
else
|
||||
aDlg = new SMESHGUI_CutGroupsDlg( this );
|
||||
|
||||
aDlg->show();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 814: // Create groups of entities from existing groups of superior dimensions
|
||||
{
|
||||
if ( checkLock( aStudy ) )
|
||||
break;
|
||||
|
||||
EmitSignalDeactivateDialog();
|
||||
SMESHGUI_GroupOpDlg* aDlg = new SMESHGUI_DimGroupDlg( this );
|
||||
aDlg->show();
|
||||
|
||||
( new SMESHGUI_GroupOpDlg( this, aMode ) )->show();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2605,6 +2614,7 @@ void SMESHGUI::initialize( CAM_Application* app )
|
||||
createSMESHAction( 810, "UN_GROUP", "ICON_UNION" );
|
||||
createSMESHAction( 811, "INT_GROUP", "ICON_INTERSECT" );
|
||||
createSMESHAction( 812, "CUT_GROUP", "ICON_CUT" );
|
||||
createSMESHAction( 814, "UNDERLYING_ELEMS","ICON_UNDERLYING_ELEMS" );
|
||||
createSMESHAction( 813, "DEL_GROUP", "ICON_DEL_GROUP" );
|
||||
createSMESHAction( 900, "ADV_INFO", "ICON_ADV_INFO" );
|
||||
createSMESHAction( 902, "STD_INFO", "ICON_STD_INFO" );
|
||||
@ -2741,6 +2751,8 @@ void SMESHGUI::initialize( CAM_Application* app )
|
||||
createMenu( 811, meshId, -1 );
|
||||
createMenu( 812, meshId, -1 );
|
||||
createMenu( separator(), meshId, -1 );
|
||||
createMenu( 814, meshId, -1 );
|
||||
createMenu( separator(), meshId, -1 );
|
||||
createMenu( 813, meshId, -1 );
|
||||
createMenu( separator(), meshId, -1 );
|
||||
createMenu( 900, meshId, -1 );
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -37,6 +37,10 @@
|
||||
#include CORBA_SERVER_HEADER(SMESH_Group)
|
||||
|
||||
class QPushButton;
|
||||
class QtxColorButton;
|
||||
class QComboBox;
|
||||
class QListWidget;
|
||||
class QGroupBox;
|
||||
class QLineEdit;
|
||||
class SMESHGUI;
|
||||
class LightApp_SelectionMgr;
|
||||
@ -52,14 +56,37 @@ class SMESHGUI_EXPORT SMESHGUI_GroupOpDlg : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum { UNION, INTERSECT, CUT };
|
||||
//enum { UNION, INTERSECT, CUT };
|
||||
|
||||
public:
|
||||
SMESHGUI_GroupOpDlg( SMESHGUI*, const int );
|
||||
SMESHGUI_GroupOpDlg( SMESHGUI* );
|
||||
virtual ~SMESHGUI_GroupOpDlg();
|
||||
|
||||
void Init();
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
virtual bool onApply();
|
||||
virtual void onSelectionDone();
|
||||
virtual void setVisible ( bool visible );
|
||||
|
||||
protected:
|
||||
|
||||
virtual void reset();
|
||||
|
||||
QString getName() const;
|
||||
void setName( const QString& theName );
|
||||
|
||||
QGroupBox* getArgGrp() const;
|
||||
void setHelpFileName( const QString& theFName );
|
||||
SMESHGUI* getSMESHGUI() const;
|
||||
bool isValid( const QList<SMESH::SMESH_GroupBase_var>& theListGrp );
|
||||
bool getSelectedGroups( QList<SMESH::SMESH_GroupBase_var>& theOutList,
|
||||
QStringList& theOutNames );
|
||||
SMESH::ListOfGroups* convert( const QList<SMESH::SMESH_GroupBase_var>& );
|
||||
|
||||
SALOMEDS::Color getColor() const;
|
||||
|
||||
private:
|
||||
void closeEvent( QCloseEvent* );
|
||||
void enterEvent( QEvent* );
|
||||
@ -67,20 +94,15 @@ private:
|
||||
|
||||
private slots:
|
||||
void onOk();
|
||||
bool onApply();
|
||||
void onClose();
|
||||
void onHelp();
|
||||
|
||||
void onDeactivate();
|
||||
void onSelectionDone();
|
||||
void onFocusChanged();
|
||||
|
||||
private:
|
||||
QWidget* createButtonFrame( QWidget* );
|
||||
QWidget* createMainFrame ( QWidget* );
|
||||
bool isValid();
|
||||
void reset();
|
||||
|
||||
|
||||
private:
|
||||
QPushButton* myOkBtn;
|
||||
QPushButton* myApplyBtn;
|
||||
@ -88,22 +110,129 @@ private:
|
||||
QPushButton* myHelpBtn;
|
||||
|
||||
QLineEdit* myNameEdit;
|
||||
QLineEdit* myEdit1;
|
||||
QLineEdit* myEdit2;
|
||||
QPushButton* myBtn1;
|
||||
QPushButton* myBtn2;
|
||||
QGroupBox* myArgGrp;
|
||||
QtxColorButton* myColorBtn;
|
||||
|
||||
SMESHGUI* mySMESHGUI;
|
||||
LightApp_SelectionMgr* mySelectionMgr;
|
||||
int myMode;
|
||||
SVTK_Selector* mySelector;
|
||||
|
||||
QLineEdit* myFocusWg;
|
||||
|
||||
SMESH::SMESH_GroupBase_var myGroup1;
|
||||
SMESH::SMESH_GroupBase_var myGroup2;
|
||||
|
||||
QString myHelpFileName;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : SMESHGUI_UnionGroupsDlg
|
||||
Description : Perform union of several groups
|
||||
*/
|
||||
|
||||
class SMESHGUI_EXPORT SMESHGUI_UnionGroupsDlg : public SMESHGUI_GroupOpDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
SMESHGUI_UnionGroupsDlg( SMESHGUI* );
|
||||
virtual ~SMESHGUI_UnionGroupsDlg();
|
||||
|
||||
protected slots:
|
||||
virtual bool onApply();
|
||||
virtual void onSelectionDone();
|
||||
|
||||
protected:
|
||||
virtual void reset();
|
||||
|
||||
private:
|
||||
QListWidget* myListWg;
|
||||
QList<SMESH::SMESH_GroupBase_var> myGroups;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : SMESHGUI_IntersectGroupsDlg
|
||||
Description : Perform intersection of several groups
|
||||
*/
|
||||
|
||||
class SMESHGUI_EXPORT SMESHGUI_IntersectGroupsDlg : public SMESHGUI_GroupOpDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
SMESHGUI_IntersectGroupsDlg( SMESHGUI* );
|
||||
virtual ~SMESHGUI_IntersectGroupsDlg();
|
||||
|
||||
protected slots:
|
||||
virtual bool onApply();
|
||||
virtual void onSelectionDone();
|
||||
|
||||
protected:
|
||||
virtual void reset();
|
||||
|
||||
private:
|
||||
QListWidget* myListWg;
|
||||
QList<SMESH::SMESH_GroupBase_var> myGroups;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : SMESHGUI_CutGroupsDlg
|
||||
Description : Perform cut of several groups
|
||||
*/
|
||||
|
||||
class SMESHGUI_EXPORT SMESHGUI_CutGroupsDlg : public SMESHGUI_GroupOpDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
SMESHGUI_CutGroupsDlg( SMESHGUI* );
|
||||
virtual ~SMESHGUI_CutGroupsDlg();
|
||||
|
||||
protected slots:
|
||||
virtual bool onApply();
|
||||
virtual void onSelectionDone();
|
||||
|
||||
protected:
|
||||
virtual void reset();
|
||||
|
||||
private:
|
||||
QPushButton* myBtn1;
|
||||
QPushButton* myBtn2;
|
||||
QListWidget* myListWg1;
|
||||
QListWidget* myListWg2;
|
||||
QList<SMESH::SMESH_GroupBase_var> myGroups1;
|
||||
QList<SMESH::SMESH_GroupBase_var> myGroups2;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : SMESHGUI_DimGroupDlg
|
||||
Description : Dialog for creating groups of entities from existing
|
||||
groups of superior dimensions
|
||||
*/
|
||||
|
||||
class SMESHGUI_EXPORT SMESHGUI_DimGroupDlg : public SMESHGUI_GroupOpDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
SMESHGUI_DimGroupDlg( SMESHGUI* );
|
||||
virtual ~SMESHGUI_DimGroupDlg();
|
||||
|
||||
SMESH::ElementType getElementType() const;
|
||||
void setElementType( const SMESH::ElementType& theElemType );
|
||||
|
||||
protected:
|
||||
virtual void reset();
|
||||
|
||||
protected slots:
|
||||
virtual bool onApply();
|
||||
virtual void onSelectionDone();
|
||||
|
||||
private:
|
||||
QComboBox* myCombo;
|
||||
QListWidget* myListWg;
|
||||
QList<SMESH::SMESH_GroupBase_var> myGroups;
|
||||
};
|
||||
|
||||
#endif // SMESHGUI_GROUPOPDLG_H
|
||||
|
||||
|
||||
|
@ -402,5 +402,9 @@
|
||||
<source>ICON_CLEAR_MESH</source>
|
||||
<translation>mesh_clear.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_UNDERLYING_ELEMS</source>
|
||||
<translation>mesh_extractGroup.png</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -586,6 +586,10 @@
|
||||
<source>MEN_UN_GROUP</source>
|
||||
<translation>Union Groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MEN_UNDERLYING_ELEMS</source>
|
||||
<translation>Group of underlying entities</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MEN_UPDATE</source>
|
||||
<translation>Update</translation>
|
||||
@ -2276,6 +2280,10 @@ Consider saving your work before application crash</translation>
|
||||
<source>STB_UN_GROUP</source>
|
||||
<translation>Union Groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_UNDERLYING_ELEMS</source>
|
||||
<translation>Create groups of entities from existing groups of superior dimensions</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_UPDATE</source>
|
||||
<translation>Update</translation>
|
||||
@ -2736,6 +2744,10 @@ Consider saving your work before application crash</translation>
|
||||
<source>TOP_UN_GROUP</source>
|
||||
<translation>Union Groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_UNDERLYING_ELEMS</source>
|
||||
<translation>Create groups of entities from existing groups of superior dimensions</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_UPDATE</source>
|
||||
<translation>Update</translation>
|
||||
@ -3754,10 +3766,6 @@ Please enter correct value and try again</translation>
|
||||
<source>ARGUMENTS</source>
|
||||
<translation>Arguments</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CUT_OF_TWO_GROUPS</source>
|
||||
<translation>Cut of two groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>DIFF_MESHES</source>
|
||||
<translation>Arguments of operation are not correctly specified
|
||||
@ -3780,14 +3788,6 @@ Please specify non-empty name and try again</translation>
|
||||
<translation>Arguments of operation are not specified
|
||||
Please specify them and try again</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>INTERSECTION_OF_TWO_GROUPS</source>
|
||||
<translation>Intersection of two groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MAIN_OBJECT</source>
|
||||
<translation>Main object</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NAME</source>
|
||||
<translation>Name</translation>
|
||||
@ -3813,6 +3813,62 @@ Please specify them and try again</translation>
|
||||
<translation>Union of two groups</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI_UnionGroupsDlg</name>
|
||||
<message>
|
||||
<source>UNION_OF_GROUPS</source>
|
||||
<translation>Union of groups</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI_DimGroupDlg</name>
|
||||
<message>
|
||||
<source>CREATE_GROUP_OF_UNDERLYING_ELEMS</source>
|
||||
<translation>Create group of underlying entities</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ELEMENTS_TYPE</source>
|
||||
<translation>Elements type</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NODE</source>
|
||||
<translation>Node</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>EDGE</source>
|
||||
<translation>Edge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>FACE</source>
|
||||
<translation>Face</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>VOLUME</source>
|
||||
<translation>Volume</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI_IntersectGroupsDlg</name>
|
||||
<message>
|
||||
<source>INTERSECTION_OF_GROUPS</source>
|
||||
<translation>Intersection of groups</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI_CutGroupsDlg</name>
|
||||
<message>
|
||||
<source>CUT_OF_GROUPS</source>
|
||||
<translation>Cut of groups</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MAIN_OBJECT</source>
|
||||
<translation>Main object</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOOL_OBJECT</source>
|
||||
<translation>Tool object</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI_MakeNodeAtPointDlg</name>
|
||||
<message>
|
||||
|
Loading…
Reference in New Issue
Block a user