How should the xml file for bezier geometries look like?


In my FE program i want to export some beizer cells so I can visualize them in paraview.
I cant find any documentation on how the cells/points/weights of the bezier cells should exported.

I am completely new to vtk, but in my understanding, the vtk output looks something like this:

    <Piece NumberOfPoints="9" NumberOfCells="4">
    <DataArray type="Float64" Name="Points" format="binary" NumberOfComponents="3">
        <DataArray type="Int32" Name="connectivity" format="binary" NumberOfComponents="1">
        <DataArray type="Int32" Name="offsets" format="binary" NumberOfComponents="1">
        <DataArray type="UInt8" Name="types" format="binary" NumberOfComponents="1">


My question is, what xml-tags do I need in order to export bezier cells?
Also, is it possible to export bezier cells of any order?

Hopefully the question is clear :slight_smile:


By looking at example outputs from regular cells, I was able to get a simple example with bezier quadrilatiral cell to work:

    <DataArray type="Int32" Name="connectivity" Format="ascii">
       0 3 15 12 1 2 11 7 14 13 8 4 5 6 9 10
    <DataArray type="Int32" Name="offsets" Format="ascii">
    <DataArray type="Int32" Name="types" Format="ascii">

So my questions are now:
How do I specify weights for the control points?
How does the reader now what order the quadrilateral will be?
How do I specify anisotropic bezier cell(different order in different directions)?

Hello again. I found out that there are test-files at that generates example .vtu files.

Unfortunately I am not able to compile vtk from source, so I cant run the test myself. Could someone send me the .vtu files that are generated by TestBezier.cxx? It would be greatly appreciated.

VTK_BEZIER_CURVE_quadratic_quarter_circle.vtu (4.9 KB) VTK_BEZIER_HEXAHEDRON_bilinearquadratic_quarteRingWithSquareSection.vtu (2.1 KB) VTK_BEZIER_HEXAHEDRON_triquadratic_cube.vtu (1.9 KB) VTK_BEZIER_HEXAHEDRON_triquartic_full_sphere.vtu (12.1 KB) VTK_BEZIER_QUADRILATERAL_linearquadratic_quarter_disk.vtu (1.9 KB) VTK_BEZIER_TETRA_quadratic.vtu (1.7 KB) VTK_BEZIER_TETRA_quartic_solidSphereOctant.vtu (2.6 KB) VTK_BEZIER_TRIANGLE_quadratic_full_disk.vtu (1.5 KB) VTK_BEZIER_TRIANGLE_quartic_sphereOctant.vtu (2.1 KB) VTK_BEZIER_WEDGE_biquadratic_quarterCylinder.vtu (1.8 KB) VTK_BEZIER_WEDGE_quarticLinear_thickSphereOctant.vtu (3.4 KB)

1 Like

Thank you very much!