R(nged)

Creates a region with the specified region_name.

πŸ“… published 7.44.0, from nixpkgs unstable

✨ R (nged) ✨

okay so bestie, we're in the BRL-CAD User Commands manual and today's main character is r πŸŽ€ she makes regions, and honestly? she ate.


🌸 NAME 🌸

r β€” creates a region with the specified region_name. that's it, that's the vibe πŸ’…


✨ SYNOPSIS ✨

r {region_name} {operation object}

πŸ’– DESCRIPTION πŸ’–

So r creates a region with the region_name you give it, bestie. No cap.

The region gets built out of a list of Boolean operations and object pairs. Real talk about the operators β€” they're single characters:

  • + β†’ intersection
  • - β†’ subtraction
  • u β†’ union

The object hanging out with each operator can be a combination or a primitive shape, either one works πŸ¦‹

🚨 ok this part matters: no parentheses, no grouping, none of that. The r command does not allow any grouping indication at all. periodt.

The operator hierarchy for r has been established through the ancestry of BRL-CAD and does not conform to accepted standards 😭 (if you want the more standard implementation, go see the c command, iykyk). So here's how it actually goes down:

  1. Intersection and subtraction operations get performed first, proceeding left to right
  2. Then union operations get performed

BRL-CAD regions are special cases of BRL-CAD combinations and they come with special attributes ✨. You can set default values for those attributes using the regdef command. And as new regions get built, the default ident number gets incremented β€” it just keeps climbing πŸ“ˆ

Oh and heads up: if region_name already exists, then the operation/object pairs get appended to its end instead of making something new. lowkey important, don't forget it πŸ™ˆ


πŸŽ€ EXAMPLES πŸŽ€

The example shows the use of the r command to create a region consisting of two parts unioned together. iconic behavior tbh.

⭐ Example 1. Create a region using operations and object pairs.

mged>r new_region u shape1 - shape2 u shape3 + group4

Creates a region named new_region that consists of two parts unioned together πŸ’œ

  • The first part is shape1 with shape2 subtracted
  • The second part is the intersection of shape3 and the combination group4

see how it all comes together? chef's kiss 🧚


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team 🫢


πŸ”₯ BUG REPORTS πŸ”₯

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org πŸ“§ fr fr, they wanna hear it.


and that's the whole page bestie πŸ’– this was R(nged) from the BRL-CAD manuals β€” shoutout to the BRL-CAD crew, no date drama needed, just vibes and regions πŸŒˆβœ¨πŸ’…

πŸ“¦ where this page comes from