RMAP(nged)
return a mapping of region IDs and air codes to region names
π
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
- 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