# Creating 3D VTK and VTU

**URL:** https://discourse.paraview.org/t/creating-3d-vtk-and-vtu/10334
**Category:** ParaView Support
**Created:** [September 15, 2022, 10:30pm UTC](https://discourse.paraview.org/t/creating-3d-vtk-and-vtu/10334 "2022-09-15T22:30:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ABAM](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@ABAM](https://discourse.paraview.org/u/ABAM)
#### Post date: [September 15, 2022, 10:30pm UTC](https://discourse.paraview.org/t/creating-3d-vtk-and-vtu/10334/1 "2022-09-15T22:30:02Z")

</div>

Hi,

I have the following geometric data, and I need to create a VTK file.  
nlay, ncol, nrow, delr, delc, top(layered), bot(layered)

Thanks in advance,

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2022, 2:44am UTC](https://discourse.paraview.org/t/creating-3d-vtk-and-vtu/10334/2 "2022-09-16T02:44:39Z")

</div>

Hi @ABAM ,

I’m afraid you need to provide more information about what you are trying to achieve.

Best,

---

<div class="post-metadata">

### Author: ![ABAM](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@ABAM](https://discourse.paraview.org/u/ABAM)
#### Post date: [September 16, 2022, 5:00am UTC](https://discourse.paraview.org/t/creating-3d-vtk-and-vtu/10334/3 "2022-09-16T05:00:26Z")

</div>

Hi @mwestphal,

I have the following data, and I need to create VTk and VTU file based on the given data in the attached file  
[geometry data.txt](https://discourse.paraview.org/uploads/short-url/1SqNrrMYVtBDO0amEigNdayzeWm.txt) (6.0 KB)

Thanks,

---

<div class="post-metadata">

### Author: ![ABAM](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@ABAM](https://discourse.paraview.org/u/ABAM)
#### Post date: [September 16, 2022, 5:12am UTC](https://discourse.paraview.org/t/creating-3d-vtk-and-vtu/10334/4 "2022-09-16T05:12:05Z")

</div>

@mwestphal

The following is the definition of each abbreviation in the file.

nlay: is the number of layers  
nrow: is the number of rows  
ncol: is the number of columns  
delr: is the column spacing in the row direction.  
delc: is the row spacing in the column direction.  
top: is the top elevation for each cell in the top model layer.  
botm: is the bottom elevation for each cell.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2022, 5:48am UTC](https://discourse.paraview.org/t/creating-3d-vtk-and-vtu/10334/5 "2022-09-16T05:48:51Z")

</div>

This looks like a custom data format, the simplest would be to read it using a programmable source. You can find such an example here:

[https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#reading-a-csv-file](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#reading-a-csv-file)

Of course, you will need to adapt that to you file and needs.
