[Gmsh] gmsh export to png/gif?

Bryan Bishop kanzure at gmail.com
Wed Oct 14 20:45:06 CEST 2009


Hey Christophe,

I was browsing some OpenCASCADE code today and found that
src/OpenGl/gl2ps.cxx was written by you. To be honest, when I was
reading that file this morning, I didn't realize who you were; then,
later, I was playing around with gmsh as a way to open up STL files
and export to PNG, and I looked around at the source and realized that
you are one and the same person. So, anyway, nice to see you.. I've
been using gmsh for at least a year now, and it has proven useful in a
variety of situations (CFD, CAD, etc.).

That said, I was wondering if you could give me a few protips.
Yesterday I wrote some tools in python called iges2png, iges2stl,
stl2pov, and pov2png, using pythonOCC, the python bindings to the
OpenCASCADE library. The problem is that iges2stl is terribly slow, so
generating an image of an IGES file takes absolutely forever.

I was wondering if you could point me to where in gmsh's code base I
could find the means to do this with a simple C++ program I could
write. I was wondering how I can go about loading up an IGES file with
the gmsh codebase, and then export an image. Ideally without
converting to STL in the mean time .. that would be absolutely
awesome, and save 30 to 60 seconds on all of the images I generate in
the future. (Right now OpenCASCADE takes 30 to 60 seconds to convert
from IGES to STL.)

Is this doable?

Thanks a million!

- Bryan
http://heybryan.org/
1 512 203 0507