ROTATE_ARB_FACE(nged)

rotate a face of an ARB primitive about a fixed vertex

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… ROTATE_ARB_FACE β€” the nged glow-up for your ARB faces ✨

okay so bestie, welcome to rotate_arb_face(nged), a BRL-CAD user command, and honestly? it's giving "surgical face-lift but for geometry" πŸŽ€

✨ NAME ✨

rotate_arb_face β€” rotates one single face of an ARB primitive about a fixed vertex πŸ¦‹ (yes, about a fixed vertex, that part is the whole vibe, do not lose it)

🌸 SYNOPSIS 🌸

rotate_arb_face arb face pt "rx ry rz"

πŸ’– DESCRIPTION πŸ’–

So here's the tea β˜•: rotate_arb_face takes a specified face of an ARB (arbitrary polyhedron) primitive and rotates it by applying Euler rotation angles to that face's plane normal β€” while keeping the face anchored at a vertex you pick. Then the modified ARB gets written back to the database. no cap, that's it, that's the whole thing πŸ’«

The command needs exactly four arguments, no more no less, like a group chat with a strict member limit:

  • arb β€” the name of the ARB primitive you're modifying. Path prefixes are totally fine; the trailing component name is what gets used. it must be an ARB type, so ARB4–ARB8 only, no impostors πŸ™ˆ
  • face β€” the face index to rotate, as an integer from 1 to 6. the valid range depends on the ARB type you're working with, so check yourself before you wreck yourself πŸ’€
  • pt β€” the vertex index that acts as the fixed anchor point for the rotation, as an integer from 1 to 8. the face's plane gets rotated about this vertex so it stays locked in space πŸ”’
  • "rx ry rz" β€” a single quoted string of three floating-point rotation angles in degrees (X, Y, Z Euler angles). the face normal is rotated by this amount using bn_mat_angles, and then the face's plane equation gets re-anchored at the fixed vertex 🧚

πŸŒ€ ARB type constraints and special cases πŸŒ€

It accepts all the standard ARB types β€” ARB4, ARB5, ARB6, ARB7, ARB8 β€” iconic lineup honestly πŸ‘‘. But the face index and vertex index must be valid for the specific ARB type you're using. and there are special vertex remapping rules for the degenerate ARB types, so pay attention bestie:

  • ARB4: vertex indices β‰₯ 3 (1-indexed) get remapped to index 4 internally.
  • ARB6: vertex indices β‰₯ 5 get remapped to index 6 internally.
  • ARB7: if the specified face contains vertex 5, the anchor is automatically forced to vertex 5 no matter what index you actually provided. like, the command said "I got this" πŸ’…

After the face plane is rotated and re-anchored, all the ARB vertices are recomputed from the new set of plane equations. full rebuild, main character energy πŸ”₯


πŸ’œ EXAMPLES πŸ’œ

Example 1. Rotate face 1 of an ARB8 by 10Β° about vertex 1

mged> rotate_arb_face arb8.s 1 1 "10 0 0"

Rotates face 1 of arb8.s by 10° about the X axis, anchored at vertex 1. the face's plane normal is rotated and re-anchored, and all the other ARB vertices get recomputed. slay ✨

Example 2. Tilt a face of an ARB6

mged> rotate_arb_face wedge.s 2 3 "0 15 0"

Rotates face 2 of the ARB6 primitive wedge.s by 15Β° about the Y axis, keeping vertex 3 fixed. cute and stable πŸŽ€


🌈 AUTHOR 🌈

BRL-CAD Team β€” the OGs, we love them 🫢

😭 BUG REPORTS 😭

Found a bug? a problem? something cursed? 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, fr fr)


ok that's the whole page, no gatekeeping here πŸ’–

and that's a wrap bestie!! this page is brought to you by BRL-CAD β€” ROTATE_ARB_FACE(nged), the BRL-CAD User Commands manual 🌸 go rotate something gorgeous πŸ’…βœ¨

πŸ“¦ where this page comes from