# Which XML file format for 3D mesh consisting of rectangular cuboids with variable elevations and sizes?

**URL:** https://discourse.vtk.org/t/which-xml-file-format-for-3d-mesh-consisting-of-rectangular-cuboids-with-variable-elevations-and-sizes/5770
**Category:** Support
**Tags:** file-formats
**Created:** [May 13, 2021, 1:45am UTC](https://discourse.vtk.org/t/which-xml-file-format-for-3d-mesh-consisting-of-rectangular-cuboids-with-variable-elevations-and-sizes/5770 "2021-05-13T01:45:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![datathing](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/e8c25b/32.png) [@datathing](https://discourse.vtk.org/u/datathing)
#### Post date: [May 13, 2021, 1:45am UTC](https://discourse.vtk.org/t/which-xml-file-format-for-3d-mesh-consisting-of-rectangular-cuboids-with-variable-elevations-and-sizes/5770/1 "2021-05-13T01:45:07Z")

</div>

Hi,

I’m trying to use the serial XML file formats to import data into ParaView for visualization. I have followed a [tutorial](https://www.hatarilabs.com/ih-en/enhanced-modflow-result-representation-with-python-vtk-and-paraview) that gets me pretty close to what I want:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/a/a039818f6ac59607e9fffb246bb9d61f464eb1b6.jpeg)

However, the cells in the model mesh are actually rectangular cuboids in the modelling software I’m working with prior to post-processing the data into VTK/Paraview and don’t have the sloping top/bottom faces as shown in the screenshot above. In my modelling software each cell is defined by a top/bottom elevation as well as a length and width, e.g:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/7/714b56ffbb0fbb2cc3524874ee4c4a7aba2eb42f.jpeg)

Which one of the XML file formats would be able to achieve cells that have variable top/bottom elevations, but with no slope on the top/bottom? Would the Unstructured Grid with the cells defined as voxel cell type (#11) be the way to go?  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/4/40d44a1c94a754e29c65dfe796e898b7d67cd067.png)

Or would that not work, or would it be more straightforward to use another file type? I’m currently trying to get the voxel one to work but I’m not making terribly fast progress.

Thanks!

---

<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 14, 2021, 8:20am UTC](https://discourse.vtk.org/t/which-xml-file-format-for-3d-mesh-consisting-of-rectangular-cuboids-with-variable-elevations-and-sizes/5770/2 "2021-05-14T08:20:31Z")

</div>

Explicit Structured Grid should do the job:

> **[Introducing Explicit Structured Grids in VTK and ParaView - Kitware Blog](https://blog.kitware.com/introducing-explicit-structured-grids-in-vtk-and-paraview/)**
>
> Data Structure An explicit structured grid is a new data structure in VTK sharing properties of both structured and unstructured grids. This new dataset is ... Read More

If not, Ustructured Grid.

---

<div class="post-metadata">

### Author: ![datathing](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/e8c25b/32.png) [@datathing](https://discourse.vtk.org/u/datathing)
#### Post date: [May 19, 2021, 5:51pm UTC](https://discourse.vtk.org/t/which-xml-file-format-for-3d-mesh-consisting-of-rectangular-cuboids-with-variable-elevations-and-sizes/5770/3 "2021-05-19T17:51:43Z")

</div>

Thanks! Is there an example of the XML file format for the Explicit Structured Grid? I have tried looking through the documentation but there didn’t seem to be anything for the Explicit Structured Grid.

---

<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 19, 2021, 6:23pm UTC](https://discourse.vtk.org/t/which-xml-file-format-for-3d-mesh-consisting-of-rectangular-cuboids-with-variable-elevations-and-sizes/5770/4 "2021-05-19T18:23:21Z")

</div>

I’m afraid there is not XML file format for ESG yet.

---

<div class="post-metadata">

### Author: ![datathing](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/e8c25b/32.png) [@datathing](https://discourse.vtk.org/u/datathing)
#### Post date: [May 19, 2021, 8:57pm UTC](https://discourse.vtk.org/t/which-xml-file-format-for-3d-mesh-consisting-of-rectangular-cuboids-with-variable-elevations-and-sizes/5770/5 "2021-05-19T20:57:54Z")

</div>

Ah, never mind. I can probably make do with the unstructured grid. Out of interest, what formats does the Explicit Structured Grid require? I’m not sure if I was looking in the wrong place, but I didn’t see anything when I looked.

Thanks!
