From: Anthony Geay Date: Tue, 14 Feb 2017 09:52:11 +0000 (+0100) Subject: Generalization of meshes without cells but only nodes X-Git-Tag: SHAPER_2.7.0~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4d49d57d0982b36816f120eaa8bd46233e14a726;p=modules%2Fparavis.git Generalization of meshes without cells but only nodes --- diff --git a/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx b/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx index 7adc0d57..69e1cba9 100644 --- a/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx +++ b/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx @@ -495,7 +495,14 @@ void AddNodeFields(MEDFileData *mfd, vtkDataSetAttributes *dsa) MEDFileUMesh *mmu(dynamic_cast(mm)); if(!mmu) throw MZCException("AddNodeFields : internal error 2 !"); - MCAuto mesh(mmu->getMeshAtLevel(0)); + MCAuto mesh; + if(!mmu->getNonEmptyLevels().empty()) + mesh=mmu->getMeshAtLevel(0); + else + { + mesh=MEDCouplingUMesh::Build0DMeshFromCoords(mmu->getCoords()); + mesh->setName(mmu->getName()); + } int nba(dsa->GetNumberOfArrays()); for(int i=0;igetMaxValue(dummy)); MCAuto levs(lev->getDifferentValues()); std::vector< MicroField > ms; vtkIdTypeArray *faces(ds->GetFaces()),*faceLoc(ds->GetFaceLocations());