From 6bc3c1759ea7faf08f96c52ddb76342800e697a0 Mon Sep 17 00:00:00 2001 From: mkr Date: Tue, 9 Dec 2008 13:51:27 +0000 Subject: [PATCH] Avoid compilation errors with VTK from ParaView-3.4.0 compiled with VTK_USE_64BIT_IDS = ON on 64-bit DebianEtch platform. --- src/SVTK/SVTK_Actor.cxx | 6 +++++- src/VTKViewer/VTKViewer_GeometryFilter.cxx | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index fa1fe5494..11eab7646 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -147,11 +147,15 @@ SVTK_Actor if(int aNbOfParts = theMapIndex.Extent()){ vtkPoints *aPoints = vtkPoints::New(); aPoints->SetNumberOfPoints(aNbOfParts); + vtkIdType iIdT; for(int i = 0; i < aNbOfParts; i++){ int aPartId = theMapIndex( i+1 ); if(vtkFloatingPointType* aCoord = theMapActor->GetNodeCoord(aPartId)){ aPoints->SetPoint(i,aCoord); - myUnstructuredGrid->InsertNextCell(VTK_VERTEX,1,&i); + // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK + // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON + iIdT = i; + myUnstructuredGrid->InsertNextCell(VTK_VERTEX,1,&iIdT); } } myUnstructuredGrid->SetPoints(aPoints); diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index 8cc01874d..08fa404a3 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -151,7 +151,10 @@ VTKViewer_GeometryFilter vtkIdType newCellId; int faceId, *faceVerts, numFacePts; vtkFloatingPointType *x; - int PixelConvert[4], aNewPts[VTK_CELL_SIZE]; + int PixelConvert[4]; + // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK + // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON + vtkIdType aNewPts[VTK_CELL_SIZE]; // ghost cell stuff unsigned char updateLevel = (unsigned char)(output->GetUpdateGhostLevel()); unsigned char *cellGhostLevels = 0; -- 2.39.2