read updated VTK legacy format
topic flagged on paraview discourse with a wandering title, but the essentials:
With new VTK versions, the internal vtkCellArray changed (see 9338f0b8 for previous changes). As a result of this, the VTK legacy format has also changed.
Previously
POLYGONS (npoly) (nPolys + nConnectivity)
n1 verts1...
n2 verts2...
...
Updated
POLYGONS (npoly) (nConnectivity)
OFFSETS int
0 n1 n1+n2 n1+n2+n3 ...
CONNECTIVITY int
verts1 verts2 ...
Same thing for unstructured etc. We probably don't yet want to update our output routines to generate the new contents (and potentially ruin things for any downstream consumers of the files), but should adjust the readers to accommodate.
Note: cannot tell from any particular VTK spec if the ordering OFFSETS/CONNECTIVITY vs CONNECTIVITY/OFFSETS is prescribed, but the internal vtkCellArray writer routine does output then in OFFSETS/CONNECTIVITY order. So reasonable to start there.
Edited by Mark OLESEN