vtkAbstractArray::Resize behaviour

The vtkAbstractArray::Resize() method states:

So indeed, when I resize an array I get

So what should I do if I have an array with existing data which I want to preserve, but create additional space beyond it. After resizing I want GetNumberOfTuples() to return the number to which I have resized the array. So would

be the correct way to achieve this?

You’re correct. You need to call Resize before calling SetNumberOfTuples.

Thanks!