OTRANSLATE(nged)
translate a database object by a displacement vector
okay so this is the OTRANSLATE(nged) page from the BRL-CAD User Commands set, and bestie, itβs literally the βmove a whole database objectβ manual. π
β¨
πΈ NAME πΈ
otranslate β translate a database object by a displacement vector. π¦
β SYNOPSIS β
otranslate obj dx dy dz
π DESCRIPTION π
Okay so otranslate translates the database object obj by the displacement vector (dx, dy, dz) in local units. The objectβs geometry is modified and written back to the database. Main character direct-edit energy, no cap. π
The displacement vector is converted from local units to base units (millimeters) internally via dbi_local2base before the translation matrix is constructed. That means the values supplied must always be in the current database local unit (e.g. inches, millimeters). No sneaky unit mixing, okay? π«Ά
The translation matrix (dmat) is built using MAT_DELTAS_VEC and then composed with the objectβs path transform so that the displacement is applied correctly in model space regardless of any parent combination transformations. The transform pipeline used is:
emat = invXform Γ dmat Γ xform
The resulting effective matrix is applied to the objectβs internal representation via GED_DB_GET_INTERN, and the modified object is written back with GED_DB_PUT_INTERN.
π Plot twist: unliketranslate,otranslateapplies the displacement to the object directly, not to the path matrix. Thatβs the whole difference, and it ate. π
π§ EXAMPLES π§
Example 1. Translate an object along the X axis
mged> otranslate box.s 50 0 0
Moves box.s 50 local units in the positive X direction. Slay. β¨
Example 2. Translate diagonally
mged> otranslate part.s 10 -5 20
Displaces part.s by the vector (10, -5, 20) in local units, moving it simultaneously along all three axes. Diagonal icon behavior. π
Example 3. Move an object back to the origin neighborhood
mged> otranslate widget.s 0 0 -100
Moves widget.s 100 local units in the negative Z direction. Bye-bye, Z. πΈ
π AUTHOR π
BRL-CAD Team β iconic. π
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. Do it, bestie β the maintainers want the tea. β
Source/version + date sign-off: BRL-CAD, page OTRANSLATE(nged). Thereβs no date on the footer, so thatβs the whole story β no date shown, 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