# Convert .vtu files to .vtkjs files

**URL:** https://discourse.vtk.org/t/convert-vtu-files-to-vtkjs-files/12583
**Category:** Support
**Tags:** python
**Created:** [October 31, 2023, 7:31am UTC](https://discourse.vtk.org/t/convert-vtu-files-to-vtkjs-files/12583 "2023-10-31T07:31:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![inannan423](https://discourse.vtk.org/user_avatar/discourse.vtk.org/inannan423/32/7918_2.png) [@inannan423](https://discourse.vtk.org/u/inannan423)
#### Post date: [October 31, 2023, 7:31am UTC](https://discourse.vtk.org/t/convert-vtu-files-to-vtkjs-files/12583/1 "2023-10-31T07:31:37Z")

</div>

Hello! I noticed that in ParaView, I can export .vtu files as .vtkjs files. Can I achieve this functionality using the Python API? Thank you very much!

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [October 31, 2023, 7:02pm UTC](https://discourse.vtk.org/t/convert-vtu-files-to-vtkjs-files/12583/2 "2023-10-31T19:02:32Z")

</div>

Yes but when doing so, the data is getting converted into polydata.  
You can use the trace in paraview to get that info.

---

<div class="post-metadata">

### Author: ![inannan423](https://discourse.vtk.org/user_avatar/discourse.vtk.org/inannan423/32/7918_2.png) [@inannan423](https://discourse.vtk.org/u/inannan423)
#### Post date: [November 1, 2023, 2:18am UTC](https://discourse.vtk.org/t/convert-vtu-files-to-vtkjs-files/12583/3 "2023-11-01T02:18:48Z")

</div>

@Sebastien_Jourdain Thank you very much for your response! I have already found the conversion method.

However, I would like to inquire further: My geometric object is composed of a large number of irregular planes. After converting it to polydata, can I still use VTK to perform operations like picking on these planes?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [November 1, 2023, 3:48pm UTC](https://discourse.vtk.org/t/convert-vtu-files-to-vtkjs-files/12583/4 "2023-11-01T15:48:44Z")

</div>

You can do those operations on the external surface of your mesh. Meaning on what you can see in 3D. The rest (3D cells) have been removed.

---

<div class="post-metadata">

### Author: ![inannan423](https://discourse.vtk.org/user_avatar/discourse.vtk.org/inannan423/32/7918_2.png) [@inannan423](https://discourse.vtk.org/u/inannan423)
#### Post date: [November 2, 2023, 2:13am UTC](https://discourse.vtk.org/t/convert-vtu-files-to-vtkjs-files/12583/5 "2023-11-02T02:13:34Z")

</div>

Okay, thank you very much!
