fix PAL12398. Make GetIDs() return IDs of existing elements only

This commit is contained in:
eap 2006-05-26 08:57:02 +00:00
parent c99fc799e7
commit 1827b4ef32

View File

@ -1556,17 +1556,19 @@ char* SMESH_Mesh_i::Dump()
//=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetIDs()
{
SMESH::long_array_var aResult = new SMESH::long_array();
SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS();
int aMinId = aSMESHDS_Mesh->MinElementID();
int aMaxId = aSMESHDS_Mesh->MaxElementID();
// SMESH::long_array_var aResult = new SMESH::long_array();
// SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS();
// int aMinId = aSMESHDS_Mesh->MinElementID();
// int aMaxId = aSMESHDS_Mesh->MaxElementID();
aResult->length(aMaxId - aMinId + 1);
// aResult->length(aMaxId - aMinId + 1);
for (int i = 0, id = aMinId; id <= aMaxId; id++ )
aResult[i++] = id;
// for (int i = 0, id = aMinId; id <= aMaxId; id++ )
// aResult[i++] = id;
return aResult._retn();
// return aResult._retn();
// PAL12398
return GetElementsId();
}
//=============================================================================