X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_MeshEditor_i.cxx;h=421a0babf9d09ee7b3781f9222453746a5e7ec5d;hb=fe414fe4e7ff1d0488d8a9b9795e04a1ad34a75a;hp=1589d11b4d01aced16dc2256fb6d485aa545826e;hpb=a4f06a3d9d427fc2d618d47c95f307d2a6695b4c;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 1589d11b4..421a0babf 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -4115,8 +4115,6 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO } else { - theGroups = theCopyGroups ? getGroups( groupIds.get() ) : new SMESH::ListOfGroups; - if ( *theMeshName && mesh_var->NbFaces() == 0 ) { // new mesh empty, remove it @@ -4126,6 +4124,10 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO builder->RemoveObjectWithChildren( meshSO ); THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR); } + if ( !groupIds ) // nothing changed in the current mesh + THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR); + + theGroups = theCopyGroups ? getGroups( groupIds.get() ) : new SMESH::ListOfGroups; // result of Offset() is a tuple (mesh, groups) if ( mesh_var->_is_nil() ) pyDump << myMesh_i->_this() << ", ";