Oops my answer didn't go to the mailing list address... Reposting...

Hi Frederic,

Actually I think outputting an image from the FreeCAD viewport is just a kind of helper tool, and not
really an important feature of FreeCAD... The image you'll obtain is a kind of quick "screenshot"
with not much refinement.

The FreeCADGui module is indeed the GUI part of freecad, and if you run in console mode,
everything gui-related is disabled, that's the whole point of it...

But you saw that freecad can export povray files (with the raytracing module)? Maybe, specially
if you are used to povray, you can easily get the best of 2 worlds, store your models as freecad files,
and render them with povray, so you get much better image quality?

try exploring this:

import Raytracing
dir(Raytracing)

I think once your pov files are written calling povray from python with the right parameters should be easy...
The Raytracing module has  not many users yet, so it would be interesting to see an experienced povray
user put his hands on it!

Cheers
Yorik

Yorik van Havre 
São Paulo, Brazil
http://yorik.uncreated.net


2010/8/3 Picca Frédéric-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
Hello

First I would like to thank you for this great piece of software.
The open source community has now a really good CAD software base.

I am trying to use freeCAD as an equivalent of povray, to produce 3D
figures for the documentation of one of my library. Thoses figure
are usually generated from a makefile.
Now I am switching from povray to freecad scripts for a few reasons.
The major one is that I can used the 3D models generated from freecad
in my library compare to povray.
So povray is no more an option for me.

So for the documentation, I need to render scenes without the graphical
interface.

The problem is that I can not use the FreeCADGUI module with
freecadcmd.

FreeCADGui.activeDocument().activeView().viewAxometric()
FreeCADGui.activeDocument().activeView().saveImage('crystal.png',800,600,'Current')

the error message is:

FreeCAD 0.10, Libs: 0.10R3225
(c) Juergen Riegel, Werner Mayer 2001-2010
 #####                 ####  ###   ####
 #                    #      # #   #   #
 #     ##  #### ####  #     #   #  #   #
 ####  # # #  # #  #  #     #####  #   #
 #     #   #### ####  #    #     # #   #
 #     #   #    #     #    #     # #   #  ##  ##  ##
 #     #   #### ####   ### #     # ####   ##  ##  ##

Traceback (most recent call last):
 File "crystal.FCMacro", line 6, in <module>
   import FreeCADGui
ImportError: No module named FreeCADGui

How can I generate this crystal.png using freeCADcmd
from my makefiles without povray?

thanks

Frederic

--
GPG public key   1024D/A59B1171 2009-08-11
   fingerprint = 1688 A3D6 F0BD E4DF 2E6B  06AA B6A9 BA6A A59B 1171
uid  Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Free-cad-general mailing list
Free-cad-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/free-cad-general