# Problem in reading gmsh file

**URL:** <https://community.freefem.org/t/problem-in-reading-gmsh-file/1809>\
**Category:** General Discussion\
**Created:** [June 15, 2022, 7:24am UTC](https://community.freefem.org/t/problem-in-reading-gmsh-file/1809 "2022-06-15T07:24:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zese](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/zese/32/917_2.png) [@zese](https://community.freefem.org/u/zese)\
**Post date:** [June 15, 2022, 7:24am UTC](https://community.freefem.org/t/problem-in-reading-gmsh-file/1809/1 "2022-06-15T07:24:54Z")

</div>

Dear all,

I want to import gmsh mesh file to the freefem++ but the boundaries labels are not recognized when I read the file. the attached you can find the \*.geo and \*.msh file as a text . I don’t understand what the problem is.

[airfoil.zip](https://community.freefem.org/uploads/short-url/cRojORcWCXnEfGM2yuBHY5ogTDH.zip) (7.6 MB)

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [June 15, 2022, 12:34pm UTC](https://community.freefem.org/t/problem-in-reading-gmsh-file/1809/2 "2022-06-15T12:34:25Z")

</div>

The problem is in the definition of geo file, not in freefem++.  
I am not a spécialisé in gmsh, but first you can try on a small carre to understand the problem.

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [June 17, 2022, 11:14am UTC](https://community.freefem.org/t/problem-in-reading-gmsh-file/1809/3 "2022-06-17T11:14:25Z")

</div>

I do not have much experience with GMSH + FreeFem. However, I noticed when importing a 3D mesh that FreeFem can only access the regular “Plane Surface” labels, not the “Physical Surface” labels.

I think you should use the following script

```auto
load "gmsh"
mesh th=gmshload("airfoil.msh");

cout << labels(th) << endl;

```

an cross-check the labels between the GMSH ID numbers and the FreeFem script.
