Salome HOME
updated copyright message
[modules/gui.git] / src / VTKViewer / VTKViewer_ExtractUnstructuredGrid.cxx
index 46fed3a1b31382e998f37952ada38a863f9ed2ee..e3860530717649b1cc06f80fa535248a8bdc7ebe 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -24,7 +24,7 @@
 // Author:  Alexey PETROV
 
 #include "VTKViewer_ExtractUnstructuredGrid.h"
-#include "VTKViewer_CellLocationsArray.h"
+//#include "VTKViewer_CellLocationsArray.h"
 
 #include <vtkUnsignedCharArray.h>
 #include <vtkUnstructuredGrid.h>
@@ -47,7 +47,7 @@
 
 #define VTK_XVERSION (VTK_MAJOR_VERSION*10000+VTK_MINOR_VERSION*100+VTK_BUILD_VERSION)
 
-vtkStandardNewMacro(VTKViewer_ExtractUnstructuredGrid);
+vtkStandardNewMacro(VTKViewer_ExtractUnstructuredGrid)
 
 
 VTKViewer_ExtractUnstructuredGrid::VTKViewer_ExtractUnstructuredGrid():
@@ -81,12 +81,12 @@ void VTKViewer_ExtractUnstructuredGrid::SetStoreMapping(int theStoreMapping)
   }
 }
 
-vtkIdType VTKViewer_ExtractUnstructuredGrid::GetInputId(int theOutId) const
+vtkIdType VTKViewer_ExtractUnstructuredGrid::GetInputId(vtkIdType theOutId) const
 {
   if ( myPassAll || ( myCellIds.empty() && myCellTypes.empty() ))
     return theOutId;
 
-  if ( theOutId<0 || theOutId >= (int)myOut2InId.size() )
+  if ( theOutId < 0 || theOutId >= (vtkIdType) myOut2InId.size() )
     return -1;
   return myOut2InId[theOutId];
 }
@@ -281,15 +281,15 @@ void VTKViewer_ExtractUnstructuredGrid::BuildOut2InMap()
 // }
 
 
-inline int InsertCell(vtkUnstructuredGrid *theInput,
+inline vtkIdType InsertCell(vtkUnstructuredGrid *theInput,
                       vtkCellArray *theConnectivity,
                       vtkUnsignedCharArray* theCellTypesArray,
                       vtkIdTypeArray*& theFaces,
                       vtkIdTypeArray*& theFaceLocations,
                       vtkIdType theCellId,
-                      vtkIdList *theIdList,
+                      vtkIdList* /*theIdList*/,
                       bool theStoreMapping,
-                      vtkIdType theOutId,
+                      vtkIdType /*theOutId*/,
                       VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId/*,
                       VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId*/)
 {
@@ -346,7 +346,7 @@ inline void InsertPointCell(vtkCellArray *theConnectivity,
                             vtkIdType theCellId,
                             vtkIdList *theIdList,
                             bool theStoreMapping,
-                            vtkIdType theOutId
+                            vtkIdType /*theOutId*/
                             VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId/*,
                             VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId*/)
 {
@@ -390,13 +390,13 @@ int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(re
       cellTypesVec[ *type ] = *type;
   }
 
-/*  if(MYDEBUG){
+/*  
     MESSAGE("Execute - anInput->GetNumberOfCells() = "<<anInput->GetNumberOfCells());
     MESSAGE("Execute - myCellTypes.size() = "<<myCellTypes.size());
     MESSAGE("Execute - myCellIds.size() = "<<myCellIds.size());
     MESSAGE("Execute - myExtractionMode = "<<myExtractionMode);
     MESSAGE("Execute - myChangeMode = "<<myChangeMode);
-  }*/
+*/
   vtkIdType aNbElems = 0;
   if(myExtractionMode == eCells)
   {
@@ -490,7 +490,7 @@ int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(re
         }
       }
       if ( vtkIdType newNbElems = aConnectivity->GetNumberOfCells() ) {
-        VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
+        vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
         aCellLocationsArray->SetNumberOfComponents(1);
         aCellLocationsArray->SetNumberOfTuples(newNbElems);
         aConnectivity->InitTraversal();
@@ -592,7 +592,7 @@ int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(re
       }
     }
     if (vtkIdType newNbElems = aConnectivity->GetNumberOfCells() ) {
-      VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
+      vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
       aCellLocationsArray->SetNumberOfComponents(1);
       aCellLocationsArray->SetNumberOfTuples( newNbElems );
       aConnectivity->InitTraversal();
@@ -618,12 +618,12 @@ int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(re
     myPassAll = true;
     TVectorId().swap( myOut2InId );
   }
-/*  if(MYDEBUG){
+/*
     MESSAGE("Execute - anOutput->GetNumberOfCells() = "<<anOutput->GetNumberOfCells());
     if(myStoreMapping){
       MESSAGE("Execute - myOut2InId.size() = "<<myOut2InId.size());
       MESSAGE("Execute - myIn2OutId.size() = "<<myIn2OutId.size());
     }
-  }*/
+*/
   return 1;
 }