RECT(nged)
manage the rubber band selection rectangle in the view
π NAME
rect β the command that runs the rubber band selection rectangle in your view, bestie π
β¨ SYNOPSIS
rect vname subcommand [args]
π DESCRIPTION
Okay so picture this: rect is the girl who manages the rubber band rectangle overlay that gets drawn on top of your current view. You can position her, resize her, and style her β either by clicking around interactively or by telling her exactly what to do programmatically. She's got range π¦
What is she for, you ask? Two iconic jobs, no cap: marquee selection, and raytracing a sub-region of the view. That's it. That's the gig.
The very first argument is always the view name (vname) β non-negotiable, she needs to know which view she's serving πββοΈ The second argument is the subcommand. And here's the pattern, the way that every single subcommand works the same way: either you give it no extra args and it hands you back the current value, or you give it extra args and it sets that thing. Get/set. That's the whole vibe. Periodt.
π¦ Subcommands
rect vname bg [r g b]β get or set the rectangle's background fill color, as RGB integers in the range (0β255). No extra args? She returnsr g b. Three args? She sets the color. Slay π¨rect vname color [r g b]β get or set the rectangle's border/line color as RGB integers. No extra args β returnsr g b. Three args β sets the color.rect vname cdim [w h]β get or set the canvas dimensions (that's the full window/display size, in pixels β¨). This one's the main character because it's used to compute the normalized view coordinates for the rectangle. No extra args β returnsw h. Two args β sets the canvas size and recalculates the rectangle's normalized position and dimensions. She's doing math for you, you're welcome πrect vname dim [w h]β get or set the rectangle's dimensions in pixels. No extra args β returnsw h. Two args β sets the width and height and recalculates the normalized position.rect vname draw [0|1]β get or set whether the rectangle is actually drawn.0hides,1shows π No extra args β returns the current draw flag.rect vname lstyle [0|1]β get or set the line style.0= solid (that's the default, iykyk),1= dashed. No extra args β returns the current style. Heads up: non-zero values set dashed, and zero or negative values set solid.rect vname lwidth [w]β get or set the line width in pixels. No extra args β returns the current width. Non-positive values set the width to0. Like, all the way to zero. Not a vibe, but it's the rule π«Άrect vname pos [x y]β get or set the rectangle's anchor position in pixels (origin is at the top-left, bestie). No extra args β returnsx y. Two args β sets the position and recalculates the normalized coordinates.rect vname rt portβ raytrace the geometry inside the current rectangle area, sending the output to the framebuffer at the given port number π₯ Requires exactly one argument. Has no effect if the rectangle has zero size (girl can't trace nothing π).rect vname zoomβ zoom the view so the area enclosed by the rectangle fills the screen. She adjusts the rectangle to match the window aspect ratio before zooming, because she's thoughtful like that πΈ Has no effect if the rectangle has zero size.rect vname varsβ print all current rectangle parameters asvariable = valuepairs. Perfect for inspecting the complete rectangle state, like a full vibe check of every setting πrect vname helpβ print the usage summary for all subcommands. When in doubt, ask for help, no shame π«Ά
π EXAMPLES
Example 1. Show the rectangle
mged> rect default draw 1
Enables display of the rubber band rectangle on the default view. She's visible, she's here, she's serving β¨
Example 2. Position and size the rectangle
mged> rect default cdim 1024 768
mged> rect default pos 200 100
mged> rect default dim 400 300
Sets the canvas to 1024Γ768 pixels, anchors the rectangle at pixel (200, 100), and gives it a 400Γ300 pixel size. The normalized view coordinates are calculated automatically β you don't have to lift a finger π
Example 3. Set the rectangle color to red
mged> rect default color 255 0 0
Sets the border color of the rectangle to red. Iconic. Powerful. Red. π
Example 4. Use dashed lines
mged> rect default lstyle 1
Switches the rectangle border to a dashed line style. A little texture, a little drama π
Example 5. Zoom to the rectangle area
mged> rect default zoom
Adjusts the view so that the area within the rectangle fills the display. Main character energy fr fr π
Example 6. Inspect all rectangle parameters
mged> rect default vars
Prints all current rectangle settings, e.g. position, dimensions, colors, draw flag, line style, and line width. The full scoop, the whole story π¦
π AUTHOR
BRL-CAD Team β the collective. The girlies. The legends. π
π BUG REPORTS
Spotted a bug? A problem? Something lowkey broken? π«Ά Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. Go tell them, they wanna know, I promise π
Okay that's the whole page, bestie β this was RECT(nged), brought to you by BRL-CAD β¨ mwah, go select something pretty πππ¦
π¦ 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