DBUPGRADE(1)
πΎ DBUPGRADE(1) β the BRL-CAD glow-up page π
okay so bestie, welcome to the dbupgrade manual page (that's the DBUPGRADE(1) of the BRL-CAD manual set, iykyk). Sit down, grab a strawberry drink π, and let's get your old geometry database looking like it's from this decade β¨
πΈ NAME πΈ
dbupgrade β upgrades a BRL-CAD geometry database to the current version. it's giving makeover montage, fr fr.
π SYNOPSIS π
dbupgrade [-f] [-r] [-h] [-?] input.g output.g
that's it. that's the whole vibe. two files and some optional flags π¦
π§ DESCRIPTION π§
so here's the tea β: dbupgrade reads an older BRL-CAD geometry database (input.g), upgrades it to the current database version (v5), and writes the result out to a brand-new file (output.g).
key deets you cannot skip, bestie:
- the input is opened read-only and is never modified β your original is safe, periodt π
- the output file must not already exist. like, it's not gonna overwrite anything, so don't even try π
now, why is v5 so iconic? because the v5 database format is platform-independent π. which means upgrading literally eliminates the need to use g2asc(1) and asc2g(1) to transfer databases between different computer architectures. no more middleman, no cap.
and it's not just the on-disk format getting a glow-up β dbupgrade also converts obsolete geometry types and properties:
- Heightfields (HF) β displacement maps (DSP) π¦
- Polysolids (POLY) β bag-of-triangles (BOT) π«
- NURB B-splines (BSPLINE) β boundary representations (BREP) π
and the legacy glow-up continues:
- old
"plastic"shader names get rewritten as"phong"π - any v4 material color table gets migrated into the
regionid_colortableglobal attribute π
π real talk though: objects that fail to convert are reported on standard error, and the remaining objects are still written. so one flop doesn't take down the whole show. main character resilience.
β¨ OPTIONS β¨
-fβ force the operation πͺ. normallydbupgradehalts with a warning if the input is already at the current version (an upgrade) or is not v5 (a revert). this option forces the conversion to proceed anyway (e.g. v5 to v5, applying only the geometry-type updates). it's the "i said what i said" flag.-rβ revert the database to the older v4 format instead of upgrading π. the input must be a v5 database (unless combined with-f). objects that have no v4 equivalent are skipped and reported. it's giving throwback era.-h,-?β print a usage message and exit βΉοΈ. the "just tell me how this works" option, and honestly? valid.
π EXAMPLES π
Example 1. Upgrade an old database to the current format
dbupgrade legacy_v4.g model.g
Reads the v4 database legacy_v4.g and writes a current v5 database model.g, converting any heightfields, polysolids, and B-splines along the way. glow-up complete, obsessed π«Ά
Example 2. Refresh a current database in place of obsolete geometry
dbupgrade -f model.g model_updated.g && mged model_updated.g
Forces dbupgrade to rewrite the already-v5 model.g, applying the internal geometry-type conversions (for example, polysolids to BOTs) even though the format version does not change, then opens the result in mged(1). okay but the && chaining? that's main character energy π₯
π SEE ALSO π
brlcad(1), mged(1), g2asc(1), asc2g(1) β go read those too, bestie, they're literally the friend group π
π DIAGNOSTICS π
Numerous error conditions are possible, usually due to errors in the geometry database. Descriptive messages are printed on standard error (file descriptor 2), and a count of objects that failed to convert is reported when finished. so yeah, you'll get a little report card at the end π β not mean, just honest.
π AUTHOR π
BRL-CAD Team β the icons behind the whole thing π
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. yes, seriously, that long π
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org π§. don't suffer in silence, bestie β tell the devs.
and that's the page!! πΈ this was the DBUPGRADE(1) manual page from the BRL-CAD collection β you're all caught up, go forth and upgrade responsibly π¦β¨π
π¦ 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