Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

Offset arrays no longer supported in VTK 9 when generating an UnstructuredGrid #210

@fbeaudo

Description

@fbeaudo

Description

I currently need to produce an UnstructuredGrid based on data contained in numpy arrays. Because of compatibility issues experienced by some users, I recently upgraded to VTK 9 (and pyvista 0.25.3). After the upgrade, I started getting the following warning when running the code on my laptop:

/home/fbeaudoi/.cache/pypoetry/virtualenvs/device-ksA0Gg98-py3.7/lib/python3.7/site-packages/pyvista/core/pointset.py:610: UserWarning: VTK 9 no longer accepts an offset array
warnings.warn('VTK 9 no longer accepts an offset array')

On my computer, the code still works fine. However, running the same code, a colleague of mine gets the same warning, followed by

Fatal Python error: Segmentation fault

So it seems like we have to find a way to build the UnstructuredGrid without an offset array. However, it is not clear to me how to do so, since I do not see how VTK will be able to identify the start of each cell in the cells array without the offset array. The code I wrote is directly based on the following tutorial from the Pyvista web page (which I checked produces the same error):

https://docs.pyvista.org/examples/00-load/create-unstructured-surface.html

It would be very nice to know how to build an UnstructuredGrid without the offset array; ideally, how could this be done in the tutorial above ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    mesh-creationTopics around creating a PyVista mesh

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions