GRID2VIEW_LU(nged)

convert grid xy to view coordinates (local units)

πŸ“… published 7.44.0, from nixpkgs unstable

✨ 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