GRID2MODEL_LU(nged)
convert grid xy to model coordinates (local units)
π GRID2MODEL_LU π
okay bestie, welcome to the grid2model_lu page from the nged manual β this one's short and sweet and honestly kind of a little math queen. let's get into it π«Ά
β¨ NAME β¨
grid2model_lu β convert grid xy to model coordinates (local units). that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
grid2model_lu x y
π¦ DESCRIPTION π¦
so the grid2model_lu command takes a 2D grid offset β in local units β and turns it into 3D model-space coordinates, also in local units. no cap, that's the whole job π
the two arguments, u and v, are the horizontal and vertical grid offsets from the model origin, projected into the current view's grid plane. and the Z component? treated as 0. flat. grounded. main character energy π§
here's the tea on how it actually does it β: the command projects the model origin into view space, adds the scaled grid offset, then inverse-transforms back through the view-to-model matrix. the result is a 3-component model-space point in local units. every single scale factor uses the current view's gv_scale plus the database unit conversions π₯
and if you ever need to go the other way? the inverse operation is model2grid_lu. they're a matching set, your honor π
β EXAMPLES β
Example 1. Convert a grid offset to model coordinates
mged> grid2model_lu 50 25
returns the 3D model-space coordinates (in local units) corresponding to a 2D grid position 50 units right and 25 units up from the projected model origin. slay π
π AUTHOR π
BRL-CAD Team β icons only, we stan π
π BUG REPORTS π
found a bug or a problem? don't suffer in silence, bestie π send the details via electronic mail to devs@brlcad.org. they want to hear it fr fr π
and that's the page!! source: BRL-CAD, manual entry GRID2MODEL_LU(nged) β til next time, go convert something cute ππβ¨
π¦ 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