REGION(nged)

create or modify a region combination with boolean operations

πŸ“… published 7.44.0, from nixpkgs unstable

🌸 REGION(nged) β€” the BRL-CAD User Commands glow-up ✨

okay bestie, so this is the region page from the BRL-CAD User Commands manual, and honestly? it's a little icon and it deserves a proper intro. lowkey the whole thing is about making region combinations with boolean ops, and once it clicks you're gonna be unstoppable fr fr πŸ’…


✨ NAME ✨

region β€” create or modify a region combination with boolean operations πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

region reg_name op obj [op obj ...]

πŸ’– DESCRIPTION πŸ’–

okay so the region command (which also answers to r because it's got that short-king energy, no cap) either creates a brand-new region combination named reg_name or adds more members to one that already exists. members come in as operator/object pairs β€” each pair is one boolean operator plus the name of an object to include. it's giving duo. it's giving matching outfits. 🫢

the command needs at least three arguments (reg_name, one operator, and one object). and here's the vibe check: the total number of arguments after reg_name has to be even β€” every operator needs its object, no third-wheeling allowed 😭

and if an operator/object pair points at an object that is not found in the database? that pair just gets skipped with a warning, and processing keeps rolling on with the remaining pairs. she's resilient. she's main character energy. πŸ’€

🌈 Arguments 🌈

  • reg_name β€” the name of the region you're creating or modifying. don't exist yet? she gets created ✨. already exists? the new members just get appended to her. either way, slay.
  • op β€” the boolean operator that applies to the next object. it has to be exactly one of these three:
    • u β€” union πŸ’œ
    • - β€” subtraction
    • + β€” intersection
  • obj β€” the name of the object to add as a member. plot twist: if obj is itself a region, you get a warning note printed β€” but it still gets added anyway. iconic, honestly. πŸ‘‘

πŸŽ€ Item ID auto-increment πŸŽ€

so when you're creating a new region and the database has a non-zero default item number (wdb_item_default), the item number gets automatically incremented and reported back to you. and if the creation fails after that increment happened? the item number gets decremented right back. she undoes her own mistakes. we love accountability. πŸ™ˆ


πŸ”₯ EXAMPLES πŸ”₯

Example 1. Create a region by unioning and subtracting primitives

mged> region hull.r u body.s u bow.s - keel.s

this creates the region hull.r as the union of body.s and bow.s, with keel.s subtracted. ate. πŸ’…

Example 2. Create a region using the short alias

mged> r engine.r u block.s u piston.s

same energy, shorter name β€” using the r alias, this creates engine.r as the union of block.s and piston.s. ✨

Example 3. Add a member to an existing region

mged> region hull.r u propeller.s

this appends propeller.s (as a union) to the region hull.r that already exists. lowkey upgrading your ride. πŸš€


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team 🫢


πŸ’€ 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 β€” they wanna hear it fr fr.


🌟 so yeah, that's the whole page bestie β€” go forth and boolean, and remember: even number of args after reg_name, always. iykyk.

and that's a wrap on this gem from the BRL-CAD crew β€” this page is REGION(nged) and it's yours now. mwah πŸ’‹πŸŒˆ

πŸ“¦ where this page comes from