mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 14:40:32 +05:00
untabify
This commit is contained in:
parent
4802162fe0
commit
859a8ee4f0
@ -2892,7 +2892,7 @@ void SMESHGUI::BuildPresentation( const Handle(SALOME_InteractiveObject) & theIO
|
|||||||
// purpose :
|
// purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QString& icon_id,
|
void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QString& icon_id,
|
||||||
const int key, const bool toggle, const QString& shortcutAction )
|
const int key, const bool toggle, const QString& shortcutAction )
|
||||||
{
|
{
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
QWidget* parent = application()->desktop();
|
QWidget* parent = application()->desktop();
|
||||||
@ -2910,7 +2910,7 @@ void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QStr
|
|||||||
status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() );
|
status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() );
|
||||||
|
|
||||||
createAction( id, tooltip, icon, menu, status_bar, key, parent,
|
createAction( id, tooltip, icon, menu, status_bar, key, parent,
|
||||||
toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
|
toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -146,7 +146,7 @@ protected:
|
|||||||
const QString& = QString(),
|
const QString& = QString(),
|
||||||
const int = 0,
|
const int = 0,
|
||||||
const bool = false,
|
const bool = false,
|
||||||
const QString& = QString() );
|
const QString& = QString() );
|
||||||
void createPopupItem( const int,
|
void createPopupItem( const int,
|
||||||
const QString&,
|
const QString&,
|
||||||
const QString&,
|
const QString&,
|
||||||
|
@ -492,19 +492,19 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|||||||
if( addToGroup ) {
|
if( addToGroup ) {
|
||||||
aGroupName = ComboBox_GroupName->currentText();
|
aGroupName = ComboBox_GroupName->currentText();
|
||||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||||
QString aName = ComboBox_GroupName->itemText( i );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 ) {
|
if ( idx > 0 ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||||
if ( res == 1 ) return;
|
if ( res == 1 ) return;
|
||||||
}
|
}
|
||||||
aGroup = myGroups[idx-1];
|
aGroup = myGroups[idx-1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,24 +530,24 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|||||||
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
||||||
SMESH::SMESH_Group_var aGroupUsed;
|
SMESH::SMESH_Group_var aGroupUsed;
|
||||||
if ( aGroup->_is_nil() ) {
|
if ( aGroup->_is_nil() ) {
|
||||||
// create new group
|
// create new group
|
||||||
aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
|
aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
@ -736,11 +736,11 @@ void SMESHGUI_AddMeshElementDlg::SelectionIntoArgument()
|
|||||||
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||||
if ( !aGroup->_is_nil() && aGroup->GetType() == (SMESH::ElementType)myElementType ) {
|
if ( !aGroup->_is_nil() && aGroup->GetType() == (SMESH::ElementType)myElementType ) {
|
||||||
QString aGroupName( aGroup->GetName() );
|
QString aGroupName( aGroup->GetName() );
|
||||||
if ( !aGroupName.isEmpty() ) {
|
if ( !aGroupName.isEmpty() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -731,15 +731,15 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
|||||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||||
QString aName = ComboBox_GroupName->itemText( i );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 ) {
|
if ( idx > 0 ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||||
if ( res == 1 ) return;
|
if ( res == 1 ) return;
|
||||||
}
|
}
|
||||||
aGroup = myGroups[idx-1];
|
aGroup = myGroups[idx-1];
|
||||||
}
|
}
|
||||||
@ -771,21 +771,21 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
|||||||
// create new group
|
// create new group
|
||||||
aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
|
aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
@ -974,11 +974,11 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
|
|||||||
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||||
if ( !aGroup->_is_nil() && aGroup->GetType() == anElementType ) {
|
if ( !aGroup->_is_nil() && aGroup->GetType() == anElementType ) {
|
||||||
QString aGroupName( aGroup->GetName() );
|
QString aGroupName( aGroup->GetName() );
|
||||||
if ( !aGroupName.isEmpty() ) {
|
if ( !aGroupName.isEmpty() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,22 +456,22 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
|
|||||||
SMESH::SMESH_GroupBase_var aGroup;
|
SMESH::SMESH_GroupBase_var aGroup;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
if( addToGroup ) {
|
if( addToGroup ) {
|
||||||
aGroupName = ComboBox_GroupName->currentText();
|
aGroupName = ComboBox_GroupName->currentText();
|
||||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||||
QString aName = ComboBox_GroupName->itemText( i );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 ) {
|
if ( idx > 0 ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||||
if ( res == 1 ) return;
|
if ( res == 1 ) return;
|
||||||
}
|
}
|
||||||
aGroup = myGroups[idx-1];
|
aGroup = myGroups[idx-1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetConstructorId() == 0)
|
if (GetConstructorId() == 0)
|
||||||
@ -535,27 +535,27 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
||||||
SMESH::SMESH_Group_var aGroupUsed;
|
SMESH::SMESH_Group_var aGroupUsed;
|
||||||
if ( aGroup->_is_nil() ) {
|
if ( aGroup->_is_nil() ) {
|
||||||
// create new group
|
// create new group
|
||||||
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
|
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||||
@ -771,10 +771,10 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::SelectionIntoArgument()
|
|||||||
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||||
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::VOLUME ) {
|
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::VOLUME ) {
|
||||||
QString aGroupName( aGroup->GetName() );
|
QString aGroupName( aGroup->GetName() );
|
||||||
if ( !aGroupName.isEmpty() ) {
|
if ( !aGroupName.isEmpty() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -325,23 +325,23 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
|
|||||||
|
|
||||||
if (operationMode == 0) {
|
if (operationMode == 0) {
|
||||||
if (toCreateGroup) {
|
if (toCreateGroup) {
|
||||||
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
||||||
aMeshEditor->DoubleNodeGroupNew(myGroup1, myGroup2);
|
aMeshEditor->DoubleNodeGroupNew(myGroup1, myGroup2);
|
||||||
if (!CORBA::is_nil(aNewGroup))
|
if (!CORBA::is_nil(aNewGroup))
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
result = aMeshEditor->DoubleNodeGroup(myGroup1, myGroup2);
|
result = aMeshEditor->DoubleNodeGroup(myGroup1, myGroup2);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (toCreateGroup) {
|
if (toCreateGroup) {
|
||||||
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
||||||
aMeshEditor->DoubleNodeElemGroupNew(myGroup1, myGroup2, myGroup3);
|
aMeshEditor->DoubleNodeElemGroupNew(myGroup1, myGroup2, myGroup3);
|
||||||
if (!CORBA::is_nil(aNewGroup))
|
if (!CORBA::is_nil(aNewGroup))
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
result = aMeshEditor->DoubleNodeElemGroup(myGroup1, myGroup2, myGroup3);
|
result = aMeshEditor->DoubleNodeElemGroup(myGroup1, myGroup2, myGroup3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const SALOME::SALOME_Exception& S_ex) {
|
catch (const SALOME::SALOME_Exception& S_ex) {
|
||||||
@ -419,20 +419,20 @@ void SMESHGUI_DuplicateNodesDlg::onSelectionChanged()
|
|||||||
bool isTypeValid = true;
|
bool isTypeValid = true;
|
||||||
|
|
||||||
if (operationMode == 0) {
|
if (operationMode == 0) {
|
||||||
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::NODE) ||
|
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::NODE) ||
|
||||||
(myCurrentLineEdit == myLineEdit2 && aGroupType == SMESH::NODE) )
|
(myCurrentLineEdit == myLineEdit2 && aGroupType == SMESH::NODE) )
|
||||||
isTypeValid = false;
|
isTypeValid = false;
|
||||||
}
|
}
|
||||||
else if (operationMode == 1) {
|
else if (operationMode == 1) {
|
||||||
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::EDGE &&
|
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::EDGE &&
|
||||||
aGroupType != SMESH::FACE) ||
|
aGroupType != SMESH::FACE) ||
|
||||||
(myCurrentLineEdit == myLineEdit2 && aGroupType != SMESH::NODE) ||
|
(myCurrentLineEdit == myLineEdit2 && aGroupType != SMESH::NODE) ||
|
||||||
(myCurrentLineEdit == myLineEdit3 && aGroupType == SMESH::NODE) )
|
(myCurrentLineEdit == myLineEdit3 && aGroupType == SMESH::NODE) )
|
||||||
isTypeValid = false;
|
isTypeValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isTypeValid)
|
if (!isTypeValid)
|
||||||
aGroup = SMESH::SMESH_GroupBase::_nil();
|
aGroup = SMESH::SMESH_GroupBase::_nil();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2976,8 +2976,8 @@ void SMESHGUI_FilterDlg::onSelectionDone()
|
|||||||
|
|
||||||
QList<int> types;
|
QList<int> types;
|
||||||
types << SMESH::FT_BelongToGeom << SMESH::FT_BelongToPlane
|
types << SMESH::FT_BelongToGeom << SMESH::FT_BelongToPlane
|
||||||
<< SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface
|
<< SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface
|
||||||
<< SMESH::FT_LyingOnGeom;
|
<< SMESH::FT_LyingOnGeom;
|
||||||
if (aList.Extent() != 1 || !myTable->CurrentCell(aRow, aCol) ||
|
if (aList.Extent() != 1 || !myTable->CurrentCell(aRow, aCol) ||
|
||||||
!types.contains(myTable->GetCriterionType(aRow)))
|
!types.contains(myTable->GetCriterionType(aRow)))
|
||||||
return;
|
return;
|
||||||
|
@ -718,12 +718,12 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
|
|||||||
switch (theMode) {
|
switch (theMode) {
|
||||||
case grpNodeSelection:
|
case grpNodeSelection:
|
||||||
if (myActorsList.count() > 0) {
|
if (myActorsList.count() > 0) {
|
||||||
QListIterator<SMESH_Actor*> it( myActorsList );
|
QListIterator<SMESH_Actor*> it( myActorsList );
|
||||||
while ( it.hasNext() )
|
while ( it.hasNext() )
|
||||||
it.next()->SetPointRepresentation(true);
|
it.next()->SetPointRepresentation(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SMESH::SetPointRepresentation(true);
|
SMESH::SetPointRepresentation(true);
|
||||||
}
|
}
|
||||||
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : NodeSelection);
|
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : NodeSelection);
|
||||||
break;
|
break;
|
||||||
@ -805,19 +805,19 @@ bool SMESHGUI_GroupDlg::onApply()
|
|||||||
myGroup = SMESH::AddGroup(myMesh, aType, myName->text());
|
myGroup = SMESH::AddGroup(myMesh, aType, myName->text());
|
||||||
|
|
||||||
if ( mySelectAll->isChecked() ) {
|
if ( mySelectAll->isChecked() ) {
|
||||||
// select all
|
// select all
|
||||||
myGroup->AddFrom(myMesh.in());
|
myGroup->AddFrom(myMesh.in());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// select manually
|
// select manually
|
||||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||||
int i, k = myElements->count();
|
int i, k = myElements->count();
|
||||||
anIdList->length(k);
|
anIdList->length(k);
|
||||||
for (i = 0; i < k; i++) {
|
for (i = 0; i < k; i++) {
|
||||||
anIdList[i] = myElements->item(i)->text().toInt();
|
anIdList[i] = myElements->item(i)->text().toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
myGroup->Add(anIdList.inout());
|
myGroup->Add(anIdList.inout());
|
||||||
}
|
}
|
||||||
|
|
||||||
SALOMEDS::Color aColor = getGroupColor();
|
SALOMEDS::Color aColor = getGroupColor();
|
||||||
@ -851,43 +851,43 @@ bool SMESHGUI_GroupDlg::onApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( mySelectAll->isChecked() ) {
|
if ( mySelectAll->isChecked() ) {
|
||||||
// select all
|
// select all
|
||||||
myGroup->Clear();
|
myGroup->Clear();
|
||||||
myGroup->AddFrom(myMesh.in());
|
myGroup->AddFrom(myMesh.in());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QList<int> aAddList;
|
QList<int> aAddList;
|
||||||
|
|
||||||
int i, total = myElements->count();
|
int i, total = myElements->count();
|
||||||
for (i = 0; i < total; i++) {
|
for (i = 0; i < total; i++) {
|
||||||
int anId = myElements->item(i)->text().toInt();
|
int anId = myElements->item(i)->text().toInt();
|
||||||
int idx = myIdList.indexOf(anId);
|
int idx = myIdList.indexOf(anId);
|
||||||
if ( idx == -1 )
|
if ( idx == -1 )
|
||||||
aAddList.append(anId);
|
aAddList.append(anId);
|
||||||
else
|
else
|
||||||
myIdList.removeAt(idx);
|
myIdList.removeAt(idx);
|
||||||
}
|
}
|
||||||
if (!aAddList.empty()) {
|
if (!aAddList.empty()) {
|
||||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||||
int added = aAddList.count();
|
int added = aAddList.count();
|
||||||
anIdList->length(added);
|
anIdList->length(added);
|
||||||
for (i = 0; i < added; i++)
|
for (i = 0; i < added; i++)
|
||||||
anIdList[i] = aAddList[i];
|
anIdList[i] = aAddList[i];
|
||||||
myGroup->Add(anIdList.inout());
|
myGroup->Add(anIdList.inout());
|
||||||
}
|
}
|
||||||
if (!myIdList.empty()) {
|
if (!myIdList.empty()) {
|
||||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||||
int removed = myIdList.count();
|
int removed = myIdList.count();
|
||||||
anIdList->length(removed);
|
anIdList->length(removed);
|
||||||
for (i = 0; i < removed; i++)
|
for (i = 0; i < removed; i++)
|
||||||
anIdList[i] = myIdList[i];
|
anIdList[i] = myIdList[i];
|
||||||
myGroup->Remove(anIdList.inout());
|
myGroup->Remove(anIdList.inout());
|
||||||
}
|
}
|
||||||
/* init for next operation */
|
/* init for next operation */
|
||||||
myIdList.clear();
|
myIdList.clear();
|
||||||
for (i = 0; i < total; i++) {
|
for (i = 0; i < total; i++) {
|
||||||
myIdList.append(myElements->item(i)->text().toInt());
|
myIdList.append(myElements->item(i)->text().toInt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,15 +452,15 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
|
|||||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||||
QString aName = ComboBox_GroupName->itemText( i );
|
QString aName = ComboBox_GroupName->itemText( i );
|
||||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||||
idx = i;
|
idx = i;
|
||||||
}
|
}
|
||||||
if ( idx > 0 ) {
|
if ( idx > 0 ) {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||||
if ( res == 1 ) return false;
|
if ( res == 1 ) return false;
|
||||||
}
|
}
|
||||||
aGroup = myGroups[idx-1];
|
aGroup = myGroups[idx-1];
|
||||||
}
|
}
|
||||||
@ -478,21 +478,21 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
|
|||||||
// create new group
|
// create new group
|
||||||
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::NODE, aGroupName );
|
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::NODE, aGroupName );
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||||
if ( !aGeomGroup->_is_nil() ) {
|
if ( !aGeomGroup->_is_nil() ) {
|
||||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aGroupUsed->_is_nil() ) {
|
if ( !aGroupUsed->_is_nil() ) {
|
||||||
@ -625,10 +625,10 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
|
|||||||
for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||||
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::NODE ) {
|
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::NODE ) {
|
||||||
QString aGroupName( aGroup->GetName() );
|
QString aGroupName( aGroup->GetName() );
|
||||||
if ( !aGroupName.isEmpty() ) {
|
if ( !aGroupName.isEmpty() ) {
|
||||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||||
ComboBox_GroupName->addItem( aGroupName );
|
ComboBox_GroupName->addItem( aGroupName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,18 +372,18 @@ void SMESHGUI_RemoveElementsDlg::SelectionIntoArgument()
|
|||||||
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
||||||
if (myActor) {
|
if (myActor) {
|
||||||
|
|
||||||
// get selected nodes
|
// get selected nodes
|
||||||
QString aString = "";
|
QString aString = "";
|
||||||
int nbElems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aString);
|
int nbElems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aString);
|
||||||
if (nbElems > 0) {
|
if (nbElems > 0) {
|
||||||
myBusy = true;
|
myBusy = true;
|
||||||
myEditCurrentArgument->setText(aString);
|
myEditCurrentArgument->setText(aString);
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
|
||||||
// OK
|
// OK
|
||||||
|
|
||||||
myNbOkElements = nbElems;
|
myNbOkElements = nbElems;
|
||||||
} // if (nbElems > 0)
|
} // if (nbElems > 0)
|
||||||
} // if (myActor)
|
} // if (myActor)
|
||||||
} // if (!myMesh->_is_nil())
|
} // if (!myMesh->_is_nil())
|
||||||
} // if (nbSel == 1) {
|
} // if (nbSel == 1) {
|
||||||
|
@ -377,18 +377,18 @@ void SMESHGUI_RemoveNodesDlg::SelectionIntoArgument()
|
|||||||
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
||||||
if (myActor) {
|
if (myActor) {
|
||||||
|
|
||||||
// get selected nodes
|
// get selected nodes
|
||||||
QString aString = "";
|
QString aString = "";
|
||||||
int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
|
int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
|
||||||
if (nbNodes > 0) {
|
if (nbNodes > 0) {
|
||||||
myBusy = true;
|
myBusy = true;
|
||||||
myEditCurrentArgument->setText(aString);
|
myEditCurrentArgument->setText(aString);
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
|
||||||
// OK
|
// OK
|
||||||
|
|
||||||
myNbOkNodes = nbNodes;
|
myNbOkNodes = nbNodes;
|
||||||
} // if (nbNodes > 0)
|
} // if (nbNodes > 0)
|
||||||
} // if (myActor)
|
} // if (myActor)
|
||||||
} // if (!myMesh->_is_nil())
|
} // if (!myMesh->_is_nil())
|
||||||
} // if (nbSel == 1)
|
} // if (nbSel == 1)
|
||||||
|
@ -354,7 +354,7 @@ CORBA::Long SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
|
|||||||
if (aGroupDS) {
|
if (aGroupDS) {
|
||||||
SMESH::long_array_var anIds;
|
SMESH::long_array_var anIds;
|
||||||
if ( !CORBA::is_nil(SMESH::SMESH_GroupBase::_narrow(theSource)) &&
|
if ( !CORBA::is_nil(SMESH::SMESH_GroupBase::_narrow(theSource)) &&
|
||||||
SMESH::SMESH_GroupBase::_narrow(theSource)->GetType() == GetType() ) {
|
SMESH::SMESH_GroupBase::_narrow(theSource)->GetType() == GetType() ) {
|
||||||
anIds = theSource->GetIDs();
|
anIds = theSource->GetIDs();
|
||||||
}
|
}
|
||||||
else if ( !CORBA::is_nil(SMESH::SMESH_Mesh::_narrow(theSource)) ) {
|
else if ( !CORBA::is_nil(SMESH::SMESH_Mesh::_narrow(theSource)) ) {
|
||||||
|
@ -561,7 +561,7 @@ public:
|
|||||||
* \sa DoubleNodeGroup()
|
* \sa DoubleNodeGroup()
|
||||||
*/
|
*/
|
||||||
SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
|
SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
|
||||||
SMESH::SMESH_GroupBase_ptr theModifiedElems );
|
SMESH::SMESH_GroupBase_ptr theModifiedElems );
|
||||||
|
|
||||||
CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
|
CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
|
||||||
const SMESH::ListOfGroups& theModifiedElems);
|
const SMESH::ListOfGroups& theModifiedElems);
|
||||||
@ -619,8 +619,8 @@ public:
|
|||||||
* \sa DoubleNodeElemGroup()
|
* \sa DoubleNodeElemGroup()
|
||||||
*/
|
*/
|
||||||
SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
|
SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
|
||||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||||
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||||
|
Loading…
Reference in New Issue
Block a user