Salome HOME
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git] / src / OBJECT / SMESH_CellLabelActor.cxx
index 1371d344b4492a370c0c9fe7c096028675a1428d..eb66cf18f7c5100d40f12dcb3be0791c87f4fb28 100644 (file)
@@ -43,6 +43,7 @@
 #include <vtkRenderer.h>
 #include <vtkUnstructuredGrid.h>
 #include <vtkCellData.h>
+#include <iostream>
 
 vtkStandardNewMacro(SMESH_CellLabelActor)
 
@@ -70,7 +71,7 @@ SMESH_CellLabelActor::SMESH_CellLabelActor()
   myClsLabeledDataMapper = vtkLabeledDataMapper::New();
   myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort());
 
-  myClsLabeledDataMapper->SetLabelFormat("%d");
+  //myClsLabeledDataMapper->SetLabelFormat("%d");
   myClsLabeledDataMapper->SetLabelModeToLabelScalars();
 
   myClsTextProp = vtkTextProperty::New();
@@ -156,18 +157,18 @@ void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled)
   {
     myCellsNumDataSet->ShallowCopy(aGrid);
     vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
-    int aNbElem = aDataSet->GetNumberOfCells();
-    vtkIntArray *anArray = vtkIntArray::New();
+    vtkIdType aNbElem = aDataSet->GetNumberOfCells();
+    vtkIdTypeArray *anArray = vtkIdTypeArray::New();
     anArray->SetNumberOfValues(aNbElem);
     myExtractUnstructuredGrid->BuildOut2InMap();
-    for(int anId = 0; anId < aNbElem; anId++)
+    for(vtkIdType anId = 0; anId < aNbElem; anId++)
     {
       vtkIdType id = anId;
       if(IsImplicitFunctionUsed())
         id = myExtractGeometry->GetElemObjId(id);
       id = myExtractUnstructuredGrid->GetInputId(id);
       id = (id >=0) ? id : anId;
-      int aSMDSId = myVisualObj->GetElemObjId(id);
+      vtkIdType aSMDSId = myVisualObj->GetElemObjId(id);
       anArray->SetValue(anId,aSMDSId);
     }
     aDataSet->GetCellData()->SetScalars(anArray);