[Gmsh] python API image dimension
Christophe Geuzaine
cgeuzaine at uliege.be
Fri Oct 18 22:04:36 CEST 2019
> On 30 Sep 2019, at 08:55, andre bianchessi <andrebianchessi at googlemail.com> wrote:
>
> Hi!
>
> I need to export .msh files to images using the python API.
> My script looks like this:
>
> gmsh.initialize()
> gmsh.fltk.initialize()
> gmsh.open('domainMesh_0.msh')
> gmsh.write('domainMesh_0.png')
> gmsh.fltk.wait(0.01)
> gmsh.finalize()
>
> 1) How can I change the png's resolution ?
gmsh.option.setNumber('Print.Width', 200)
> 2) Is it possible to export the image without opening the GUI?
>
No. (Well, actually yes, using OSMesa, but you need to recompile Gmsh for this (cmake -DENABLE_OSMESA=1), and it hasn't been tested in a while...)
Christophe
> Thank you,
>
> --
> André Bianchessi
> Mechatronics Engineering Student at University of São Paulo
> +55 11 997667070
> _______________________________________________
> 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
More information about the gmsh
mailing list