-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VTK parsing error #172
Comments
It's a bit surprising to me that the legacy output of Paraview does not seem to be supported. Can you upload a VTK file so I can reproduce the issue? I can look into it next week. I could also consider adding support for the XML format, however I don't have any input files I could use for testing at the moment. So it would also be appreciated if you could provide me some files. For now you can consider converting the file with the Python tool |
Thanks for looking into this. I've experimented with meshio earlier, but I couldn't get the files into splashsurf either. The It seems that vtkio supports XML VTU files, so I thought I might only need to change a few lines to create a PR for this feature. I might look into this when I have some time, but I would greatly appreciate if you would add that feature, since I've never worked with Rust before. Here is an example XML file and the exported legacy VTK from ParaView that can't be read by splashsurf. |
Thanks! I'll have a look. |
I enabled loading of VTU files, it was indeed just a few lines. You can try it out by installing splashsurf from this repository using
I'll release a new version soon, but maybe you can already try out if everything works as expected. I guess you also want to interpolate attributes? So maybe you can try if that works correctly with VTU files. Unfortunately, I didn't get the legacy VTK loading to work. It seems like depending on the input file Paraview generates legacy VTK files with a syntax that doesn't match what vtkio expects (similar to elrnv/vtkio#21). I'll try to report this in the issue. |
Thanks a lot for looking into this.
|
Hm, is it possible that the file is partially written or is missing some closing tag for whatever reason? |
Interesting, both were generated by the same code. I'll try to reproduce that with a smaller file that I can send to you. |
fluid_1_91.vtu.zip
It's been generated with the same Julia code (using WriteVTK.jl) as the "source.vtu" file earlier. Edit: Note that neither ParaView nor meshio have any issues with this file. |
It works if I re-export the file as VTU with Paraview and either select to write the data arrays as ASCII, (encoded) binary or appended & encoded. I think the problem is that the XML parser used by vtkio cannot handle the binary encoding in the Maybe you can see if you can set an option in the Julia library to change the encoding for now as a workaround? |
Thanks! Feel free to repost the file. For now, I'll use meshio to convert to legacy XML with the option you gave me earlier. |
I think for the first XML file the binary blob just happened to not include end of file characters or similar so the XML parser library was able to parse it. Maybe this way of storing raw binary data is just not supported by the library. Ok, I'll report this with |
@efaulhaber I just found this page: https://juliavtk.github.io/WriteVTK.jl/stable/grids/syntax/#Data-formatting-options |
Ah, right. I completely forgot about this.
Here's the file: |
I have particle data in XML VTU format. I've tried
.vtk
files,Both yield perfectly fine
.vtk
files that can be opened correctly by ParaView.However, both produce parsing errors when I try to run them through splashsurf:
The text was updated successfully, but these errors were encountered: