EDIT_TRANSLATE(nged)
Translate (move) one or more objects in the database.
Hey bestie, welcome to EDIT_TRANSLATE(nged) from the BRL-CAD User Commands fam. This is the page for edit translate and its alias edit tra β aka the move-it-move-it command. If you've ever wanted to yeet one or more objects to a new spot in the database, this is your girlie. π
β¨
πΈ NAME πΈ
edit translate, edit tra β translate (move) one or more objects in the database. Slay.
π¦ SYNOPSIS π¦
edit [options] geometry translate [-a|-r] [-x|-y|-z] [-k FROM] TO
edit [options] geometry translate [-a|-r] [-x|-y|-z] [-k FROM]
{x [y [z]]} | {OBJECT}
edit [options] geometry tra X Y Z
where a TO or FROM argument has the form:
{x [y [z]]} | OBJECT_NAME | "."
π DESCRIPTION π
Bestie, this command is used to move one or more instances of primitive or combination objects to a new position. OBJECTs are translated by a vector from FROM to TO. Itβs giving βglow-up but make it spatial.β π¦
OFFSET_DIST is always a relative distance from the objectβs current position. TO_POS may be either an absolute position (-a) or a relative distance (-r) from FROM. When no -k FROM is given, the relative mode operates directly on the objectβs current keypoint β the bounding-box center by default. No cap.
Any *_OBJECT argument may be set to ., which causes each individual OBJECT to be used in its place β a batch operation if there is more than one OBJECT supplied on the command line. Thatβs the group-chat βall of yβallβ energy. π
The alias tra is a shorthand for translate -r and accepts exactly three coordinate values X Y Z with no flags. Periodt.
Global options (-S, -f, -F, -i) are described in edit(nged). Go check that page for the extra tea. β
β¨ OPTIONS β¨
-aβ InterpretTOas an absolute position in model space. Required ifTOis an object name rather than a coordinate vector. This is the default when-k FROM_OBJECTis given (i.e., the object is moved so that itsFROMkeypoint coincides with theTOposition). Iconic absolute-position behavior. π-rβ InterpretTOas a relative delta from the current keypoint orFROMposition. This is the default when no-kis given. Thatβs the βjust nudge it a lilβ mode. π-x,-y,-zβ Restrict the translation to the specified axis only. Only the nominated axis coordinate ofTOis applied; the remaining axes stay at their current values. Multiple axis flags may be combined. Coordinate lock-in, iykyk. π-k FROM_COORDS | FROM_OBJECTβ Set the reference keypoint (FROMposition).FROMaccepts:- A numeric coordinate triple
x y z(1 or 2 values are broadcast to a 3-vector). - An object name β its bounding-box center is used.
- The batch marker
.β causes each target object to use its own current keypoint asFROM. Useful for per-object relative moves:translate -k . -a target.saligns each object individually.
- A numeric coordinate triple
When-kis supplied together with aTOreference, the deltaFROMβTOis applied to the target object (rather than moving it to an absolute position directly). Big βreference point first, move secondβ behavior. π«
-nβ Use the natural origin of*_FROM_OBJECTor*_TO_OBJECTrather than the default bounding-box center. Natural origin, not the default center β got it. πΈTOβ The destination. May be:- A coordinate triple
x y z(absolute if-a, relative if-r). - A single scalar combined with an axis flag (e.g.,
-a -z 7.8). - An object name (moves to that objectβs keypoint; use
-afor clarity). - The batch marker
.β each target object uses its own current keypoint asTO. Combined with-k FROM_COORDS, this computes a per-object delta of(own_keypoint - FROM_COORDS), enabling an explosion-from-point effect. Literally boom. π₯
- A coordinate triple
π₯ EXAMPLES π₯
The page marks this bit with == EXAMPLES, and honestly, the examples are the main characters. π
Example 1. Translate sph.s to absolute position (15, 0, 0)
mged> edit sph.s translate -a 15 0 0
Example 2. Move sph.s by a relative delta of (+5, 0, 0)
mged> edit sph.s translate -r 5 0 0
Using the tra alias (always relative):
mged> edit sph.s tra 5 0 0
Example 3. Move sph.s from its center to other.sβs center (object-name form)
The -k sph.s -a other.s form computes the delta between the two keypoints and applies it:
mged> edit sph.s translate -k sph.s -a other.s
The same delta can also be specified with coordinate positions for -k:
mged> edit sph.s translate -k 10 0 0 -a other.s
Or with an explicit coordinate destination:
mged> edit sph.s translate -k 10 0 0 -a 20 0 0
Example 4. Align only the Z coordinate of obj to a target elevation of 7.8
mged> edit obj translate -a -z 7.8
Example 5. Align several objects to the same Z elevation β using a reference object
Set the Z coordinate of obj1 and obj2 to ref.sβs Z elevation while leaving X and Y unchanged:
mged> edit obj1 translate -a -z ref.s
mged> edit obj2 translate -a -z ref.s
The -a -z OBJ form extracts the Z component of ref.sβs keypoint (its bounding-box center) and applies it absolutely, keeping the targetβs own X and Y. Multiple axis flags can be combined:
mged> edit obj1 translate -a -x -z ref.s
This copies both the X and Z of ref.s into obj1, leaving Y unchanged. Selective copy-paste but spatial. π
Example 6. Move a pair of objects away from the origin (explosion effect)
Each object is moved by a delta equal to its own current position vector, doubling its distance from the origin. Use the . batch marker as TO and 0 0 0 as FROM:
mged> edit sph.s translate -k 0 0 0 .
mged> edit other.s translate -k 0 0 0 .
For sph.s at (10,0,0): FROM=(0,0,0), TO=own_keypoint=(10,0,0), delta=(10,0,0), result=(20,0,0) β doubled distance from origin. Math ate. π₯
Equivalently with explicit deltas (when positions are known):
mged> edit sph.s translate -r 10 0 0
mged> edit other.s translate -r 20 0 0
Example 7. Move a set of objects so that the assembly origin aligns with target.s
mged> edit assembly translate -k assembly -a target.s
Example 8. Translate along a path (move a subpart without disturbing the parent)
Using a slash-separated path to name the instance:
mged> edit assembly/subpart/sph.s translate -r 0 0 10
Example 9. Use the intermediate buffer: translate tentatively, then revert if unsatisfied
Create a checkpoint (snapshot to revert to):
mged> edit tor.s checkpoint
Apply a tentative translation (stays in buffer only):
mged> edit -i tor.s translate -r 5 0 0
If satisfied, write to disk:
mged> edit tor.s translate -r 0 0 0
If not satisfied, roll back to the checkpoint:
mged> edit tor.s revert
Tentative vibes only until you commit. π
Example 10. Operate on the active selection instead of naming objects explicitly
With objects already selected in the viewer:
mged> edit translate -a 10 0 0
Force the command-line specifier to override the selection:
mged> edit -f sph.s translate -a 10 0 0
π SEE ALSO π
edit(nged), edit rotate(nged), edit scale(nged), translate(nged), ptranslate(nged)
π AUTHOR π
BRL-CAD Team
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org
Okurrr, footer sign-off time, bestie: source/version is BRL-CAD, manual name is EDIT TRANSLATE(nged), and thereβs no date printed on this one β so thatβs literally all the footer gives. Byeee ππ¦β¨
π¦ 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