Smesh: Remove the VTK_CELL_ARRAY_V2 compatibility define

This define was introduced in 9.0 for compatiblity with vtk 8.X, and removed for VTK 9.6. As we now support VTK>=9.1, it is not necessary to keep it.
This commit is contained in:
Louis Gombert
2025-11-27 19:45:04 +01:00
committed by Max Wilfinger
parent f5561f23a1
commit c5a14ec998
11 changed files with 7 additions and 128 deletions

View File

@@ -400,14 +400,12 @@ void PropertyPostDataObject::SaveDocFile(Base::Writer& writer) const
xmlWriter->SetInputDataObject(m_dataObject);
xmlWriter->SetFileName(fi.filePath().c_str());
#ifdef VTK_CELL_ARRAY_V2
// Looks like an invalid data object that causes a crash with vtk9
vtkUnstructuredGrid* dataGrid = vtkUnstructuredGrid::SafeDownCast(m_dataObject);
if (dataGrid && (dataGrid->GetPiece() < 0 || dataGrid->GetNumberOfPoints() <= 0)) {
std::cerr << "PropertyPostDataObject::SaveDocFile: ignore empty vtkUnstructuredGrid\n";
return;
}
#endif
}
xmlWriter->SetDataModeToBinary();

View File

@@ -75,11 +75,7 @@
using namespace FemGui;
namespace sp = std::placeholders;
#ifdef VTK_CELL_ARRAY_V2
using vtkIdTypePtr = const vtkIdType*;
#else
using vtkIdTypePtr = vtkIdType*;
#endif
// ----------------------------------------------------------------------------