COPY(nged)
copy a database object to a new name
π
COPY(nged) β the copy / cp page, bestie edition π
okay so this is the <pink>copy</pink> page from the BRL-CAD user commands manual (that's the <purple>nged</purple> one, yes) and honestly? it's giving "small command, big slay." let's get into it β¨
β¨ NAME β¨
copy, cp β copy a database object to a new name. that's it. that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
copy from to
cp from to
two words in, one object out. iconic behavior fr fr π
π DESCRIPTION π
so the copy command (which also answers to cp, they're literally the same bestie) takes the database object named from and duplicates it, storing the copy under the name to. the copy is an exact binary duplicate of the source object β it preserves its type, its geometry, and all its attributes. no notes. perfect clone. π
now, the rules, because there are rules:
- exactly two arguments are required. exactly two. not one, not three. two. π
- the source object from must exist in the database. if it doesn't, we're not doing this.
- the destination name to must not already exist β like, attempting to copy to a name that's already taken returns an error. so check the name first, bestie, don't just yolo it. π
the good news? all object types can be copied: primitive shapes, combinations, regions, and external objects. every single one. no discrimination. π«Ά
β οΈ important note, pay attention, this one matters:copyperforms a shallow copy. if from is a combination, the copy has the same tree structure and references the same member objects. the members themselves are not duplicated. if you actually want a deep copy of a whole hierarchy, usexpushor reconstruct it manually. don't say i didn't warn you π
π EXAMPLES π
Example 1. Copy a primitive shape
mged> copy sph.s sph_copy.s
creates an exact duplicate of sph.s named sph_copy.s. simple. clean. slayed. β¨
Example 2. Copy a combination
mged> cp vehicle.c vehicle_backup.c
duplicates the combination vehicle.c as vehicle_backup.c. the new combination references the same member objects as the original β shallow copy hours, remember? π
Example 3. Copy then modify the copy
mged> copy hull.r hull_modified.r
mged> sed hull_modified.r
copies hull.r to hull_modified.r, then opens the copy in the solid editor for modification without affecting the original. this is the self-care workflow. edit the copy, leave the original unbothered. π
π¦ SEE ALSO π¦
move(nged)rename(nged)xpush(nged)β the one you want for deep copies, iykyk
π AUTHOR π
the BRL-CAD Team. legends only. π
π§ BUG REPORTS π§
found a bug or a problem? don't suffer in silence β reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. they literally want to hear from you. π¬
and that's the page! π cute little sign-off: this was <lavender>COPY(nged)</lavender> from the BRL-CAD user commands manual set (the footer line, bestie β BRL-CAD, COPY(nged), that one). go forth and duplicate responsibly. periodt. π
β¨πΈπ
π¦ 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