# GMSH

**URL:** https://discourse.vtk.org/t/gmsh/3593
**Category:** Support
**Tags:** file-formats
**Created:** [June 19, 2020, 7:34am UTC](https://discourse.vtk.org/t/gmsh/3593 "2020-06-19T07:34:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rdbrn](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rdbrn/32/5627_2.png) [@rdbrn](https://discourse.vtk.org/u/rdbrn)
#### Post date: [June 19, 2020, 7:34am UTC](https://discourse.vtk.org/t/gmsh/3593/1 "2020-06-19T07:34:30Z")

</div>

Is there a way to import [gmsh](https://gmsh.info/) files into vtk?

I did find a [gmsh reader in the paraview repo](https://gitlab.kitware.com/paraview/paraview/blob/e012debf44927cd5a312797c3156caa4cc2ed67a/Plugins/GmshReader/vtkGmshReader.cxx) but there does not seem to be such a thing as vtkGmshReader in vtk.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [June 19, 2020, 7:58am UTC](https://discourse.vtk.org/t/gmsh/3593/2 "2020-06-19T07:58:30Z")

</div>

Yes, that would require to integrate GMSH into VTK which is not planned atm.

However, you can recover the module inside the GMSH plugin in ParaView and modify it slightly o make it build against VTK, you should then be able to read GMSH files.

---

<div class="post-metadata">

### Author: ![rdbrn](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rdbrn/32/5627_2.png) [@rdbrn](https://discourse.vtk.org/u/rdbrn)
#### Post date: [July 2, 2020, 6:54am UTC](https://discourse.vtk.org/t/gmsh/3593/3 "2020-07-02T06:54:43Z")

</div>

thanks @mwestphal.  
As work around I will use the .stl export of gmsh and then import that into vtk.

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)
#### Post date: [December 22, 2021, 9:15pm UTC](https://discourse.vtk.org/t/gmsh/3593/4 "2021-12-22T21:15:34Z")

</div>

@rdbrn did you ever try moving the ParaView class to VTK? I ask because I’m interested in gmsh too.

There’s also this ticket: [https://gitlab.kitware.com/vtk/vtk/-/issues/12674](https://gitlab.kitware.com/vtk/vtk/-/issues/12674)

---

<div class="post-metadata">

### Author: ![Timothee\_Chabat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/timothee_chabat/32/3234_2.png) [@Timothee\_Chabat](https://discourse.vtk.org/u/Timothee_Chabat)
#### Post date: [December 23, 2021, 1:25pm UTC](https://discourse.vtk.org/t/gmsh/3593/5 "2021-12-23T13:25:38Z")

</div>

FYI the GmshReader linked in the first comment is not really maintained anymore and does not rely on the official Gmsh API so it may not even work with recent GMSH files.  
However you can take a look at the more recent GmshIO plugin [https://gitlab.kitware.com/paraview/paraview/-/tree/master/Plugins/GmshIO](https://gitlab.kitware.com/paraview/paraview/-/tree/master/Plugins/GmshIO). It is  
based on Gmsh 4.7 and solely depends on VTK so moving it should be trivial (ignoring the Gmsh dependency).
