meshio icon indicating copy to clipboard operation
meshio copied to clipboard

[BUG] vtk load error on 5.3.0

Open tomfrankkirk opened this issue 3 years ago • 1 comments

Cannot load a vtk triangle surface using version 5.3.0. I was using version 4.4.6 before and it works just fine, now on version 5.3.0 the same VTK file causes a crash (the vtk version is the same in both cases). The error is as follows image

I was unable to get a pdb call in there to inspect the stack at the time of the crash because of the sys.exit(1) call!

Versions: macOS 12.1. python 3.8.12 vtk 9.1.0

Minimal example: VTK file: T1_first-L_Caud_first.vtk.zip

pip freeze | grep meshio: meshio @ file:///home/conda/feedstock_root/build_artifacts/meshio_1643072227861/work

Thanks in anticipation.

tomfrankkirk avatar Jan 25 '22 16:01 tomfrankkirk

I have since been able to load the mesh directly in vtk using the following code, so I am confident that the vtk library itself is working.

                reader = vtk.vtkGenericDataObjectReader()
                reader.SetFileName(path)
                reader.Update()

                ps = np.array(reader.GetOutput().GetPoints().GetData())
                ts = np.array(reader.GetOutput().GetPolys().GetData())

tomfrankkirk avatar Jan 25 '22 16:01 tomfrankkirk