From: eap Date: Thu, 27 Aug 2009 13:58:53 +0000 (+0000) Subject: fix GetSubMesh() X-Git-Tag: V5_1_3rc1~91 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=30aaa793b970f657acd97be09ab6ec82ee345c44;p=modules%2Fsmesh.git fix GetSubMesh() if ( it.More() ) + { index = _myMeshDS->AddCompoundSubmesh( aSubShape, it.Value().ShapeType() ); + if ( index > _nbSubShapes ) _nbSubShapes = index; // not to create sm for this group again + } } --- diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index bba940ee6..1281522d9 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -839,7 +839,10 @@ SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape) if (( !index || index > _nbSubShapes ) && aSubShape.ShapeType() == TopAbs_COMPOUND ) { TopoDS_Iterator it( aSubShape ); if ( it.More() ) + { index = _myMeshDS->AddCompoundSubmesh( aSubShape, it.Value().ShapeType() ); + if ( index > _nbSubShapes ) _nbSubShapes = index; // not to create sm for this group again + } } // if ( !index ) // return NULL; // neither sub-shape nor a group