We have been using lgt for years and are now transitioning to rtedge (we were relying on lgt's parameters to get some view info for accurate overlays for a pix).
If we have the bitmap size for a square pix map along with the az, el, pix map edge length in model space, and model space coordinates of the center of the pix map, we have enough info to map the pixels to model and page space.
With rtedge the best I can come up with for that information is the following:
First I use the '-s', '-a', and '-e' options to rtedge to produce the pix map.
Then I get the bounding box of the objects by a small program that interrogates the model rt_dirbuild, rt_gettree, and rt_prep to determine the bounding box.
I get the view size by putting the following commands into a file:
ae <az> <el>
Then I source the file into mged:
mged -c tgt.g < file
The resulting file has a line that reads:
where N is the pix map edge length in mm.
I rely on the rtedge man page which says "...the grid will be centered on the centroid of the model..." which I assume means the center of the bounding box for the view objects.
I am sure there is a better method, probably by using a view object while getting the bounding box, but I haven't been able to translate the way the transformation matrices work in brlcad into my world. There also may be a way to use a tcl script more easily.
A command line utility to do all that at once would be great (and I would be happy to supply one if I can ever figure out how to get the view info programmatically at the same time I get the bounding box info).
By the way, there is no user documentation on "saveview" that I can find, and I would sure like to know what "[args]" are available. (I find it very difficult to track down in the source code exactly where the entry points for various mged commands are.)
Thanks for any comments or help.
SRS Technologies, Inc.
362 Beal Parkway, N.W., Suite 201
Fort Walton Beach, FL 32548-3975
From trial and error, I am confident that the image is centered on the bounding box center when using the saveview command, and the viewsize parameter is correct. However, the saveview command in mged does not automatically ensure all objects are in view, so pixmaps generated programmatically sometimes have objects partially in the pixmap. With lgt we could always count on the objects being in the view.
Don't know how this message got lost. Perhaps because I'll often scan posts for 0-replies and you replied to yourself. Don't know, doesn't matter. That said, there are lots of good points made in here and I've files some to-do items based on your feedback (like better documentation for saveview). If there are any outstanding questions, please repost.