Salome HOME
fix PAL12398. Make GetIDs() return IDs of existing elements only
authoreap <eap@opencascade.com>
Fri, 26 May 2006 08:57:02 +0000 (08:57 +0000)
committereap <eap@opencascade.com>
Fri, 26 May 2006 08:57:02 +0000 (08:57 +0000)
src/SMESH_I/SMESH_Mesh_i.cxx

index fc489aa0c4b42ed6289ae80c9cf3cc3144a02480..05d4e06133d1aecdebf8bd91b9552fb0131eee2a 100644 (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();
 }
 
 //=============================================================================