# Extract surface and keep numbering

**URL:** https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590
**Category:** ParaView Support
**Created:** [September 19, 2019, 1:42pm UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590 "2019-09-19T13:42:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![matthieuvitse](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@matthieuvitse](https://discourse.paraview.org/u/matthieuvitse)
#### Post date: [September 19, 2019, 1:42pm UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590/1 "2019-09-19T13:42:43Z")

</div>

Hi there,

from what I’ve seen, _ExtractSurface_ renumbers the vertices of the mesh. I’d like to find a way to keep the initial number of the nodes from the full 3D mesh. It could be by creating blocks (1 with the inner volume, 1 with the outer surface), or just assigning flags to vertices… any idea how to do that in ParaView?

Thanks !

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [September 19, 2019, 5:21pm UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590/2 "2019-09-19T17:21:12Z")

</div>

I believe the easiest solution is for you to create a field that contains the id of each point in the mesh. Then when you run `Extract Surface`, the field of ids will be permuted appropriately. The easiest way to create ids for points (and cells) is to use the `Generate Ids` filter.

So, to run `Extract Surface` while preserving the initial point ids, do the following.

1. Add the `Generate Ids` filter. Apply.
2. Add the `Extract Surface` filter. Apply.

The result of `Extract Surface` will have a point id field containing the original point ids.

---

<div class="post-metadata">

### Author: ![matthieuvitse](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@matthieuvitse](https://discourse.paraview.org/u/matthieuvitse)
#### Post date: [September 19, 2019, 8:26pm UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590/3 "2019-09-19T20:26:23Z")

</div>

Hi Kenneth, this is exactly the kind of things I was looking for, thank you!  
Now i’m trying to access the node coordinates and IDs through Python.

---

<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 19, 2019, 10:16pm UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590/4 "2019-09-19T22:16:20Z")

</div>

Can you explain what you are trying to do with the data ?

---

<div class="post-metadata">

### Author: ![matthieuvitse](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@matthieuvitse](https://discourse.paraview.org/u/matthieuvitse)
#### Post date: [September 20, 2019, 1:50pm UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590/5 "2019-09-20T13:50:49Z")

</div>

Hi Mathieu, sure.

I want to import vtu meshes into Blender. I want to work either with the 3D models I have, or just the extracted surfaces. I do that using the x3d file format which preserves the node numbering, in order to deform the mesh in Blender according to the simulation results. Volumic datasets work OK, but I had trouble extracting the surfaces with the correct node numbering.  
Now I want to pipeline all the different tools into a single script, that’s why I’m trying to access the IDs in ParaView through the Python API.

Does it make more sense now? Cheers.

---

<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 30, 2019, 5:40am UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590/6 "2019-09-30T05:40:58Z")

</div>

If you want to save your data as a specific format, not yet supported by ParaView, and you want to write in python, you should use a python programmable filter.

[https://www.paraview.org/Wiki/Python\_Programmable\_Filter](https://www.paraview.org/Wiki/Python_Programmable_Filter)

---

<div class="post-metadata">

### Author: ![matthieuvitse](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@matthieuvitse](https://discourse.paraview.org/u/matthieuvitse)
#### Post date: [September 30, 2019, 6:13pm UTC](https://discourse.paraview.org/t/extract-surface-and-keep-numbering/2590/7 "2019-09-30T18:13:34Z")

</div>

That sounds like a good way for me to do it, thanks. I need to get more familiar again with the way to access data of objects but that will do the job, thanks !
