X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_CellLabelActor.cxx;h=44dd993ae7ceed6135ced9174fe4210df1a51f0a;hp=07275df16a8c1f7c110ee7081c3fec488ee01e12;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hpb=16a07c876163e3c993e41db77e9181789b7324b8 diff --git a/src/OBJECT/SMESH_CellLabelActor.cxx b/src/OBJECT/SMESH_CellLabelActor.cxx index 07275df16..44dd993ae 100644 --- a/src/OBJECT/SMESH_CellLabelActor.cxx +++ b/src/OBJECT/SMESH_CellLabelActor.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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 @@ -43,6 +43,7 @@ #include #include #include +#include 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);