GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CENTER(nged) BRL-CAD User Commands CENTER(nged)

center - Positions the center of the mged viewing cube at the specified model coordinates.

center [x y z]

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.

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.

Example 1. Printing the coordinates of the center of the mged display.

mged> center

Prints out the coordinates of the center of the mged display.

Example 2. Moving the center of the mged display to a specified point.

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).

Example 3. Set Tcl variable $oldcent to the display center coordinates.

mged>set oldcent [center]

Sets the Tcl variable $oldcent to the display center coordinates.

Example 4. Move the center point a given distance in a given direction.

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.

Example 5. Update the vertex of a shape in the database to be located at the current view center.

mged> units mm

mged db adjust sphere.s V [center]

BRL-CAD Team

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org
06/07/2022 BRL-CAD

Search for    or go to Top of page |  Section n |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.