[Gmsh] non interactive

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Nov 9 08:29:48 CET 2007


Bernhard Kubicek wrote:
> yes, you can use geo files also as script files to include meshes, and
> create screenshots. As far as I know, it is necessary however to let the
> window open, to create a screenshot. But you can also exit in the
> script:
> ---view.geo----
> Include "your.msh";
> //other settings, try '?' button in the 3d-window, an copy paste some
> commands
> Print Sprintf("out.png");
> Exit;
> ----


This is indeed the easiest way to do it.

Now, if you really need "fully batch" operation (with no window 
opening), then you'll need to recompile Gmsh from the source code with 
the "--enable-osmesa" configure option. When the above script is run in 
batch mode (say, using "gmsh view.geo -"), the bitmap image will be 
generated off-screen. Note that this has only been tested on Linux.


> 
> very nice greetings,
>  Bernhard
> 
> On Thu, 2007-11-08 at 11:33 -0200, Bernardo Rocha wrote:
>> Hello,
>>
>> I'm wondering if is it possible to use run gmsh from the command line
>> and save a .jpg image from a .msh file as input?
>>
>> Thanks
>> -- 
>> ===================================
>> Bernardo Martins Rocha 
>> msn: bernardo.m.rocha at hotmail.com
>> skype:bernardo.m.rocha
>> =================================== 
>> _______________________________________________
>> gmsh mailing list
>> gmsh at geuz.org
>> http://www.geuz.org/mailman/listinfo/gmsh
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 


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