polyhedral cell

I’ve got this single polyhedral cell, in the ascii vtk file (see image),
Im confused why it says CELLS “2” 38 (when there is just one cell)?
I guess the connectivity data is all 7 faces of the polyhedral cell.
Also is cell type 42 also supported in earlier version of the VTK format?

There was a change to the way VTK legacy files write the information contained in cell arrays. This corresponded with the internal representation of vtkCellArray which was modified to better support random access and threaded computing etc. Previously (file version 4.2 I believe), the legacy writers wrote the number of cells and a connectivity size. Newer versions write the length of the internal offsets array, and the size of the connectivity array. These offsets indicate the beginning and ending of each cell’s connectivity information. It seems you are interpreting this file structure as if it were a version 4.2 file; it is a newer file.

If you are using some sort of VTK legacy writer to write this file, there is a FileVersion data member that can be set etc. If you want more information about the cell array changes and the current internal representation, look at the documentation in vtkCellArray.h.

I was under the impression that there was some documentation explaining these differences, but with a quick look I could not easily find it. Hopefully someone knows where it is; if not this should be better documented.

Hi Will,
thanks for your reply. So in practical terms, does it mean
that the number following “CELLS” is effectively (ncell +1)?

Regards Giles.

Yes