[Gmsh] export in binary format

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Aug 1 18:33:37 CEST 2017


> On 1 Aug 2017, at 15:19, Benoit Pouliot <bpouliot at bodycad.com> wrote:
> 
> Hi,
> 
> I am currently working on a reader of the ASCII and binary msh format.
> I have some questions about it. I am using the latest 3.0.4 version (linux).
> 
> 1-
> The option -bin seem not to work for me.

This is strange. You can also set Mesh.Binary=1; in your .geo file, or you can also explicitly choose binary formats in the file dialogs when exporting a mesh with File->Export. Please double check: it should work.

> The only way I found to export in binary format is this way :
> 
> gmsh name_file_input.geo -2 -o name_file_output.msh
> gmsh -convert name_file_output.msh
> 
> The binary file will be in name_file_output.msh_new
> Did I miss something to do it without passing by the ASCII format?
> 
> 2-
> Contrary to the documentation, in the binary file, the first number
>  in the $MeshFormat section is 3 (not 2.2). Why?

As the documentation says, "-convert" converts in the latest mesh file format, which is currently the (undocumented) version 3.0 format.


> 3-
> The binary format have a "$Entities" section. This section is not explained in the documentation.
> I think this commit (8d3592a9) added the section. 
> Can you tell me more about this section? How can I interpret it?

This is a new section that is added in version 3.0, which describes the topology of the model.

> Why the ASCII format does not generate it?
> 

It does... in version 3.0


> Thanks for all the answers!
> -- 
> Benoît Pouliot - Développeur locigiel Bodycad
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list