Closed m1ka05 closed 8 months ago
Hi, thank you for catching this! I will fix the test, and maybe add your second example as an additional test (unless you want to do it yourself in a PR!). It may also be worth it to provide a simpler way of setting these kinds of attributes.
There's a slightly simpler way of setting an attribute to "PointData" and "CellData" elements. It is not very well documented, but it's mentioned at the very end of this section in the docs (and also here). Basically, your fix can be written as:
outfiles = vtk_grid(VTK_BASENAME, points, cells; vtkversion = v"1.0") do vtk
vtk["RationalWeights"] = rational_weights
# fix
vtk[VTKPointData()] = "RationalWeights" => "RationalWeights"
end
Thanks, I've missed that line in the documentation, great! I'll open a PR with the tests later today so you can link it with this issue.
Hi, I've been experimenting with Bézier cells and found that the rational weights and higher order degrees are not correctly exported. At least Paraview v5.11.2 using VTK v9.2.20220823 does not pick them up.
I attach two screenshots of the tetra quartic solid sphere octant test from
bezier.jl
with and without correct attribute definition. The following fixes the test:Here is also a single cell quarter annulus PoC with anisotropic degrees:
Fixed tetra quartic solid sphere octant
Broken tetra quartic solid sphere octant
Quarter annulus