// purpose :
//=======================================================================
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;
QWidget* parent = application()->desktop();
status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() );
createAction( id, tooltip, icon, menu, status_bar, key, parent,
- toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
+ toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
}
//=======================================================================
const QString& = QString(),
const int = 0,
const bool = false,
- const QString& = QString() );
+ const QString& = QString() );
void createPopupItem( const int,
const QString&,
const QString&,
if( addToGroup ) {
aGroupName = ComboBox_GroupName->currentText();
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
- QString aName = ComboBox_GroupName->itemText( i );
- if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
- idx = i;
+ QString aName = ComboBox_GroupName->itemText( i );
+ if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+ idx = i;
}
if ( idx > 0 ) {
- SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
- if ( !aGeomGroup->_is_nil() ) {
- int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
- tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
- tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
- if ( res == 1 ) return;
- }
- aGroup = myGroups[idx-1];
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+ if ( !aGeomGroup->_is_nil() ) {
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return;
+ }
+ aGroup = myGroups[idx-1];
}
}
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
SMESH::SMESH_Group_var aGroupUsed;
if ( aGroup->_is_nil() ) {
- // create new group
- aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
- if ( !aGroupUsed->_is_nil() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
- ComboBox_GroupName->addItem( aGroupName );
- }
+ // create new group
+ aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
+ if ( !aGroupUsed->_is_nil() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
}
else {
- SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
- if ( !aGeomGroup->_is_nil() ) {
- aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
- if ( !aGroupUsed->_is_nil() && idx > 0 ) {
- myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
- SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
- }
- }
- else
- aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+ if ( !aGeomGroup->_is_nil() ) {
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
+ }
+ else
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
}
if ( !aGroupUsed->_is_nil() ) {
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
if ( !aGroup->_is_nil() && aGroup->GetType() == (SMESH::ElementType)myElementType ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
- ComboBox_GroupName->addItem( aGroupName );
- }
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
}
}
}
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
QString aName = ComboBox_GroupName->itemText( i );
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
- idx = i;
+ idx = i;
}
if ( idx > 0 ) {
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
if ( !aGeomGroup->_is_nil() ) {
- int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
- tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
- tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
- if ( res == 1 ) return;
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return;
}
aGroup = myGroups[idx-1];
}
// create new group
aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
if ( !aGroupUsed->_is_nil() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
- ComboBox_GroupName->addItem( aGroupName );
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
}
}
else {
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
if ( !aGeomGroup->_is_nil() ) {
- aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
- if ( !aGroupUsed->_is_nil() && idx > 0 ) {
- myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
- SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
- }
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
}
else
- aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
}
if ( !aGroupUsed->_is_nil() ) {
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
if ( !aGroup->_is_nil() && aGroup->GetType() == anElementType ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
- ComboBox_GroupName->addItem( aGroupName );
- }
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
}
}
}
SMESH::SMESH_GroupBase_var aGroup;
int idx = 0;
if( addToGroup ) {
- aGroupName = ComboBox_GroupName->currentText();
- for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
- QString aName = ComboBox_GroupName->itemText( i );
- if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
- idx = i;
- }
- if ( idx > 0 ) {
- SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
- if ( !aGeomGroup->_is_nil() ) {
- int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
- tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
- tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
- if ( res == 1 ) return;
- }
- aGroup = myGroups[idx-1];
- }
+ aGroupName = ComboBox_GroupName->currentText();
+ for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+ QString aName = ComboBox_GroupName->itemText( i );
+ if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+ idx = i;
+ }
+ if ( idx > 0 ) {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+ if ( !aGeomGroup->_is_nil() ) {
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return;
+ }
+ aGroup = myGroups[idx-1];
+ }
}
if (GetConstructorId() == 0)
}
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
- SMESH::SMESH_Group_var aGroupUsed;
- if ( aGroup->_is_nil() ) {
- // create new group
- aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
- if ( !aGroupUsed->_is_nil() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
- ComboBox_GroupName->addItem( aGroupName );
- }
- }
- else {
- SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
- if ( !aGeomGroup->_is_nil() ) {
- aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
- if ( !aGroupUsed->_is_nil() && idx > 0 ) {
- myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
- SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
- }
- }
- else
- aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
- }
-
+ SMESH::SMESH_Group_var aGroupUsed;
+ if ( aGroup->_is_nil() ) {
+ // create new group
+ aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
+ if ( !aGroupUsed->_is_nil() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
+ }
+ else {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+ if ( !aGeomGroup->_is_nil() ) {
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
+ }
+ else
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+ }
+
if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array;
anIdList->length( 1 );
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::VOLUME ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
- ComboBox_GroupName->addItem( aGroupName );
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
}
}
}
if (operationMode == 0) {
if (toCreateGroup) {
- SMESH::SMESH_GroupBase_ptr aNewGroup =
- aMeshEditor->DoubleNodeGroupNew(myGroup1, myGroup2);
- if (!CORBA::is_nil(aNewGroup))
+ SMESH::SMESH_GroupBase_ptr aNewGroup =
+ aMeshEditor->DoubleNodeGroupNew(myGroup1, myGroup2);
+ if (!CORBA::is_nil(aNewGroup))
result = true;
}
else
- result = aMeshEditor->DoubleNodeGroup(myGroup1, myGroup2);
+ result = aMeshEditor->DoubleNodeGroup(myGroup1, myGroup2);
}
else {
if (toCreateGroup) {
- SMESH::SMESH_GroupBase_ptr aNewGroup =
- aMeshEditor->DoubleNodeElemGroupNew(myGroup1, myGroup2, myGroup3);
- if (!CORBA::is_nil(aNewGroup))
- result = true;
+ SMESH::SMESH_GroupBase_ptr aNewGroup =
+ aMeshEditor->DoubleNodeElemGroupNew(myGroup1, myGroup2, myGroup3);
+ if (!CORBA::is_nil(aNewGroup))
+ result = true;
}
else
- result = aMeshEditor->DoubleNodeElemGroup(myGroup1, myGroup2, myGroup3);
+ result = aMeshEditor->DoubleNodeElemGroup(myGroup1, myGroup2, myGroup3);
}
}
catch (const SALOME::SALOME_Exception& S_ex) {
bool isTypeValid = true;
if (operationMode == 0) {
- if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::NODE) ||
- (myCurrentLineEdit == myLineEdit2 && aGroupType == SMESH::NODE) )
- isTypeValid = false;
+ if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::NODE) ||
+ (myCurrentLineEdit == myLineEdit2 && aGroupType == SMESH::NODE) )
+ isTypeValid = false;
}
else if (operationMode == 1) {
- if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::EDGE &&
- aGroupType != SMESH::FACE) ||
- (myCurrentLineEdit == myLineEdit2 && aGroupType != SMESH::NODE) ||
- (myCurrentLineEdit == myLineEdit3 && aGroupType == SMESH::NODE) )
- isTypeValid = false;
+ if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::EDGE &&
+ aGroupType != SMESH::FACE) ||
+ (myCurrentLineEdit == myLineEdit2 && aGroupType != SMESH::NODE) ||
+ (myCurrentLineEdit == myLineEdit3 && aGroupType == SMESH::NODE) )
+ isTypeValid = false;
}
if (!isTypeValid)
- aGroup = SMESH::SMESH_GroupBase::_nil();
+ aGroup = SMESH::SMESH_GroupBase::_nil();
}
}
QList<int> types;
types << SMESH::FT_BelongToGeom << SMESH::FT_BelongToPlane
- << SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface
- << SMESH::FT_LyingOnGeom;
+ << SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface
+ << SMESH::FT_LyingOnGeom;
if (aList.Extent() != 1 || !myTable->CurrentCell(aRow, aCol) ||
!types.contains(myTable->GetCriterionType(aRow)))
return;
switch (theMode) {
case grpNodeSelection:
if (myActorsList.count() > 0) {
- QListIterator<SMESH_Actor*> it( myActorsList );
- while ( it.hasNext() )
- it.next()->SetPointRepresentation(true);
+ QListIterator<SMESH_Actor*> it( myActorsList );
+ while ( it.hasNext() )
+ it.next()->SetPointRepresentation(true);
}
else {
- SMESH::SetPointRepresentation(true);
+ SMESH::SetPointRepresentation(true);
}
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : NodeSelection);
break;
myGroup = SMESH::AddGroup(myMesh, aType, myName->text());
if ( mySelectAll->isChecked() ) {
- // select all
- myGroup->AddFrom(myMesh.in());
+ // select all
+ myGroup->AddFrom(myMesh.in());
}
else {
- // select manually
- SMESH::long_array_var anIdList = new SMESH::long_array;
- int i, k = myElements->count();
- anIdList->length(k);
- for (i = 0; i < k; i++) {
- anIdList[i] = myElements->item(i)->text().toInt();
- }
-
- myGroup->Add(anIdList.inout());
+ // select manually
+ SMESH::long_array_var anIdList = new SMESH::long_array;
+ int i, k = myElements->count();
+ anIdList->length(k);
+ for (i = 0; i < k; i++) {
+ anIdList[i] = myElements->item(i)->text().toInt();
+ }
+
+ myGroup->Add(anIdList.inout());
}
SALOMEDS::Color aColor = getGroupColor();
}
if ( mySelectAll->isChecked() ) {
- // select all
- myGroup->Clear();
- myGroup->AddFrom(myMesh.in());
+ // select all
+ myGroup->Clear();
+ myGroup->AddFrom(myMesh.in());
}
else {
- QList<int> aAddList;
-
- int i, total = myElements->count();
- for (i = 0; i < total; i++) {
- int anId = myElements->item(i)->text().toInt();
- int idx = myIdList.indexOf(anId);
- if ( idx == -1 )
- aAddList.append(anId);
- else
- myIdList.removeAt(idx);
- }
- if (!aAddList.empty()) {
- SMESH::long_array_var anIdList = new SMESH::long_array;
- int added = aAddList.count();
- anIdList->length(added);
- for (i = 0; i < added; i++)
- anIdList[i] = aAddList[i];
- myGroup->Add(anIdList.inout());
- }
- if (!myIdList.empty()) {
- SMESH::long_array_var anIdList = new SMESH::long_array;
- int removed = myIdList.count();
- anIdList->length(removed);
- for (i = 0; i < removed; i++)
- anIdList[i] = myIdList[i];
- myGroup->Remove(anIdList.inout());
- }
- /* init for next operation */
- myIdList.clear();
- for (i = 0; i < total; i++) {
- myIdList.append(myElements->item(i)->text().toInt());
- }
+ QList<int> aAddList;
+
+ int i, total = myElements->count();
+ for (i = 0; i < total; i++) {
+ int anId = myElements->item(i)->text().toInt();
+ int idx = myIdList.indexOf(anId);
+ if ( idx == -1 )
+ aAddList.append(anId);
+ else
+ myIdList.removeAt(idx);
+ }
+ if (!aAddList.empty()) {
+ SMESH::long_array_var anIdList = new SMESH::long_array;
+ int added = aAddList.count();
+ anIdList->length(added);
+ for (i = 0; i < added; i++)
+ anIdList[i] = aAddList[i];
+ myGroup->Add(anIdList.inout());
+ }
+ if (!myIdList.empty()) {
+ SMESH::long_array_var anIdList = new SMESH::long_array;
+ int removed = myIdList.count();
+ anIdList->length(removed);
+ for (i = 0; i < removed; i++)
+ anIdList[i] = myIdList[i];
+ myGroup->Remove(anIdList.inout());
+ }
+ /* init for next operation */
+ myIdList.clear();
+ for (i = 0; i < total; i++) {
+ myIdList.append(myElements->item(i)->text().toInt());
+ }
}
}
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
QString aName = ComboBox_GroupName->itemText( i );
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
- idx = i;
+ idx = i;
}
if ( idx > 0 ) {
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
if ( !aGeomGroup->_is_nil() ) {
- int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
- tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
- tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
- if ( res == 1 ) return false;
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return false;
}
aGroup = myGroups[idx-1];
}
// create new group
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::NODE, aGroupName );
if ( !aGroupUsed->_is_nil() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
- ComboBox_GroupName->addItem( aGroupName );
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
}
}
else {
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
if ( !aGeomGroup->_is_nil() ) {
- aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
- if ( !aGroupUsed->_is_nil() && idx > 0 ) {
- myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
- SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
- }
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
}
else
- aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
}
if ( !aGroupUsed->_is_nil() ) {
for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::NODE ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() ) {
- myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
- ComboBox_GroupName->addItem( aGroupName );
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
}
}
}
myActor = SMESH::FindActorByEntry(anIO->getEntry());
if (myActor) {
-
- // get selected nodes
- QString aString = "";
- int nbElems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aString);
- if (nbElems > 0) {
- myBusy = true;
- myEditCurrentArgument->setText(aString);
- myBusy = false;
-
- // OK
-
- myNbOkElements = nbElems;
- } // if (nbElems > 0)
+
+ // get selected nodes
+ QString aString = "";
+ int nbElems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aString);
+ if (nbElems > 0) {
+ myBusy = true;
+ myEditCurrentArgument->setText(aString);
+ myBusy = false;
+
+ // OK
+
+ myNbOkElements = nbElems;
+ } // if (nbElems > 0)
} // if (myActor)
} // if (!myMesh->_is_nil())
} // if (nbSel == 1) {
- updateButtons();
+ updateButtons();
}
//=================================================================================
myActor = SMESH::FindActorByEntry(anIO->getEntry());
if (myActor) {
- // get selected nodes
- QString aString = "";
- int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
- if (nbNodes > 0) {
- myBusy = true;
- myEditCurrentArgument->setText(aString);
- myBusy = false;
-
- // OK
-
- myNbOkNodes = nbNodes;
- } // if (nbNodes > 0)
+ // get selected nodes
+ QString aString = "";
+ int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
+ if (nbNodes > 0) {
+ myBusy = true;
+ myEditCurrentArgument->setText(aString);
+ myBusy = false;
+
+ // OK
+
+ myNbOkNodes = nbNodes;
+ } // if (nbNodes > 0)
} // if (myActor)
} // if (!myMesh->_is_nil())
} // if (nbSel == 1)
- updateButtons();
+ updateButtons();
}
//=================================================================================
if (aGroupDS) {
SMESH::long_array_var anIds;
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();
}
else if ( !CORBA::is_nil(SMESH::SMESH_Mesh::_narrow(theSource)) ) {
* \sa DoubleNodeGroup()
*/
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,
const SMESH::ListOfGroups& theModifiedElems);
* \sa DoubleNodeElemGroup()
*/
SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
- SMESH::SMESH_GroupBase_ptr theNodesNot,
- SMESH::SMESH_GroupBase_ptr theAffectedElems );
+ SMESH::SMESH_GroupBase_ptr theNodesNot,
+ SMESH::SMESH_GroupBase_ptr theAffectedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements