CONCAT(nged)
merge objects from an external database file into the current database
β¨ CONCAT π
(from the nged manual)
okay bestie so this page is all about concat, one of the BRL-CAD User Commands, and honestly it's giving "glow-up for your database" energy π
π NAME π
concat β merge objects from an external database file into the current database. that's it. that's the vibe. π¦
πΈ SYNOPSIS πΈ
concat [options] file.g [affix]
π DESCRIPTION π
okay so picture this: concat reads geometry objects out of the external BRL-CAD database file.g and merges them, like, straight into the database you currently have open. iconic behavior honestly π
here's the drama though β what if a name collision happens between an incoming object and one that already exists? π by default concat just automatically generates a unique name for the incoming object, no stress, no tears. that is, UNLESS you use -O to overwrite. then it's on sight π
you can also pass an optional affix string to slap a prefix or suffix onto incoming object names. the -p and -s flags are the ones in charge of whether that affix goes on the beginning or the end of each name. and by default (that's with -L), the affix is only applied lazily β like, only to names that actually conflict. without -L, the affix goes on every single incoming name. every one. no exceptions π«Ά
β Options β
-h,--helpβ print help and exit. your little escape hatch π-O,--overwriteβ overwrite existing objects when names conflict, instead of generating a shiny new unique name. bold move, love that for you π₯-cβ use the incoming database's region color table instead of the current database's. aesthetic upgrade β¨-p,--prefixβ apply the affix string to the beginning of incoming object names (prefix mode, obviously π )-s,--suffixβ apply the affix string to the end of incoming object names (suffix mode, also obviously π )-L,--lazy-affixβ apply the affix only when needed to resolve name conflicts, not to every incoming name. without this flag, the affix gets applied to all names whenever an affix is provided. lowkey the chill option π-tβ use the incoming database's title string instead of the current database's title.-uβ use the incoming database's unit settings instead of the current database's units. units matter, bestie, no cap π
π¦ EXAMPLES π¦
Example 1. Merge a database without renaming
mged> concat other.g
merges all objects from other.g into the current database. any name collisions get resolved by automatically incrementing names. easy, breezy π
Example 2. Merge with a prefix applied to all incoming names
mged> concat -p other.g imported_
merges all objects from other.g, prefixing every incoming name with imported_. so like, hull.r becomes imported_hull.r. the way that just works ππ
Example 3. Merge with a suffix applied lazily on conflict only
mged> concat -s -L other.g _v2
merges objects from other.g, appending _v2 only to names that collide with existing objects. minimal effort, maximum slay πΈ
Example 4. Overwrite on conflict
mged> concat -O other.g
merges other.g, silently overwriting any existing objects with the same name. silent but deadly π
Example 5. Merge and use the incoming color table and units
mged> concat -c -u other.g
merges other.g and adopts its color table and unit settings. new db, new me π§
π SEE ALSO π
dbconcat(nged), keep(nged) β go read those too, iykyk π«Ά
π AUTHOR π
BRL-CAD Team β legends, fr fr π
β BUG REPORTS β
found a bug? a problem? something cursed? π reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. they want the tea, bestie π
and that's the whole page!! this iconic little writeup lives in BRL-CAD, source/version BRL-CAD, dated alongside the CONCAT(nged) header β mwah, go merge something beautiful π β¨π
π¦ 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