CENTER(nged)
DESCRIPTION
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.
EXAMPLES
The examples show the use of the center command to print coordinates of the center of the mged display, move the center of the mged display to a given point, set a Tcl variable to the display center coordinates, move the center point a given distance in a given direction, and update a vertex in the database to be located at the current center of view.
mged> center
Prints out the coordinates of the center of the mged display.
mged> center 12.5 5.6 8.7>
The center of the mged display is moved to the point (12.5, 5.6, 8.7).
mged> set oldcent [center]
Sets 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}]
Moves the center point 2 mm in the model + x direction.
mged> units mm
mged db adjust sphere.s V [center]
COPYRIGHT
This software is Copyright (c) 1989-2021 by the United States Government as represented by U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org