From c7b8fb12f32dfa28a7387abccd137034d0bff0f8 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 25 May 2009 11:20:50 +0000 Subject: [PATCH] 0020145: EDF 666 SMESH: Modifications of GEOM groups are not taken into account allow changing shape to mesh in case of shape being group --- src/SMESH/SMESH_Mesh.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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() ) { -- 2.39.2