From 20a656158d7cc37609faad8711292208526e31fa Mon Sep 17 00:00:00 2001 From: ptv Date: Thu, 27 Aug 2009 10:27:17 +0000 Subject: [PATCH] 0020095: EDF 896 SMESH : Advanced Mesh info on a group correct Mesh Info statistic for sub-mesh objects --- src/SMESH_I/SMESH_subMesh_i.cxx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index 2813ceb32..7d342969a 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -531,26 +531,16 @@ SMESH::long_array* SMESH_subMesh_i::GetMeshInfo() for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) aRes[i] = 0; - ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; - SMESHDS_SubMesh* aSubMeshDS = 0; - if (aSubMesh) aSubMeshDS = aSubMesh->GetSubMeshDS(); - if (!aSubMeshDS) - return aRes._retn(); - - // get own number of nodes - aRes[ SMESH::Entity_Node ] = aSubMeshDS->NbNodes(); + // get number of nodes + aRes[ SMESH::Entity_Node ] = GetNumberOfNodes(true); - // get own elements statistic - SMESH_Mesh_i::CollectMeshInfo( aSubMeshDS->GetElements(), aRes ); + ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; // get statistic from child sub-meshes TListOfSubMeshes smList; if ( getSubMeshes( aSubMesh, smList ) ) for ( TListOfSubMeshes::iterator sm = smList.begin(); sm != smList.end(); ++sm ) - { - aRes[ SMESH::Entity_Node ]+= (*sm)->NbNodes(); SMESH_Mesh_i::CollectMeshInfo( (*sm)->GetElements(), aRes ); - } return aRes._retn(); } -- 2.39.2