+ groupSO = _gen_i->getStudyServant()->FindObjectID( groupData._groupEntry.c_str() );
+ }
+
+ if ( groupSO->_is_nil() )
+ return newShape;
+
+ CORBA::Object_var groupObj = _gen_i->SObjectToObject( groupSO );
+ GEOM::GEOM_Object_var geomGroup = GEOM::GEOM_Object::_narrow( groupObj );
+ if ( geomGroup->_is_nil() )
+ return newShape;
+
+ // get indices of group items
+ set<int> curIndices;
+ GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( geomGroup );
+ GEOM::GEOM_IGroupOperations_wrap groupOp = geomGen->GetIGroupOperations();
+ GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup );
+ for ( CORBA::ULong i = 0; i < ids->length(); ++i )
+ curIndices.insert( ids[i] );
+
+ bool sameIndices = ( groupData._indices == curIndices );
+ if ( how == ONLY_IF_CHANGED && sameIndices )
+ return newShape; // group not changed
+
+ // update data
+ CORBA::String_var entry = geomGroup->GetStudyEntry();
+ groupData._groupEntry = entry.in();
+ groupData._indices = curIndices;
+
+ newShape = _gen_i->GeomObjectToShape( geomGroup );
+
+ // check if newShape is up-to-date
+ if ( !newShape.IsNull() && ids->length() > 0 )
+ {
+ bool toUpdate = ! _impl->GetMeshDS()->IsGroupOfSubShapes( newShape );
+ if ( !toUpdate )