# ParaView: How to import into ParaView a csv-file exported from ParaView (reverse procedure of "Save Data")

**URL:** https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711
**Category:** ParaView Support
**Created:** [December 28, 2021, 11:06pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711 "2021-12-28T23:06:22Z")
**Posts on this page:** 8
**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 28, 2021, 11:06pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/1 "2021-12-28T23:06:22Z")

</div>

My attempt is to import **cylinder geometries** for boreholes. Unfortunately, I have not found a guideline how to do this. Therefore, I have created a cylinder within ParaView and exported the cylinder with _File_ \> _Save Data…_. I now have a file with the header line _Normals:0, Normals:1, Normals:2, TCoords:0, TCoords:1, Points:0, Points:1, Points:2_ and data underneath it. I’m not able to read the data although I have the origin cylinder in ParaView. Is there a guideline which explains this format so I can create own files to import other cylinders which should represent boreholes?

---

<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 29, 2021, 12:11pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/2 "2021-12-29T12:11:43Z")

</div>

Sounds like boolean operations, see this:

> [@Boolean Operations](https://discourse.paraview.org/t/boolean-operations/1498):
>
> I’m looking for a way to do boolean operations between two STLs in Paraview. Unions, Differences, etc… This is unfortunately for a compute environment that doesn’t have Meshlab, Blender, etc…, but it DOES have Paraview. I’ve looked around and it seems that there’s not a way to do this directly, but maybe it can be done with a script? Does anybody have experience with this? Thanks. -David O.

> [@Add boolean operations filters](https://discourse.paraview.org/t/add-boolean-operations-filters/7040):
>
> From a user voice [request](https://paraview.uservoice.com/forums/11350-general/suggestions/1955847-boolean-operations) add boolean operations between several meshes. Not only append, but really intersection, union, difference. Related : [Boolean Operations - #9 by RR84](https://discourse.paraview.org/t/boolean-operations/1498/9)

---

<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 29, 2021, 2:03pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/3 "2021-12-29T14:03:35Z")

</div>

Unfortunately, I can’t figure out what the boolean filter has to do with my problem. The boolean filter sounds more for intersection, union etc. However, I just want to understand how to prepare data, e.g. in a csv-file, to import into ParaView. The example given in my question would be a good start: is there a description which explains the csv-file produced from a cylinder by _Export data …_?

---

<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 29, 2021, 2:09pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/4 "2021-12-29T14:09:23Z")

</div>

Not sure what you mean. a .csv is only a table, how can a cylinder be represented by a .csv file ?

---

<div class="post-metadata">

### Author: ![pavel](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pavel/32/8287_2.png) [@pavel](https://discourse.paraview.org/u/pavel)
#### Post date: [December 29, 2021, 2:38pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/5 "2021-12-29T14:38:22Z")

</div>

Hi Brian,

In case you know boreholes geometry, you can use Sources-\>Programmable Source to create boreholes according your geometry. Here is a simple example of how to add some polygons to represent a small part of a cylinder (figure attached):

```auto
pdo = self.GetPolyDataOutput()

points = vtk.vtkPoints()
points.InsertPoint(0, 0.0,0.0,0.0)
points.InsertPoint(1, 0.0,1.0,0.0)
points.InsertPoint(2, 1.0,1.0,0.0)
points.InsertPoint(3, 1.0,0.0,0.0)
points.InsertPoint(4, 1.5,1.0,0.67)
points.InsertPoint(5, 1.5,0.0,0.67)

quad1 = vtk.vtkQuad()
quad1.GetPointIds().SetId(0,0)
quad1.GetPointIds().SetId(1,1)
quad1.GetPointIds().SetId(2,2)
quad1.GetPointIds().SetId(3,3)

quad2 = vtk.vtkQuad()
quad2.GetPointIds().SetId(0,3)
quad2.GetPointIds().SetId(1,2)
quad2.GetPointIds().SetId(2,4)
quad2.GetPointIds().SetId(3,5)

cells = vtk.vtkCellArray()
cells.InsertNextCell(quad1)
cells.InsertNextCell(quad2)

pdo.SetPoints(points)
pdo.SetPolys(cells)

```

 ![part_of_the_cylinder](https://discourse.paraview.org/uploads/default/original/2X/4/434a1f89bcd99f58bc6d9417efe1175b929ee97c.png)

If you have cylinder geometry somewhere in file, you can write a Python code which will be able to get points and vertices from your file and add them to PV similarly to example above.

If I do not understand you, please clarify what do you have and what do you want to do. Thanks.

Best Regards,  
Pavel

---

<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 29, 2021, 10:29pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/6 "2021-12-29T22:29:07Z")

</div>

@Pavel: That’s a very fine suggestion. I managed to draw boreholes with this technique.

---

<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 29, 2021, 10:34pm UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/7 "2021-12-29T22:34:54Z")

</div>

Please have a look at the uploaded image: the csv-file (4) results from _File_ \> _Save Data …_ from a cylinder. By this the content of the csv-file actually should represent the cylinder. I thought I could import this csv-file into ParaView to create a cylinder (actually the reverse process of _Save Data …_). This csv-file could serve as a template how to create a cylinder by importing a csv-file into ParaView. However, I can’t interpret the content and don’t know how to use this csv-file. Is there a guideline how to interpret the content of this csv-file?

 ![thecylinder](https://discourse.paraview.org/uploads/default/original/2X/f/ff4a0ca89788719bad0211dab9a9800d7d1b709f.png)

---

<div class="post-metadata">

### Author: ![pavel](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pavel/32/8287_2.png) [@pavel](https://discourse.paraview.org/u/pavel)
#### Post date: [December 30, 2021, 5:34am UTC](https://discourse.paraview.org/t/paraview-how-to-import-into-paraview-a-csv-file-exported-from-paraview-reverse-procedure-of-save-data/8711/8 "2021-12-30T05:34:20Z")

</div>

Ok, thanks. Please give some time to suggest a solution for your case.
