From 50474c5d65eed235bcf00d297225d2fec7de747b Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 28 Apr 2016 12:03:13 +0200 Subject: [PATCH] INT 64bits porting for MEDWriter. Please do not beat me if it is not OK because I cant test it. Sorry. --- src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx b/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx index 96bd5c5e..d2a2bf45 100644 --- a/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx +++ b/src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx @@ -218,7 +218,10 @@ MEDCouplingUMesh *BuildMeshFromCellArray(vtkCellArray *ca, DataArrayDouble *coor for(int i=0;iinsertNextCell(type,sz,conn); + std::vector conn2(sz); + for(int jj=0;jjinsertNextCell(type,sz,&conn2[0]); conn+=sz; } return subMesh.retn(); @@ -242,7 +245,8 @@ MEDCouplingUMesh *BuildMeshFromCellArrayTriangleStrip(vtkCellArray *ca, DataArra { for(int j=0;jinsertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn); + int conn2[3]; conn2[0]=conn[0] ; conn2[1]=conn[1] ; conn2[2]=conn[2]; + subMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn2); ids->pushBackSilent(i); } } @@ -711,7 +715,12 @@ void ConvertFromUnstructuredGrid(MEDFileData *ret, vtkUnstructuredGrid *ds, cons vtkIdType sz(caPtr[offset]); INTERP_KERNEL::NormalizedCellType ct((INTERP_KERNEL::NormalizedCellType)(*it).second); if(ct!=INTERP_KERNEL::NORM_POLYHED) - m0->insertNextCell(ct,sz,caPtr+offset+1); + { + std::vector conn2(sz); + for(int kk=0;kkinsertNextCell(ct,sz,&conn2[0]); + } else { if(!faces || !faceLoc) -- 2.39.2