Skip to content

Fix io xml htg writer and reader v2

This is a retry of !10042 (closed).

Fix a reading fault on vector fields in IO XML HyperTreeGrid Reader, version 2.

The ReadArrayValues ​​method reads the values ​​of an array based on the offsets on the values, with the caller taking into account the number of components specific to each array (which was not done here, hence the bug).

Instead of modifying the call to this method, a new ReadArrayTuples method will be called. It automatically takes into account the number of components in the array in order to be called elsewhere (pooling).

  • add ReadArrayTuples in IO/XML/vtkXMLReader
  • use ReadArrayTuples in IO/XML/vtkXMLHyperTreeGridReader.cxx

@charles.gueunet @mwestphal

I think we could gain readability by replacing the other calls to ReadArrayValues ​​by ReadArrayTuples (be careful to remove the caller's consideration of the number of line components 644 and 851)

Additional changes:

  • Fix xml htg writer with an additional data array (e.g with a calculator)
  • Add a new htg IO test with a calculator

Fixes paraview/paraview#21710 and paraview/paraview#21711

Edited by Timothée Couble

Merge request reports