mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-28 02:58:36 +05:00
0020095: EDF 896 SMESH : Advanced Mesh info on a group
correct Mesh Info statistic for sub-mesh objects
This commit is contained in:
parent
72b7497557
commit
20a656158d
@ -531,26 +531,16 @@ SMESH::long_array* SMESH_subMesh_i::GetMeshInfo()
|
|||||||
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
|
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
|
||||||
aRes[i] = 0;
|
aRes[i] = 0;
|
||||||
|
|
||||||
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
|
// get number of nodes
|
||||||
SMESHDS_SubMesh* aSubMeshDS = 0;
|
aRes[ SMESH::Entity_Node ] = GetNumberOfNodes(true);
|
||||||
if (aSubMesh) aSubMeshDS = aSubMesh->GetSubMeshDS();
|
|
||||||
if (!aSubMeshDS)
|
|
||||||
return aRes._retn();
|
|
||||||
|
|
||||||
// get own number of nodes
|
|
||||||
aRes[ SMESH::Entity_Node ] = aSubMeshDS->NbNodes();
|
|
||||||
|
|
||||||
// get own elements statistic
|
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
|
||||||
SMESH_Mesh_i::CollectMeshInfo( aSubMeshDS->GetElements(), aRes );
|
|
||||||
|
|
||||||
// get statistic from child sub-meshes
|
// get statistic from child sub-meshes
|
||||||
TListOfSubMeshes smList;
|
TListOfSubMeshes smList;
|
||||||
if ( getSubMeshes( aSubMesh, smList ) )
|
if ( getSubMeshes( aSubMesh, smList ) )
|
||||||
for ( TListOfSubMeshes::iterator sm = smList.begin(); sm != smList.end(); ++sm )
|
for ( TListOfSubMeshes::iterator sm = smList.begin(); sm != smList.end(); ++sm )
|
||||||
{
|
|
||||||
aRes[ SMESH::Entity_Node ]+= (*sm)->NbNodes();
|
|
||||||
SMESH_Mesh_i::CollectMeshInfo( (*sm)->GetElements(), aRes );
|
SMESH_Mesh_i::CollectMeshInfo( (*sm)->GetElements(), aRes );
|
||||||
}
|
|
||||||
|
|
||||||
return aRes._retn();
|
return aRes._retn();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user