# \[SOLVED\] Savemesh to save mesh under binary format

**URL:** <https://community.freefem.org/t/solved-savemesh-to-save-mesh-under-binary-format/693>\
**Category:** General Discussion\
**Created:** [December 16, 2020, 7:13am UTC](https://community.freefem.org/t/solved-savemesh-to-save-mesh-under-binary-format/693 "2020-12-16T07:13:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LucasPa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/lucaspa/32/347_2.png) [@LucasPa](https://community.freefem.org/u/LucasPa)\
**Post date:** [December 16, 2020, 7:13am UTC](https://community.freefem.org/t/solved-savemesh-to-save-mesh-under-binary-format/693/1 "2020-12-16T07:13:26Z")

</div>

Hi,

I attended last week the expert tutorial during the FreeFem Days. As far as I understood, Pierre Jolivet explained that mesh can be saved under a binary format if the following line is put in a script:

`savemesh(Th, myFile.meshb);`

When I do so, FreeFem creates two formatted files : myFile.meshb and myFile.meshb.gmsh. Is there a specific include or load to add in order to actually save the under a binary format.

Regards,

Lucas

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [December 16, 2020, 8:14am UTC](https://community.freefem.org/t/solved-savemesh-to-save-mesh-under-binary-format/693/2 "2020-12-16T08:14:38Z")

</div>

That’s because your are probably saving a 2D mesh, and I explicitly said that the binary format only works for 3D meshes 😃

---

<div class="post-metadata">

**Author:** ![LucasPa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/lucaspa/32/347_2.png) [@LucasPa](https://community.freefem.org/u/LucasPa)\
**Post date:** [December 16, 2020, 8:57am UTC](https://community.freefem.org/t/solved-savemesh-to-save-mesh-under-binary-format/693/3 "2020-12-16T08:57:38Z")

</div>

Ooops, bad bad me I did not listen correctly 🙄

Thanks for your answer (and for the nice tutorial).

Lucas

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [December 16, 2020, 9:00am UTC](https://community.freefem.org/t/solved-savemesh-to-save-mesh-under-binary-format/693/4 "2020-12-16T09:00:42Z")

</div>

No worries 😄 and thank you for the kind and encouraging message.
