DBCONCAT(nged)
Concatenates an existing BRL-CAD database to the database currently being edited.
π
DBCONCAT π
(a.k.a. the nged girlies' favorite copy-paste moment)
okay so bestie, real talk: this is a BRL-CAD User Command and it lives inside nged. It's the "bring your whole other database over here" command. Slay.
β¨ NAME β¨
dbconcat β concatenates an existing BRL-CAD database to the database you're currently editing. that's it. that's the whole vibe. π
π¦ SYNOPSIS π¦
dbconcat [-h] [-t] [-u] [-c] [-s|-p] [-L] [-O] {database_file} [affix]
dbconcat [--help] [--lazy-affix] [--overwrite] [--prefix] [--suffix] {database_file} [affix]
two forms, same energy. short flags or long flags, pick your fighter. β¨
πΈ DESCRIPTION πΈ
So you want to merge an existing BRL-CAD database into the one you're currently editing? iconic. dbconcat does exactly that.
But here's the thing, and this is highkey important β every BRL-CAD object needs a unique name. so this command has, like, rules. naming rules. defined ones. it'll automatically rename conflicting objects as they get merged in. no cap. π
If conflicting names show up, by default the command adds computer-generated prefixes or suffixes to the object names coming from the incoming database_file. cute, right?
Now. if you'd rather just overwrite the current objects, you can pass the -O option and the whole behavior changes: every incoming object overwrites an original object when there's a conflict. But bestie. listen to me.
β οΈ using -O is destructive β old geometry is not preserved when it gets overwritten. only use this when your whole intent is to NOT preserve the original data. do not come crying to me later. π
Alternatively, if you supply an affix string, then objects from the incoming database_file get that affix added to their names as a prefix (that's the default, or if you specify -p), or as a suffix (if you specify -s). and by default this string gets added to ALL incoming object names β but if -L is specified in either mode, the affix string is only used when resolving name conflicts. lazy but make it fashion. π
The other options are all about whether or not to preserve incoming metadata, like title, units, and the region color table. yes queen, your metadata matters. π
π OPTIONS π
-h,βhelpβ prints help and dips. that's it. goodbye. π-L,βlazy-affixβ apply the affix (prefix or suffix) only when trying to resolve name conflicts. lowkey efficient.-O,βoverwriteβ overwrite objects in the current.gfile when incoming object names conflict. (WARNING: this option is destructive β old data is replaced by new.) π-cβ means the region color table of the database you're currently editing gets replaced with the one fromdatabase_file. give it a glow-up. π-p,βprefixβ use the supplied affix string as a prefix when reading in object names. (this is the default, bestie.) β-s,βsuffixβ use the supplied affix string as a suffix when reading in object names. π-tβ means the title of the database you're currently editing gets replaced with the one fromdatabase_file. π-uβ means the units of the incomingdatabase_filebecome the units of the database you're currently editing. consistency is key. β¨
π₯ EXAMPLES π₯
okay this first one is the classic: copy all objects from a particular database into the current database. and bonus, it shows how to add a particular prefix to every object copied.
Example 1. Copy objects in a specified database to the current one and lazily apply a prefix to the copied objects. π§
mged>dbconcat -L model_two.g two_
Copies all the objects in model_two.g to the current database, using the specified prefix two_ to attempt to resolve name conflicts. and if there's still a conflict even with the prefix applied? standard rules keep on applying for additional name generation. the grind never stops. π
Another example β this one imports the title, units, color table, and all the objects of a database file into the current database. it's especially useful if the current database is empty or was just created by mged. fresh start energy. π±
Example 2. Copy an entire database, including title, units, and color table, to the current database without any affix π¦
mged>dbconcat -t -u -c model_two.g
Copies all the objects in model_two.g to the current database, including the title, units, and color table. No suffix or prefix is added to the object names. clean. minimal. iconic. π€
Example 3. Copy a database, overwriting objects in the current databse π
mged>dbconcat -O model_two.g
Copies all the objects in model_two.g to the current database. No object names are changed while conflicts in the current database are overwritten with objects from model_two.g. (yes, databse. we don't gatekeep typos here. π«Ά) and again β overwriting means the old stuff is gone. you've been warned. π₯
π AUTHOR π
BRL-CAD Team β the main characters, honestly.
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. pls be nice to them, they're doing great. π
go forth and concatenate, bestie. your databases are gonna look so good together. π β¨
β brought to you by the BRL-CAD girlies, page DBCONCAT(nged), BRL-CAD build, mwah π
π¦ 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