DBUPGRADE(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’Ύ 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_colortable global 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 πŸ’ͺ. normally dbupgrade halts 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 πŸŽ€


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