We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Writing an unstructure grid to VTU specifies file version as 0.1, when I think it should be 1.0.
0.1
1.0
To Reproduce
import tempfile from pathlib import Path import meshio print(f"{meshio.__version__=}") print() mesh = meshio.Mesh([[0, 0, 0], [1, 0, 0], [0, 1, 0]], [("triangle", [[0, 1, 2]])]) # Workaround: mesh.write doesn't support a buffer, only a path to a file. with tempfile.TemporaryDirectory() as temp_dir: out_file = Path(temp_dir) / "moo.vtu" mesh.write(out_file, "vtu") print(out_file.read_text())
Gives the output (curtailed for brevity):
meshio.__version__='5.3.5' <?xml version="1.0"?> <VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor"> <!--This file was created by meshio v5.3.5--> <UnstructuredGrid> <Piece NumberOfPoints="3" NumberOfCells="1"> <Points> ...
The problem is that version="0.1" here should, I think, be version="1.0".
version="0.1"
version="1.0"
The unofficial wiki states that the VTKFile attribute is only supported in version 1.0 of the spec. We include this attribute.
VTKFile
In practice, this bug causes incompatibilities with other readers. For example, for reading VTU files in Julia, ReadVTK.jl has an assertion for version being 1.0 or greater.
The text was updated successfully, but these errors were encountered:
I believe this is the section that would need changing:
meshio/src/meshio/vtu/_vtu.py
Lines 647 to 654 in b2ee998
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Writing an unstructure grid to VTU specifies file version as
0.1
, when I think it should be1.0
.To Reproduce
Gives the output (curtailed for brevity):
The problem is that
version="0.1"
here should, I think, beversion="1.0"
.The unofficial wiki states that the
VTKFile
attribute is only supported in version1.0
of the spec. We include this attribute.In practice, this bug causes incompatibilities with other readers. For example, for reading VTU files in Julia, ReadVTK.jl has an assertion for version being 1.0 or greater.
The text was updated successfully, but these errors were encountered: