From: rnv Date: Thu, 14 Nov 2013 11:11:53 +0000 (+0000) Subject: Fix the "22335: [CEA 954] Paravis 7.2.0 doesn't read ELNO fields" regression. X-Git-Tag: V7_3_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cefa2c99112a14c7ea756558c1ef426e575b5b4c;p=modules%2Fparavis.git Fix the "22335: [CEA 954] Paravis 7.2.0 doesn't read ELNO fields" regression. --- diff --git a/src/Plugins/MedReader/IO/vtkMedDriver30.cxx b/src/Plugins/MedReader/IO/vtkMedDriver30.cxx index 42def794..f9ca1287 100644 --- a/src/Plugins/MedReader/IO/vtkMedDriver30.cxx +++ b/src/Plugins/MedReader/IO/vtkMedDriver30.cxx @@ -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 tmp_entities; std::set 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::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::iterator entity_it = entities.begin(); while(entity_it != entities.end())