]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Avoid compilation errors with VTK from ParaView-3.4.0 compiled with VTK_USE_64BIT_IDS...
authormkr <mkr@opencascade.com>
Tue, 9 Dec 2008 13:51:27 +0000 (13:51 +0000)
committermkr <mkr@opencascade.com>
Tue, 9 Dec 2008 13:51:27 +0000 (13:51 +0000)
src/SVTK/SVTK_Actor.cxx
src/VTKViewer/VTKViewer_GeometryFilter.cxx

index fa1fe549414d83c0bbc89f6e225ba41ced514581..11eab76466cc570905dcb30621fd48699d525036 100644 (file)
@@ -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);
index 8cc01874da90b4faa92f0e77ac360375ded4bbeb..08fa404a3e4b00bec4e731d3ff35cd86bcec0f80 100755 (executable)
@@ -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;