CENTER(nged)
Positions the center of the mged viewing cube at the specified model coordinates. Without arguments, returns the current center.
π CENTER(nged) π
Okay bestie, gather βround because this one is literally the main character of mged navigation. This is the center command from the BRL-CAD user commands fam, and itβs about to make your viewing cube moves absolutely iconic. No cap.
β¨ NAME β¨
center β positions the center of the mged viewing cube at the specified model coordinates. And if you give it no arguments? It just returns the current center. Periodt. π
π SYNOPSIS π
center [x y z]
π DESCRIPTION π
So hereβs the tea: center moves the center of the mged viewing cube to whatever model coordinates you tell it. It does this by moving the eye position, but β and this is key β it does not change the viewing direction. (The lookat command is the related function that changes the viewing direction without moving the eye location. Theyβre like sisters, but different vibes.) The coordinates you give are expected in the current editing units. And if those coordinates are the result of evaluating a formula, they get echoed back to you. If you donβt provide any coordinates, the current center coordinates get printed β in current editing units, not mm β and you can use them in subsequent calculations. See also the view command.
It is often convenient to use the center of the view when visually selecting key locations in the model for construction or animation. Why? Bestie, Iβm so glad you asked:
- Thereβs a visible centering dot on the screen.
- Zoom and rotation are performed with respect to the view center.
- The default center-mouse behavior is to move the indicated point to the view center.
- The angle/distance cursors are centered by default.
This command provides the means to set and retrieve those values numerically. Itβs giving utility, itβs giving precision, itβs giving βI know where I am in 3D space.β π₯
π¦ 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. Letβs go, one by one.
π« 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. Literally just vibe-checking your current center.
π« 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). Slay.
π« 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. So you can save it for later, iykyk.
π« 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. Itβs giving vector math, itβs giving precision.
π« 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]
Updates the vertex of a shape in the database β specifically sphere.s V β to be located at the current view center. Chefs kiss. π
π AUTHOR π
BRL-CAD Team. The icons, the legends. We stan.
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. Donβt be shy, bestie β if somethingβs not slaying, let them know.
Later bestie! π This page is brought to you by the BRL-CAD fam, version CENTER(nged) β no cap, thatβs the footer vibe. β¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms