OPENDB(nged)

Open a BRL-CAD database and make it current.

πŸ“… published 7.44.0, from nixpkgs unstable

okay so this is the opendb page from the nged manual β€” that’s the BRL-CAD User Commands zone, bestie πŸ’…. It’s literally here to open a BRL-CAD database and make it current, and it also tells you which database is already open. Let’s get into it 🫢

🌸 NAME 🌸

  • opendb β€” Open a BRL-CAD database and make it current. Periodt. πŸ’–

✨ SYNOPSIS ✨

opendb
opendb [-c] [-f] [-h] [-o] filename
opendb [--create] [--flip-endian] [--help] [--open] filename

πŸŽ€ DESCRIPTION πŸŽ€

With no filename argument, opendb reports the path of the currently open database. If no database is open, it reports that state instead β€” no fake path, just the truth πŸ’―.

When you do supply a filename, opendb closes any currently open database and opens the requested database file. Clean swap, main character energy πŸ”₯.

By default, opendb is willing to create a new database if the requested file does not already exist. If you want to require that the file already exist, use -o or --open β€” that’s the β€œbestie, it better already be there” mode πŸ’….

If -f or --flip-endian is supplied and the target file is a v4 database, the file is treated as a binary-incompatible database and opened with flipped endianness. This is useful for legacy v4 databases created on incompatible platforms. When such flipping is applied, the database is made read-only. Important caveat, no cap: that read-only thing is real, so don’t expect to write into it after flipping 🚨.

πŸ¦‹ OPTIONS πŸ¦‹

  • -c, --create β€” Allow creation of a new database if filename does not already exist. This is the default behavior and overrides -o. Yes bestie, it overrides -o β€” icon behavior πŸ‘‘.
  • -f, --flip-endian β€” Treat a v4 database as a binary-incompatible file and flip its endianness on open. Ignored for non-v4 databases. πŸ¦‹
  • -h, --help β€” Print command help. Simple, iconic, always there for you πŸ’–.
  • -o, --open β€” Require that filename already exist and open only that file. No creating, no surprises πŸŽ€.

🌈 EXAMPLES 🌈

Example 1. Open an existing database. ✨

mged> opendb -o model.g

Closes the current database, if any, and opens the existing model.g file. Slay 🫢.

Example 2. Report the currently open database path. πŸ’…

mged> opendb

Returns the name of the current database file. That’s it, that’s the vibe πŸ’–.

Example 3. Open a legacy v4 database with forced endian flipping. πŸ¦‹

mged> opendb -f legacy_v4.g

Opens legacy_v4.g as a binary-incompatible v4 database. If flipping is applied, the database is opened read-only. Read-only warning stays loud: no writey-write after flip, bestie 🚨.

πŸ‘‘ SEE ALSO πŸ‘‘

  • open(nged)
  • closedb(nged)
  • reopen(nged)
  • dbupgrade(nged)

πŸ“ AUTHOR πŸ“

BRL-CAD Team πŸ’œ

πŸ› BUG REPORTS πŸ›

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. If something’s cooked, tell the devs, bestie πŸ“¬.


xoxo, BRL-CAD Β· OPENDB(nged) β€” source/version vibes handled, and no date is printed on this page, so consider this your timestamp-free sign-off πŸ’…πŸŽ€

πŸ“¦ where this page comes from