# Support for reading tetgen and gmsh mesh file formats

**URL:** <https://community.freefem.org/t/support-for-reading-tetgen-and-gmsh-mesh-file-formats/2308>\
**Category:** General Discussion\
**Created:** [March 3, 2023, 9:10am UTC](https://community.freefem.org/t/support-for-reading-tetgen-and-gmsh-mesh-file-formats/2308 "2023-03-03T09:10:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [March 3, 2023, 9:10am UTC](https://community.freefem.org/t/support-for-reading-tetgen-and-gmsh-mesh-file-formats/2308/1 "2023-03-03T09:10:28Z")

</div>

I used the example file that comes with tetgen saving the mesh as a “.mesh” file which  
is supposed to be a gmsh format but could not get freefem to read it. Importing into  
gmsh and saving as a .msh file failed too but with different errors. It looks like there  
are plugins for gmsh and tetgen in the FF source. Generally what is involved in adding support?  
If it is not too hard I can do it at least for a local copy.

Thanks.

```auto
 FreeFem++ tetgen.edp-- FreeFem++ v4.12 (Sun Jan 22 17:51:12 EST 2023 - git no git)
   file : tetgen.edp
 Load: lg_fem lg_mesh lg_mesh3 eigenvalue 
    1 : load "gmsh"
    2 : load "medit"
    3 : load "tetgen" load: tetgen  

    4 : meshS Th = gmshloadS("tetgen2.mesh"); // Thtotal;
    5 : medit("adsf",Th);
    6 : sizestack + 1024 =1272 ( 248 )

Element of type 3 is not considered in Freefem++

```
