From: eap Date: Mon, 25 May 2009 11:20:50 +0000 (+0000) Subject: 0020145: EDF 666 SMESH: Modifications of GEOM groups are not taken into account X-Git-Tag: V5_1_2rc1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c7b8fb12f32dfa28a7387abccd137034d0bff0f8;p=modules%2Fsmesh.git 0020145: EDF 666 SMESH: Modifications of GEOM groups are not taken into account allow changing shape to mesh in case of shape being group --- diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 5ddf9a515..88bb601e0 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -134,9 +134,11 @@ void SMESH_Mesh::ShapeToMesh(const TopoDS_Shape & aShape) { if(MYDEBUG) MESSAGE("SMESH_Mesh::ShapeToMesh"); - if ( !aShape.IsNull() && _isShapeToMesh ) - throw SALOME_Exception(LOCALIZED ("a shape to mesh has already been defined")); - + if ( !aShape.IsNull() && _isShapeToMesh ) { + if ( aShape.ShapeType() != TopAbs_COMPOUND && // group contents is allowed to change + _myMeshDS->ShapeToMesh().ShapeType() != TopAbs_COMPOUND ) + throw SALOME_Exception(LOCALIZED ("a shape to mesh has already been defined")); + } // clear current data if ( !_myMeshDS->ShapeToMesh().IsNull() ) {