MOVE(nged)

rename a database object

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… MOVE(nged) β€” the BRL-CAD glow-up where your object gets a new name

okay so bestie, welcome to the move page from the BRL-CAD User Commands lineup πŸŽ€ this one is genuinely so simple and so iconic β€” it's the rename era.


✨ NAME ✨

move, mv β€” rename a database object. that's it. that's the whole job. πŸ¦‹


✨ SYNOPSIS ✨

move from to
mv from to

✨ DESCRIPTION ✨

The move command (which also goes by mv, because aliases are a vibe πŸ’…) renames an existing database object from from to to. And like β€” this is a pure rename operation, no cap. The object's geometry is completely unchanged; only its name in the database directory gets updated. nothing else. the geometry is not bothered. it's living its truth. 🌸

Here's the little step-by-step of what the command actually does, bestie:

  1. Looks up from in the database; returns an error if it does not exist.
  2. Verifies that to does not already exist; returns an error if it does.
  3. Reads the object's internal data, renames it in the in-memory directory via db_rename, then writes it back under the new name.
  4. Updates the current display list: if the top-level path element of any displayed object matches from, it is updated to to so the display remains consistent.

like, step 4 is the underrated main character honestly β€” your view stays coherent because it does that. πŸ‘‘


πŸ”₯ EXAMPLES πŸ”₯

Example 1. Rename an object

mged> move old_name.s new_name.s

Renames the solid old_name.s to new_name.s in the database. glow-up complete, bestie ✨

Example 2. Using the mv alias

mged> mv wing_left.r wing.r

Renames wing_left.r to wing.r. The mv alias is equivalent to move β€” same energy, shorter typing. 🫢

Example 3. Attempting to rename to an existing name

mged> move box.s sphere.s
sphere.s: already exists

Returns an error if sphere.s already exists in the database. And the original box.s is left unchanged β€” no damage done, we love a safe failure πŸ’€


✨ AUTHOR ✨

BRL-CAD Team πŸ‘‘


πŸŽ€ BUG REPORTS πŸŽ€

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. if something's acting up, tell the team, they're on it fr fr πŸ“§


lowkey reminder: this whole thing is a rename and only a rename. don't go expecting geometry magic. the geometry is untouched and unbothered, periodt. πŸ’…

made with love under the BRL-CAD banner β€” page MOVE(nged), brought to you by the BRL-CAD folks, from the BRL-CAD User Commands collection πŸ¦‹πŸ’–

πŸ“¦ where this page comes from