]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Fix the "22335: [CEA 954] Paravis 7.2.0 doesn't read ELNO fields" regression.
authorrnv <rnv@opencascade.com>
Thu, 14 Nov 2013 11:11:53 +0000 (11:11 +0000)
committerrnv <rnv@opencascade.com>
Thu, 14 Nov 2013 11:11:53 +0000 (11:11 +0000)
src/Plugins/MedReader/IO/vtkMedDriver30.cxx

index 42def7945d66001bf12503d30d899d0b1480285a..f9ca12873b429a4b6fdb8f7642cd002aebb5ceaa 100644 (file)
@@ -1111,14 +1111,28 @@ void vtkMedDriver30::ReadFieldStepInformation(vtkMedFieldStep* step, bool readAl
   if(mesh == NULL)
     return;
   
+  //rnv begin: fix the  "22335: [CEA 954] Paravis 7.2.0 doesn't read ELNO fields" regression.
+  //           this piece of code needed for the reading ELNO fields
+  std::set<vtkMedEntity> tmp_entities;
   std::set<vtkMedEntity> entities;
-  mesh->GatherMedEntities(entities);
+  mesh->GatherMedEntities(tmp_entities);
   
-  vtkMedEntity pointEntity;
-  pointEntity.EntityType = MED_NODE;
-  pointEntity.GeometryType = MED_NONE;
-  pointEntity.GeometryName = MED_NAME_BLANK;
-  entities.insert(pointEntity);
+  std::set<vtkMedEntity>::iterator tmp_entity_it = tmp_entities.begin();
+  while(tmp_entity_it != tmp_entities.end())
+    {
+      vtkMedEntity entity = *tmp_entity_it;
+      tmp_entity_it++;
+      entities.insert(entity);
+      if(entity.EntityType == MED_CELL)
+       {
+         vtkMedEntity newEntity;
+         newEntity.EntityType = MED_NODE_ELEMENT;
+         newEntity.GeometryType = entity.GeometryType;
+         newEntity.GeometryName = entity.GeometryName;
+         entities.insert(newEntity);
+       }
+    }  
+  //rnv end
   
   std::set<vtkMedEntity>::iterator entity_it = entities.begin();
   while(entity_it != entities.end())