OROTATE(nged)
rotate a database object about a keypoint
๐ OROTATE โ the glow-up command for your geometry (nged)
Okay bestie, so you're in mged and you want to spin an object around like it's on a rotisserie ๐
โ that's orotate. It lives in the nged manual, and it's literally the "rotate a database object about a keypoint" command. No cap.
โจ SYNOPSIS โจ
orotate obj rX rY rZ
orotate obj rX rY rZ kX kY kZ
๐ DESCRIPTION ๐
So here's the tea โ: orotate rotates the database object obj in place by the Euler angles rX, rY, rZ (in degrees ๐), applied about a keypoint. The object's geometry gets modified and written straight back to the database. It's giving "permanent makeover," not "temporary filter," iykyk.
The two forms differ only in how the rotation keypoint gets figured out:
- No keypoint (just
rX rY rZ, bestie): the keypoint is automatically computed as the center of the object's bounding box โ that's the midpoint ofrpp_minandrpp_max. And the bounding box? It's computed by tracing the object's full hierarchy. She did the research. ๐ - With an explicit keypoint (
kX kY kZ): the keypoint is the given model-space coordinate in local units. The object is looked up directly by name, and the identity matrix is used for the path transform. Simple, direct, main character energy. โจ
The rotation itself is built from the three Euler angles via bn_mat_angles(rmat, rX, rY, rZ), and then it's transformed about the keypoint using bn_mat_xform_about_pnt. That resulting matrix gets applied to the object's internal representation and written back to the database. Math slay. ๐งฎ๐
๐ธ EXAMPLES ๐ธ
Example 1. Rotate an object about its own center
mged> orotate wheel.s 0 0 45
Rotates wheel.s by 45ยฐ about the Z axis, using the object's bounding box center as the keypoint. She's spinning on her own axis, periodt. ๐
Example 2. Rotate about an explicit keypoint
mged> orotate arm.s 0 30 0 0 0 0
Rotates arm.s by 30ยฐ about the Y axis, pivoting about the model origin (0, 0, 0) as the keypoint. Origin pivot, iconic. ๐ซ
Example 3. Rotate about an off-center pivot point
mged> orotate blade.s 15 0 0 0 50 100
Rotates blade.s by 15ยฐ about the X axis, using the point (0, 50, 100) in local units as the pivot. Off-center and unbothered. ๐ชโจ
๐ AUTHOR ๐
BRL-CAD Team โ the whole squad. ๐ซถ
๐ BUG REPORTS ๐
Found a bug or a problem? Don't suffer in silence, bestie ๐ญ โ reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. They want the receipts, fr fr. ๐ง
Heads up, gorgeous: this command modifies the object's geometry and writes it back to the database. So likeโฆ the glow-up is permanent. Maybe double-check your angles before you commit. ๐ ๐
That's the whole page, angel ๐ โ brought to you by BRL-CAD (that's the source/version tagging along at the bottom of the original, along with the OROTATE(nged) label up top). Go forth and rotate responsibly. ๐ฆ๐
๐ฆ 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