VIEW2GRID_LU(nged)
convert view xyz to grid coordinates (local units)
β¨ VIEW2GRID_LU β¨
okay so bestie, welcome to the view2grid_lu glow-up π
this little icon lives in the BRL-CAD user commands club (nged division), and it's literally here to convert view xyz into grid coordinates in local units. no cap. π¦
πΈ SYNOPSIS πΈ
view2grid_lu x y z
π DESCRIPTION π
so like, view2grid_lu takes your 3D view-space coordinates (in local units, bestie, keep up β¨) and turns them into a 2D grid offset β also in local units, because consistency is the moment π.
The three arguments x y z are your view-space coordinates in local units. The result is a 2-element u v string β and listen, only the X and Y components of the grid displacement from the projected model origin get returned. Z? discarded. gone. not invited to the party π.
Here's the tea on how it actually works, fr fr:
- it projects the model origin into view space
- it scales it
- it subtracts that from the input view point to get the displacement
- then it hands back the X and Y components as the 2D grid offset π«Ά
and if you ever need to go backwards? the inverse operation is grid2view_lu. iconic symmetry, honestly π
π EXAMPLES π
β Example 1. Convert a view-space point to a 2D grid offset
mged> view2grid_lu 50 25 0
Returns the 2D grid offset u v corresponding to the view-space point (50, 25, 0) in local units, measured from the projected model origin. slay π
β¨
π§ AUTHOR π§
BRL-CAD Team β the main characters, lowkey π
π BUG REPORTS π
got a bug? a problem? a whole situation? π Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β they're literally waiting for your email bestie π§π
that's the whole vibe check, bestie β BRL-CAD, VIEW2GRID_LU(nged), no cap. go convert some coordinates and eat πβ¨
π¦ 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