-// Copyright (C) 2009-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// VTK includes
#include <vtkRenderer.h>
#include <vtkUnstructuredGrid.h>
+#include <vtkUnsignedCharArray.h>
#include <vtkDataSetMapper.h>
#include "vtkCellArray.h"
#include "vtkPolyData.h"
-#include <VTKViewer_CellLocationsArray.h>
+//#include <VTKViewer_CellLocationsArray.h>
#include <SVTK_ViewModel.h>
#include "HEXABLOCKGUI_Trace.hxx"
#include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
#include "HEXABLOCKGUI.hxx"
+#include <QScrollBar>
+
#ifndef M_PI
#define M_PI 3.1415927
#endif
// 0 1 3 2 4 5 7 6
// Insert cells in grid
- VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( aNbCells );
// std::cout << "aNbCells =>" << aNbCells << std::endl;
aConnectivity->InitTraversal();
- for( vtkIdType idType = 0, *pts, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ){
+ vtkIdType const *pts(nullptr);
+ for( vtkIdType idType = 0, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ){
aCellLocationsArray->SetValue( idType, aConnectivity->GetTraversalLocation( npts ) );
}
theGrid->SetCells( aCellTypesArray, aCellLocationsArray,aConnectivity );
// 0 1 3 2 4 5 7 6
// Insert cells in grid
- VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( aNbCells );
// std::cout << "aNbCells =>" << aNbCells << std::endl;
aConnectivity->InitTraversal();
- for( vtkIdType idType = 0, *pts, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ){
+ vtkIdType const *pts(nullptr);
+ for( vtkIdType idType = 0, npts; aConnectivity->GetNextCell( npts, pts ); idType++ ){
aCellLocationsArray->SetValue( idType, aConnectivity->GetTraversalLocation( npts ) );
}
theGrid->SetCells( aCellTypesArray, aCellLocationsArray,aConnectivity );
// viewWindow->SetSelectionMode(VolumeSelection);
// --- elements highlight ---
- TColStd_IndexedMapOfInteger aMap;
- int vtkElemsId;
+ SVTK_TIndexedMapOfVtkId aMap;
+ vtkIdType vtkElemsId;
QString eltEntry;
foreach( const QModelIndex& iElt, elts ){
case VertexNode: viewWindow->SetSelectionMode(NodeSelection); break;
}
- TColStd_MapOfInteger aMap;
- int vtkElemsId;
+ SVTK_TVtkIDsMap aMap;
+ vtkIdType vtkElemsId;
QString eltEntry;
foreach( const QModelIndex& iElt, iElements ){
// Set selection mode in VTK view
viewWindow->SetSelectionMode(EdgeSelection);
- TColStd_MapOfInteger aMap;
- int vtkElemsId;
+ SVTK_TVtkIDsMap aMap;
+ vtkIdType vtkElemsId;
QString edgeEntry;
foreach( const QModelIndex& iEdge, iEdges ){