![]() Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Update REQ 6975]: Geomview question
> I have been using geomview for a while and I was wondering if it is
> possible to save a camera as a PS file from the command line without
> using menu navigation. I am trying to integrate geomview in a tool flow
> and I would like to get the snapshot saved. Well, OK, here is what I
> would like to do:
>
> Run geomview in batch mode, orient the picture in a certain direction
> and save it as a PS file. All this has to be done in batch mode, no
> camera on screen.
You can do it by starting up Geomview with the right GCL (Geomview
command language) file. Here's an example file, which I called
"doit.gcl":
----------
(progn
(load hdodec.off geometry)
(camera c0 {
camtoworld transform {
-0.89896667 0.16900851 -0.40410414 0
0.43307546 0.48121688 -0.76215452 0
0.0656505 -0.86015731 -0.50578946 0
1.2306064 -16.264462 -9.6162682 1
}
perspective 1 stereo 0
fov 40
frameaspect 1
focus 3
near 0.07
far 100
}
)
(redraw c0)
(draw c0)
(snapshot c0 /tmp/foo.ps ps)
(exit)
)
----------
You can see that I loaded some geometry and a camera which has a
specific viewpoint, then I tell Geomview to draw the camera and take a
PostScript snapshot. Finally, the script tells Geomview to exit.
Then just type at the command prompt
% geomview -c doit.gcl
a window flashes up on the screen, the snapshot happens, and Geomview
exits.
The way I got the camera specification was by interactively moving the
camera to the position I wanted it in a previous session, then saving
the camera specification, including it in the GCL file, and inserting
the camera id "c0" in between "(camera " and the rest of the
specification. (You can save the camera spec by hitting ">" in an
interactive session, changing the default "Commands" to "Camera",
change "World" to "targetcam", and give a filename in the browser or
"-" to print it to stdout on your shell.
Hope this helps,
Tamara
|
||
|
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
|
site hosted by |
|||