GRID2VIEW_LU(nged)
convert grid xy to view coordinates (local units)
β¨ GRID2VIEW_LU β¨
okay bestie, welcome to the grid2view_lu page from the BRL-CAD User Commands manual (nged girlies rise π
). This one's short and sweet and it ATE, no cap.
πΈ NAME πΈ
grid2view_lu β convert grid xy to view coordinates (local units). literally that's the whole job. iconic behavior honestly π
π¦ SYNOPSIS π¦
grid2view_lu u v
two args, that's it, she's low maintenance π
π DESCRIPTION π
so the grid2view_lu command takes a 2D grid offset (in local units, keep that in mind) and turns it into 3D view-space coordinates β also in local units, we stay consistent in this house β¨.
The two arguments u and v are the horizontal and vertical pixel-like grid offsets from the projected model origin. pixel-like!! not actual pixels, don't come for me π. And the Z component? treated as 0. she's flat, she's on the floor, that's her vibe.
Here's the tea on how it works π: the command projects the model origin into view space, scales it by the current view scale and the unit conversion factors, then adds the grid offset to produce a 3D view-space vector. The result comes back as a space-separated 3-element vector. three numbers, space separated, done π
The inverse operation is view2grid_lu β that's the one that goes the other way, iykyk π§
π EXAMPLES π
β Example 1. Convert a grid offset to view coordinates
mged> grid2view_lu 50 25
Returns the 3D view-space coordinates corresponding to a 2D grid offset of (50, 25) local units from the projected model origin. so you feed her 50 and 25, she hands you back a whole 3D vector. main character energy fr fr π₯
π AUTHOR π
BRL-CAD Team β love them, they built all of this π«Ά
π BUG REPORTS π
found a bug? a problem? something acting sus? π Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. slide into their inbox, they'll fix it, slay π
anyway that's the whole page bestie, go convert some grid offsets, you're gonna do amazing πΈπβ¨
mwah π β with love, the BRL-CAD crew, straight out of the BRL-CAD User Commands manual, page GRID2VIEW_LU(nged), periodt π
π¦ 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