Difference between revisions of "MGED CMD saveview"

Line 1: Line 1:
[[category:MGED view manipulation|Saveview]]
[[category:MGED view manipulation|Saveview]]

Revision as of 09:03, 20 November 2009



saveview file [args]


Target File

Return Value(s)

No Return Values for this command.


The "saveview" command saves the current viewing parameters in the specified file in the form of a shell script that will run the BRL-CAD rt program as if it had been executed from within MGED using the rt -s512 command. Any args included on the saveview command line will be copied to the file as options to the rt program. If the file already exists, the script will be appended to it. This is useful in setting up images to be raytraced later. The default script produced by "saveview test.rt" looks like:

rt -M \
-o test.rt.pix\
'object1' 'object2' \
2>> test.rt.log\
viewsize 2.780320739746094e+02;
orientation 2.480973490458727e-01 4.765905732660483e-01 7.480973490458729e-01 3.894348305183902e-01;
eye_pt 1.234152656421214e+02 7.220202900588745e+01 3.845765464924686e+01;
start 0;

When this script is executed, the image will be stored in test.rt.pix, and all messages and errors generated by the rt program will be stored in test.rt.log. The above script will produce an image of object1 and object2 from the BRL-CAD database named model.g. The viewsize, orientation, and eye_pt parameters reproduce the view displayed by MGED when the saveview command was executed. The presence of "$*" in the script causes any additional command-line options given when the script is invoked to be interpreted as additional rt options. Typically, a "-s" option might be used to set the image size (the default is 512 pixels square). See the man page on rt for details on available options.

If you have a saveview script and wish to change MGED to that view, merely cut-and-paste, or source, the viewsize, orientation, and eye_pt lines from the saveview file into MGED.

Related MGED commands are preview, for viewing the effects of an entire animation script, and savekey. Related BRL-CAD programs are tabsub and tabinterp.


mged> saveview rt_script -s1024
Create (or append to) a file named rt_script that will contain a script to run the rt program and create a color shaded image of the current MGED display. The image produced will be 1024 pixels square.

See Also


Page Generated by David Loman on: 10/12/2007 at: 7:20:42 AM