From 2efe1ce0269737b6c094116cde7a00c8d9927053 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 16 Feb 2009 12:56:08 +0000 Subject: [PATCH] Merging from V5_1_main branch to compile with VTK_5.1.2 on 64 bit platform. --- src/SVTK/SVTK_Actor.cxx | 6 ++++-- src/VTKViewer/VTKViewer_GeometryFilter.cxx | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index 8ccb82a8b..e4fff78a1 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -145,11 +145,13 @@ SVTK_Actor if(int aNbOfParts = theMapIndex.Extent()){ vtkPoints *aPoints = vtkPoints::New(); aPoints->SetNumberOfPoints(aNbOfParts); - for(int i = 0; i < aNbOfParts; i++){ + for(vtkIdType 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 + myUnstructuredGrid->InsertNextCell(VTK_VERTEX,(vtkIdType) 1,&i); } } myUnstructuredGrid->SetPoints(aPoints); diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index 3d6182e96..b3947be8a 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -152,7 +152,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