# Create two structured surfaces and enclosed volume from point clouds

**URL:** https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100
**Category:** ParaView Support
**Created:** [December 20, 2020, 9:32pm UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100 "2020-12-20T21:32:22Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![stonebe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/stonebe/32/5560_2.png) [@stonebe](https://discourse.paraview.org/u/stonebe)
#### Post date: [December 20, 2020, 9:32pm UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100/1 "2020-12-20T21:32:22Z")

</div>

I have two point clouds imported from a CSV file with 4 columns `(k, x, y, z)` representing the topography and an underlying layer in the subsurface. The parameter `k` defines whether a point belongs to the topography (`k=1`) or to the underlying layer (`k=2`). I first want to create structured surfaces of each layer individually. Then I want to create the volume which is enclosed by the two structured surfaces and their edges. Unfortunately, I find neither an introduction publication nor a video which shows how to prepare a CSV file and how to import it into ParaView in order to get two structured surfaces and to calculate the enclosed volume. Is there such a documentation for beginners?

I can’t solve my problem with **Extract Surface** or **Delaunay3D** as suggested for [a similar problem](https://discourse.paraview.org/t/how-to-create-the-surface-of-a-point-cloud-object/1051). From introduction documents I’ve found (e. g. [Public Wiki](https://www.paraview.org/Wiki/ParaView/Data_formats) or other sources like [videos](https://www.youtube.com/watch?v=RVgiIBuwpPQ)) and I can’t derive how to properly write the content of a CSV file in order to define more than 1 cell with the desired topology (i. e. the desired connections between the nodes).

---

<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: [December 21, 2020, 10:43am UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100/2 "2020-12-21T10:43:37Z")

</div>

Use table to structured grid ?

---

<div class="post-metadata">

### Author: ![stonebe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/stonebe/32/5560_2.png) [@stonebe](https://discourse.paraview.org/u/stonebe)
#### Post date: [December 21, 2020, 9:20pm UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100/3 "2020-12-21T21:20:18Z")

</div>

My attempt with `Table to Structured Grid` has not been successful. The meshes were chaotic. I haven’t been able to derive how the nodes have to be written to the CSV file so that a correct grid structure will result. Is there an example how to write a CSV file for a structured grid (preferably with more than 2 nodes in each direction)?

---

<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: [December 22, 2020, 9:41am UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100/4 "2020-12-22T09:41:45Z")

</div>

Here you go:

[testCSV.pvsm](https://discourse.paraview.org/uploads/short-url/qe1OhNn4I25vcnwjspjkF3LQTBz.pvsm) (165.8 KB) [testCSV.csv](https://discourse.paraview.org/uploads/short-url/zDLZSKLMMWeH5zzqtvwxTmcViQg.csv) (2.4 MB)

---

<div class="post-metadata">

### Author: ![stonebe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/stonebe/32/5560_2.png) [@stonebe](https://discourse.paraview.org/u/stonebe)
#### Post date: [December 23, 2020, 10:32am UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100/5 "2020-12-23T10:32:16Z")

</div>

Thank you. The example is applicable as it is. Unfortunately, I can’t derive from the example CSV file how its content is ordered in rows. This I’d like to know so I understand the basics of how to organize the content of a CSV file for import into ParaView.

---

<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: [December 23, 2020, 3:33pm UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100/6 "2020-12-23T15:33:24Z")

</div>

> <https://stackoverflow.com/questions/29719796/how-to-converting-by-using-table-to-structed-grid-on-paraview>

---

<div class="post-metadata">

### Author: ![stonebe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/stonebe/32/5560_2.png) [@stonebe](https://discourse.paraview.org/u/stonebe)
#### Post date: [December 23, 2020, 4:01pm UTC](https://discourse.paraview.org/t/create-two-structured-surfaces-and-enclosed-volume-from-point-clouds/6100/7 "2020-12-23T16:01:18Z")

</div>

I now understand. There are two mistakes in my CSV file:

1. The spacing is regular in each direction, however differs for each direction: dx = 2, dy = 1.
2. Not all nodes were given in the CSV file - only the ones with a z-value not NULL.

The stackoverflow-solution explains how to deal with the CSV file.
