# How should the xml file for bezier geometries look like?

**URL:** https://discourse.vtk.org/t/how-should-the-xml-file-for-bezier-geometries-look-like/3235
**Category:** Support
**Created:** [May 7, 2020, 1:57pm UTC](https://discourse.vtk.org/t/how-should-the-xml-file-for-bezier-geometries-look-like/3235 "2020-05-07T13:57:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lijas](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lijas/32/1743_2.png) [@lijas](https://discourse.vtk.org/u/lijas)
#### Post date: [May 7, 2020, 1:57pm UTC](https://discourse.vtk.org/t/how-should-the-xml-file-for-bezier-geometries-look-like/3235/1 "2020-05-07T13:57:30Z")

</div>

Hello

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">
  <Points>
    <DataArray type="Float64" Name="Points" format="binary" NumberOfComponents="3">
        ....
</DataArray>
      </Points>
      <Cells>
        <DataArray type="Int32" Name="connectivity" format="binary" NumberOfComponents="1">
</DataArray>
        <DataArray type="Int32" Name="offsets" format="binary" NumberOfComponents="1">
           ....
</DataArray>
        <DataArray type="UInt8" Name="types" format="binary" NumberOfComponents="1">

</DataArray>

```

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 🙂

Edit:

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

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

```

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)?

---

<div class="post-metadata">

### Author: ![lijas](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lijas/32/1743_2.png) [@lijas](https://discourse.vtk.org/u/lijas)
#### Post date: [May 9, 2020, 11:42am UTC](https://discourse.vtk.org/t/how-should-the-xml-file-for-bezier-geometries-look-like/3235/2 "2020-05-09T11:42:15Z")

</div>

Hello again. I found out that there are test-files at [https://gitlab.kitware.com/vtk/vtk/blob/master/Common/DataModel/Testing/Cxx/TestBezier.cxx](https://gitlab.kitware.com/vtk/vtk/blob/master/Common/DataModel/Testing/Cxx/TestBezier.cxx) 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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [May 11, 2020, 4:33am UTC](https://discourse.vtk.org/t/how-should-the-xml-file-for-bezier-geometries-look-like/3235/3 "2020-05-11T04:33:31Z")

</div>

[VTK\_BEZIER\_CURVE\_quadratic\_quarter\_circle.vtu](https://discourse.vtk.org/uploads/short-url/eYjrMiJ9XfpgZVd0MHTyi6mB4yh.vtu) (4.9 KB) [VTK\_BEZIER\_HEXAHEDRON\_bilinearquadratic\_quarteRingWithSquareSection.vtu](https://discourse.vtk.org/uploads/short-url/oHHXOQ2xAF8KWsoozq9Zxyrh0fJ.vtu) (2.1 KB) [VTK\_BEZIER\_HEXAHEDRON\_triquadratic\_cube.vtu](https://discourse.vtk.org/uploads/short-url/1DDGALpWgKQvoLErfBJjD871zjo.vtu) (1.9 KB) [VTK\_BEZIER\_HEXAHEDRON\_triquartic\_full\_sphere.vtu](https://discourse.vtk.org/uploads/short-url/jOljJsocoZdOEjk7uIoMdgvGTTv.vtu) (12.1 KB) [VTK\_BEZIER\_QUADRILATERAL\_linearquadratic\_quarter\_disk.vtu](https://discourse.vtk.org/uploads/short-url/7Mn97PnG9Y0QEKl6UdTVDhDWhVA.vtu) (1.9 KB) [VTK\_BEZIER\_TETRA\_quadratic.vtu](https://discourse.vtk.org/uploads/short-url/2lbGRSRmbSChmovytLC9gMeMuDD.vtu) (1.7 KB) [VTK\_BEZIER\_TETRA\_quartic\_solidSphereOctant.vtu](https://discourse.vtk.org/uploads/short-url/ap88tzSJUJpsjMjHJcQBDs007ZK.vtu) (2.6 KB) [VTK\_BEZIER\_TRIANGLE\_quadratic\_full\_disk.vtu](https://discourse.vtk.org/uploads/short-url/exnSVqAAf7hiU0402h0nTHdJaqu.vtu) (1.5 KB) [VTK\_BEZIER\_TRIANGLE\_quartic\_sphereOctant.vtu](https://discourse.vtk.org/uploads/short-url/98OJ0ofNnouy4WFfjMl87y7eEto.vtu) (2.1 KB) [VTK\_BEZIER\_WEDGE\_biquadratic\_quarterCylinder.vtu](https://discourse.vtk.org/uploads/short-url/gIOvPeQxPSlv3WSkCF2NkZzAv20.vtu) (1.8 KB) [VTK\_BEZIER\_WEDGE\_quarticLinear\_thickSphereOctant.vtu](https://discourse.vtk.org/uploads/short-url/oJQY1WxpEH0gWjwAzcoq8FJmqyQ.vtu) (3.4 KB)

---

<div class="post-metadata">

### Author: ![lijas](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lijas/32/1743_2.png) [@lijas](https://discourse.vtk.org/u/lijas)
#### Post date: [May 12, 2020, 5:41pm UTC](https://discourse.vtk.org/t/how-should-the-xml-file-for-bezier-geometries-look-like/3235/4 "2020-05-12T17:41:11Z")

</div>

Thank you very much!
