Extract PointData from d3plot files


I would like to understand the correct method for extracting LSDyna results from our d3plot files and adapting them for a web application.
Specifically, we are attempting to extract PointData and create VTK objects to display in our Dash app.
Currently, we have successfully extracted the FieldsContainer, but we are uncertain about how to correctly extract the data.
The provided code represents our best attempt.
We believe that we have successfully extracted the correct PointData, but unfortunately, the data seems to be in the wrong order.
It appears as though all the PointData is misordered, leading to wronged colors in the visual when we attempt to recreate it.

ds = dpf.DataSources()
ds.set_result_file_path(resultFilePath, "d3plot")
model = dpf.Model(ds)
metadata = model.metadata

opVM = dpf.operators.result.stress_von_mises()
vm_fields_container = opVM.outputs.fields_container()

# We believe that this extracts the good data, but it is definitly not in the good order
GOOD_PT_DATA_NOT_WELL_ORDERED = vm_fields_container[21].data[field._data_pointer_as_list]

My questions are:

  • Where and how can I properly extract the PointData from a Field object?
  • Is there an easier way to create objects for our Dash application?
  • Is there a way to directly create HTML elements from our FieldsContainer?

Our best solution so far is creating a VTK file for each frame and then extracting the PointData.
Is there a better solution?

vtkExporter = dpf.operators.serialization.vtk_export()

However, this approach requires too much space, as we would need to generate over 100 files in our case.

Thank you very much!