[Gmsh] generation of screenshots in non-interactive mode

pedro.salgueiro at gmail.com pedro.salgueiro at gmail.com
Wed Jul 23 19:58:05 CEST 2014


Hi!

I have exactly the same problem as you. Have you ever solved the problem?
I have already built gmsh with OSMesa, but the result is the same.

Here is the info on my build:

Version          : 2.8.5
License          : GNU General Public License
Build OS         : Linux
Build date       : 20140723
Build host       : gallifrey
Build options    : 64Bit Ann Bamg Bfgs Blas(Generic) Blossom Chaco 
DIntegration Dlopen Fltk Gmm Jpeg Kbipack Lapack(Generic) LinuxJoystick MPI 
MathEx Med Mesh Metis Mmg3d Mpeg NativeFileChooser Netgen ONELAB 
ONELABMetamodel OSMesa OpenCascade OpenGL OptHom Parser Plugins Png Post 
RTree Salome Solver Tetgen(1.5) Voro3D Zlib
FLTK version     : 1.3.2
Packaged by      : pds
Web site         : http://www.geuz.org/gmsh/
Mailing list     : gmsh at geuz.org


On Thursday, September 12, 2013 9:14:36 AM UTC+1, Mikhail Artemyev wrote:
>
> Hi all!
>
> I would like to rise this old topic 
> http://geuz.org/pipermail/gmsh/2009/004300.html
>
> I need to get a screenshot of a mesh, and I use the following .geo file 
> for that:
>
> <print.geo>
> Merge "mesh.msh";
> //Draw; // doesn't influence on the result either
>            // in interactive and non-interactive mode
> Print "view.jpg";
> Exit;
>
> I use gmsh with the following options:
>
> $gmsh --info
>
> Version          : 2.8.2
> GUI toolkit      : FLTK 1.3.0
> License          : GNU General Public License
> Build OS         : Linux
> Build options    : Ann Bamg Bfgs Blas(Generic) Blossom Chaco DIntegration 
> Dlopen Fltk Gmm Jpeg Kbipack Lapack(Generic) LinuxJoystick MathEx Mesh 
> Metis Mmg3d Mpeg NativeFileChooser Netgen OSMesa OneLab OneLabMetamodel 
> OpenCascade OpenGL OptHom Parser Plugins Post RTree Salome Solver 
> Tetgen(1.5) Voro3D Zlib
> Build date       : 20130912
> Build host       : artemiev-laptop
> Packager         : artemiev
> Web site         : http://www.geuz.org/gmsh/
> Mailing list     : gm... at geuz.org <javascript:>
>
> So gmsh is built with the OSMesa support.
> When I type the command:
>
> $gmsh print.geo
>
> the gmsh's window opens and closes -> the "view.jpg" file is created.
> When I try to do the same in non-interactive mode:
>
> $gmsh print.geo -
>
> I have the following output:
>
> Info    : Running 'gmsh print.geo -' [Gmsh 2.8.2, 1 node, max. 1 thread]
> Info    : Started on Thu Sep 12 14:58:07 2013
> Info    : Reading 'print.geo'...
> Info    : Reading 'mesh.msh'...
> Info    : 870 vertices
> Info    : Vertex numbering is dense
> Info    : 1710 elements
> Info    : Done reading 'mesh.msh'
> Info    : Writing 'view.jpg'...
> Info    : Done writing 'view.jpg'
>
> but the "view.jpg" is not created.
> What am I missing?
>
> Thanks in advance,
> Mikhail
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140723/34294786/attachment.html>