RMAP(nged)

return a mapping of region IDs and air codes to region names

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… RMAP (nged) β€” the nged manual, bestie edition πŸŽ€

okay so you found the nged corner of the BRL-CAD User Commands manual, and this one is literally the region-ID gossip column. sit down, grab a strawberry πŸ“, we're mapping.


✨ NAME ✨

rmap β€” return a mapping of region IDs and air codes to region names πŸ’–

like, it tells you which region names are sharing the same ID. the group chat roster of your geometry, basically.


✨ SYNOPSIS ✨

    rmap

no args. no flags. no drama. she simply runs. 🫢


🌸 DESCRIPTION 🌸

okay so rmap scans every non-hidden region in the current database and hands you back a mapping from region ID (or air code) β†’ region names. that's it, that's the whole vibe.

bestie, quick housekeeping πŸ™ˆ: this command takes no arguments, and it requires a database open in version 5 format or later. no db, no mapping. periodt.

the output is a space-separated list of entries, each one looking like this:

    id { name1 name2 ... }

where id is the region ID or air code identifier, and the braced list holds all the region names that share that ID. regions with the same region_id get grouped together β€” they're literally holding hands in the same braces πŸ’….

air codes are represented as negative values (-aircode) in the output, so you can tell them apart from positive region IDs. it's giving "negative numbers are the air girlies" ✨.

hidden regions (flagged with RT_DIR_HIDDEN) are silently excluded from the output. no warning, no note, they just don't get invited to the party πŸ’€.

so what is this even for? glad you asked, bestie πŸ‘‘:

  • auditing ID assignments β€” know exactly who's who
  • detecting conflicts where multiple regions share the same region ID (the crossover episode nobody wanted 😭)
  • scripting region-ID-based operations β€” feed it straight into your Tcl, iykyk

πŸ”₯ EXAMPLES πŸ”₯

Example 1. List all region ID mappings

    mged> rmap

        1000 { hull.r } 1001 { bow.r stern.r } -5 { waterline_air.r } 1002 { keel.r }

this returns a mapping of all non-hidden region IDs (and air codes as negative values) to the region names that use them. in this example, region ID 1001 is shared by two regions, and -5 is an air region. see how bow.r and stern.r are in the same braces? twins fr fr πŸ¦‹

Example 2. Find regions sharing a region ID

    mged> set m [rmap] mged> array set ids $m mged> set ids(1001)

this uses the Tcl-list output as an array to look up which regions share ID 1001. since the output is formatted as Tcl key-value pairs, it can be consumed directly with array set. no parsing gymnastics required β€” she's pre-formatted, iconic πŸŽ€


πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team β€” the main characters who wrote this 🌈


πŸ™ˆ BUG REPORTS πŸ™ˆ

reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β€” don't gatekeep the bugs, tell the devs 🫢


and that's the page! footer duties: this is BRL-CAD, the RMAP(nged) page, from the BRL-CAD User Commands manual. mwah, go audit those region IDs bestie πŸ’‹β­

πŸ“¦ where this page comes from