-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
vtp support attempt #1181
base: main
Are you sure you want to change the base?
vtp support attempt #1181
Conversation
810d822
to
f76d0d0
Compare
I have done some ad hoc testing and was able to read a .vtp file with only triangle strips and get out a .vtu that looks correct. I will need to read the development guide about adding tests and getting everything else up to snuff, but currently content with progress made. |
Found my logic mistakes in the reader and wrong indentation in the writer. |
adding simple tests, need to rethink the polys section. should I read the polys section and then separate them into triangles, quads, and polygons? |
875096f
to
0dbb761
Compare
the current implementation merges triangles, quads, and polygons into polygons on write. Currently meshio doesn't support triangle strips, and I am not sure there is a reason to do so. this means that on read triangle strips get converted to triangles, which become polygons on write to vtp. This means that any cell dell data from triangle strips gets duplicated for the decomposed triangle strips. |
I forgot to commit the test files. they made need a little tweaking as I simply used the vtu files and applied the extract surface mesh in paraview and exported the vtp files. they all have uint64 headers, so |
@nschloe Would it make more sense to derive a new package that contains format extensions rather than include it in meshio? does anyone have any thoughts or feedback on this effort? |
meshio has support for polygons, so I'd say it makes sense to have it in meshio. |
Thank you for the input. tests appear to be passing now. More tests might be good and/or making better binary files tests. Currently I have the reader generating a warning when it finds strips, not sure if that is what makes sense, but certainly better than silence. |
What are the codecov checks checking? |
Coverage |
Can you attach the test files here so I can download them, please? |
Apologies for taking so long to respond. |
@nschloe any feedback on this? |
Sorry, too much work right now. |
Thank you for the update. A kofi is coming your way as soon as I remember how to do it. |
b427eab
to
e51fbcd
Compare
I rebased, squashed, and included some matching changes from the vtu reader/writer. tests passed locally for me. |
@nschloe would mind running the workflow to see if it passes? |
b7796f8
to
92f3f9d
Compare
Starting from the vtu implementation worked through adding vtp support. Currently meshio doesn't support triangle strips, and not clear reason to do so. This means that on read triangle strips get converted to triangles, which become polygons on write to vtp. Merges triangles, quads, and polygons into polygons on write. The read process specifies the cell types into the same triangles, quads, and polygons. Cell dell data from triangle strips gets duplicated for the decomposed triangle strips. Rebase/squashed from original draft Resolve nschloe#527 fix: add tests for triangle strip reading chore: format
I added more tests to bump up the code coverage. |
Hey not sure if this is a welcome bump but I was just wondering what the status of a possible VTP writer. I'm using VTK in Anaconda and the AVS-UCD read function is broken right now AFAIK so I'd like to switch to this but need VTP. I know python and have LOTS of UCD, VTK, and VTP files to test things with, so if I can help, maybe throw me a bone or I'll try to see how I can help when I get a bit more free time next week? |
Starting from the vtu implementation I am working through adding vtp support.
Current status: WIP starting with reading, currently I am arbitrarily add the cell types that mimics the vtu description, but does not yet handle the triangle strips.
Suggestions or things to make it better are welcome.
hopefully can resolve #527