# how can I output the coordinates of the faces of a wireframe?

**URL:** https://discourse.paraview.org/t/how-can-i-output-the-coordinates-of-the-faces-of-a-wireframe/1960
**Category:** ParaView Support
**Tags:** python
**Created:** [May 29, 2019, 9:16pm UTC](https://discourse.paraview.org/t/how-can-i-output-the-coordinates-of-the-faces-of-a-wireframe/1960 "2019-05-29T21:16:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![fabio.romani](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/4bbf92/32.png) [@fabio.romani](https://discourse.paraview.org/u/fabio.romani)
#### Post date: [May 29, 2019, 9:16pm UTC](https://discourse.paraview.org/t/how-can-i-output-the-coordinates-of-the-faces-of-a-wireframe/1960/1 "2019-05-29T21:16:44Z")

</div>

Hi,

I can’t seem to find a way to print the coordinates of each face forming the mesh (wireframe) on my polygon. Is there an easy script to write a text file (or even output on the screen) that does that?  
Thanks

Fabio

---

<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: [June 3, 2019, 12:43pm UTC](https://discourse.paraview.org/t/how-can-i-output-the-coordinates-of-the-faces-of-a-wireframe/1960/2 "2019-06-03T12:43:23Z")

</div>

How do you define the coordinate of a face ?

---

<div class="post-metadata">

### Author: ![fabio.romani](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/4bbf92/32.png) [@fabio.romani](https://discourse.paraview.org/u/fabio.romani)
#### Post date: [June 4, 2019, 3:22pm UTC](https://discourse.paraview.org/t/how-can-i-output-the-coordinates-of-the-faces-of-a-wireframe/1960/3 "2019-06-04T15:22:24Z")

</div>

Hi Mathieu,

The input data is an unstructured grid. I apologize for the little knowledge I have of vtk.

If I visualize the file and use the wireframe view I can see that the mesh is just rectangles of different dimensions (and few triangles that define 45 deg edges of the meshed polygon).

What I need is a way to export the coordinates of all the 4 vertices of all those rectangles in a file (each line represents the 4 coordinates)

Fabio

---

<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: [June 4, 2019, 3:28pm UTC](https://discourse.paraview.org/t/how-can-i-output-the-coordinates-of-the-faces-of-a-wireframe/1960/4 "2019-06-04T15:28:05Z")

</div>

No direct way to do that, but you can do the following :

- Open ParaView
- Open your file, Apply
- Filters -\> Extract Surface -\> Apply
- Create a new view, click on “Spreadsheet View”
- Change Point Data to Cell Data
- Click on “Show cells connectivity”, the id of the points appears
- Click on export spreadsheet, save that as pointIds.csv
- Change Cell Data to Point Data
- Click on export spreadsheet, save that a pointCoord.csv

Now you only need to parse both csv file in order to reconstruct (and duplicate) the vertices coords.

---

<div class="post-metadata">

### Author: ![fabio.romani](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/4bbf92/32.png) [@fabio.romani](https://discourse.paraview.org/u/fabio.romani)
#### Post date: [June 4, 2019, 3:29pm UTC](https://discourse.paraview.org/t/how-can-i-output-the-coordinates-of-the-faces-of-a-wireframe/1960/5 "2019-06-04T15:29:17Z")

</div>

Awesome! Let me give it a try!

Thanks!
