VIEW(nged)

Gets/sets the view parameters (local units).

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’– VIEW(nged) πŸ’–

okay bestie, buckle up β€” this is the nged view command, part of the iconic BRL-CAD MGED Commands lineup, and it's genuinely the main character of your graphics window. it gets and sets the view parameters, all in local units. no cap. πŸŽ€


✨ SYNOPSIS ✨

view ae|aet|auto|center|dir|eye|knob|lookat|print|quat|save|size|ypr [args]

🌸 DESCRIPTION 🌸

so basically: it gets and sets view parameters, in local units. the view command accepts the following subcommands, and honestly? every single one of them is serving. πŸ’…


πŸ¦‹ OPTIONS πŸ¦‹

  • -h, β€”help β€” print help. that's it, that's the vibe 🫢
  • -v, β€”verbose β€” crank up the command verbosity. more words, more info, more everything ✨
  • -V, β€”view name β€” operate on the specified view instead of the current GED view. like, go do your thing on that other view, bestie πŸ‘‘

πŸ‘‘ SUBCOMMANDS πŸ‘‘

  • ae [[-i] azimuth elevation [twist]] β€” get (no args) or set the azimuth, elevation, and the optional twist. if you only hand it 2 arguments, it assumes a twist of 0. the -i flag sets the AET incrementally. setting azimuth and elevation also changes the eye point, while keeping the center and view size static. 🧚
  • align [-i] x y z β€” aligns the eye point with a desired point and the current center (eye -> pt -> center). the -i flag aligns from the opposite direction instead (eye -> center -> pt). align changes the eye point, azimuth, and elevation, while keeping the center and view size static. 🎯
  • auto [-s scale] [object ...] β€” resets the view size, center, and eye point so the framed objects are visible in the graphics window. with no arguments, everything currently displayed gets framed; if you pass a list of object names (or full paths), the view is instead sized to frame only those objects (and they don't even need to be displayed, iykyk). the -s (or β€”scale) option sets the view scale (model scale relative to view size). azimuth and elevation stay static. ⭐
  • center [x y z] β€” get (no args) or set the center. setting the center also changes the eye point, while keeping azimuth, elevation, and view size static. πŸŽ€
  • dir [[-i] x y z [twist]] β€” get (no args) or set the view as a direction vector plus an optional twist. setting the direction also changes the azimuth, elevation, and eye point, while keeping the center and view size static. the -i flag inverts all values (for both getting and setting). heads up: the direction vector returned without arguments does not include the twist β€” you can figure out the twist by taking the inverse of the twist returned with the ae subcommand. πŸ™ˆ
  • eye [x y z] β€” get (no args) or set the eye point. setting the eye point also changes the center, while keeping azimuth, elevation, and view size static. πŸ‘οΈ
  • faceplate [options] subcommand [args] β€” Not Implemented. manipulates options for the faceplate. πŸ’€
  • lookat x y z β€” adjusts the current view so the eye is looking in the direction of the given coordinates, but it does not move the eye point and does not change the view size. center, azimuth, and elevation will change. πŸ”₯
  • print β€” returns the current azimuth, elevation, and twist; direction vector; center; eye point; and view size. the whole receipts, basically. 🧾
  • quat [v1 v2 v3 v4] β€” get (no args) or set the view as a quarternion. setting the quarternion also changes the azimuth, elevation, and eye point, while keeping the center and view size static. πŸŒ€
  • save [-e command] [-l scriptlogfile] [-o scriptoutputfile] [-i scriptinputfile] file [args] β€” saves the current viewing parameters into the specified file as a shell script that will run the BRL-CAD rt program. details, because they matter:
    • the -e flag specifies a command for the script to run instead of the default rt.
    • the -l flag specifies a logfile for the script to write instead of the default inputfile.log.
    • the -o flag specifies the output filename for the script to create instead of the default inputfile.pix.
    • the -i flag specifies the input filename for the script to load instead of the current database (which is the default).
    • various arguments can be tacked onto the end, like -s1024 (go peep the man page for the rt command). πŸ’Ύ
  • size [view_size] β€” get (no args) or set the view size. setting the view size also changes the eye point, while keeping azimuth, elevation, and center static. πŸ“
  • ypr [yaw pitch roll] β€” get (no args) or set the view as yaw, pitch, roll. a ypr of 0 0 0 is a rear view (AE = 180, 0). setting the ypr also changes the azimuth, elevation, and eye point, while keeping the center and view size static. 🌈

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Get the center.

mged>view center

Gets the center. slay.

Example 2. Set the center at the origin of model space.

mged>view center 0 0 0

Sets the center at the origin of model space. iconic.

Example 3. Get the current yaw, pitch, and roll

mged>view ypr

Returns the yaw, pitch, and roll of the current view.

Example 4. Set the current yaw, pitch, and roll

mged>view ypr 90 0 0

Sets the view using yaw, pitch, and roll so that the ae is 270, 0 (right).

Example 5. Increase the azimuth by 10 degrees

mged>view ae -i 10 0

Sets the view by increasing the current azimuth by 10 degrees.

Example 6. Save current viewing parameters in a specified file in the form of a shell script to run the BRL-CAD rtedge program

mged>view save -e rtedge run_rtedge_script.rt -s1024

Creates a script named run_rtedge_script.rt that will run rtedge and create a pix file of the current screen. honestly? obsessed. πŸ’–


πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team β€” legends, every one of them πŸ‘‘


πŸ“ BUG REPORTS πŸ“

got a bug? a problem? a personal grievance with the view? reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. they're lovely, they'll read it 🫢


ngl bestie, faceplate is literally marked Not Implemented up there, so don't come for me when it does nothing. that's canon. 😭

and that's the page!! brought to you by BRL-CAD, filed under VIEW(nged) β€” go frame something gorgeous with it, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from