MGED CMD center

From BRL-CAD

center[edit]

Syntax[edit]

center [x y z]


Argument(s)[edit]

No Arguments for this command.


Return Value(s)[edit]

No Return Values for this command.


Description[edit]

The "center" command positions the center of the mged viewing cube at the specified model coordinates. This is accomplished by moving the eye position while not changing the viewing direction. (The lookat command performs a related function by changing the viewing direction, but not moving the eye location.) The coordinates are expected in the current editing units. In case the coordinates are the result of evaluating a formula, they are echoed back. If no coordinates are provided, the current center coordinates (in current editing units, not mm) are printed and can be used in subsequent calculations.

It is often convenient to use the center of the view when visually selecting key locations in the model for construction or animation because of (1) the visible centering dot on the screen, (2) the fact that zoom and rotation are performed with respect to the view center, (3) the default center-mouse behavior is to move the indicated point to the view center, and (4) the angle/distance cursors are centered by default. This command provides the means to set and retrieve those values numerically.


Example(s)[edit]

mged> center
Print out the coordinates of the center of the mged display
mged> center 12.5 5.6 8.7
Move the center of the mged display to the point (12.5, 5.6, 8.7).
mged> set oldcent [center]
Set the Tcl variable $oldcent to the display center coordinates.
mged> set glob_compat_mode 0
mged> units mm
mged> eval center [vadd2 [center] {2 0 0}]
Move the center point two mm in the model + x direction.
mged> db adjust sphere.s V [center]
mged> redraw_vlist sphere.s
Update the "V" vertex of shape sphere.s in the database to be located at the current center of the view, and recreate the vector display lists of only those object(s) that were affected by the change.


See Also[edit]

read_muves
eye_pt
whichid

Page Generated by David Loman on: 10/11/2007 at: 12:05:37 PM