REGIONS(nged)

write a region and Boolean member summary table to a file

πŸ“… published 7.44.0, from nixpkgs unstable

🌸 REGIONS (nged) β€” the BRL-CAD User Commands era 🌸

okay so bestie, welcome to REGIONS(nged) πŸ’– this is a page from the BRL-CAD User Commands manual and it's literally about writing a region + Boolean member summary table out to a file. no cap, it's more useful than it sounds.


✨ NAME ✨

regions β€” write a region and Boolean member summary table to a file πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

regions file object(s)

πŸ’… DESCRIPTION πŸ’…

so the regions command does a whole little journey through the hierarchy of one or more objects, and then writes a summary of all the regions it found to file. heads up though: the file gets opened in write mode and overwritten if it already exists 😭 so like, don't point it at your diary.

regions is one of four related commands that all share the same underlying logic but produce different levels of detail. group-chat lineup, get into formation πŸ‘‘

  • idents β€” region-level summary only: region count, ident, air code, material code, LOS, and path. no primitives listed. it's giving minimal.
  • regions β€” region-level summary with the Boolean formula (member names and operators) for each region. that's us, hi 🫢
  • solids β€” full summary all the way down to primitives: same as regions, plus the evaluated parameters of each primitive shape with accumulated transformation matrices applied. the overachiever of the group.
  • tables β€” not a valid standalone command. invoking tables directly returns an input error πŸ™ˆ use one of the three specific commands above instead. it's the sibling who didn't show up.

πŸ’œ Output format πŸ’œ

the output file is a fixed-width text table. each region entry includes the following fields, in this exact order:

  1. Region count β€” sequential index of the region as encountered.
  2. Region ID (ident) β€” the region's identifier number.
  3. Air code β€” air region code (0 if it's not an air region).
  4. Material code (GIFTmater) β€” GIFT material code.
  5. LOS β€” line-of-sight percentage (0–100).
  6. Path β€” the full path from the listed object to the region.
  7. Boolean members β€” the list of member primitives and Boolean operators (u, -, +) forming the region. combination sub-members are shown as RG entries; unknown object types show up as ??.

there's also a header written at the top of the file containing the command name, database filename, username, database title, units, and the list of objects processed 🌈

and after the table, a summary line gets appended:

Number Primitives = N
Number Regions = N

🧚 Primitive numbering 🧚

each primitive in the Boolean formula gets assigned a unique solid number in brackets (e.g. [3]). the same primitive used across multiple regions is assigned the same number if the accumulated transformation matrix is identical β€” a different transformation produces a different number. that uniqueness is tracked via a temporary file at /tmp/mged_discr πŸ‘€


πŸ”₯ EXAMPLES πŸ”₯

⭐ Example 1. Write a regions summary for two groups

mged> regions regions_file group1 group2

writes a region and Boolean member summary for all regions reachable from group1 and group2 to regions_file. the result string reports how many primitives and regions were processed. slay.

⭐ Example 2. Write a summary for a specific top-level object

mged> regions hull_report.txt vehicle.c

writes the regions table for all regions under vehicle.c to hull_report.txt. iconic, honestly.


🌸 SEE ALSO 🌸

  • idents(nged)
  • solids(nged)

iykyk πŸ’«


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” legends, fr fr.


πŸ’€ BUG REPORTS πŸ’€

reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org πŸ“§ (yes, actual email, very retro of them, we love it)


okay that's the whole page bestie, go forth and summarise those regions πŸ’œ this was REGIONS(nged) from the BRL-CAD manual β€” version vibes courtesy of the BRL-CAD release, so check your local install for the exact date. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from