PTRANSLATE(nged)

translate a vector attribute of a primitive

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… PTRANSLATE (nged) πŸ’…

okay bestie, welcome to PTRANSLATE from the BRL-CAD User Commands lineup β€” it's giving ✨surgical vector edits✨ and honestly? iconic.


🌸 NAME 🌸

ptranslate β€” translate a vector attribute of a primitive πŸŽ€


✨ SYNOPSIS ✨

ptranslate [-r] obj attribute "tx ty tz"

πŸ¦‹ DESCRIPTION πŸ¦‹

so the ptranslate command displaces a specific vector attribute of the BRL-CAD primitive obj by the translation vector (tx, ty, tz). no cap. πŸ’… you pick the attribute with a single letter or a two-letter code, and then the modified object gets written back to the database. main character behaviour tbh.

here's the cast of arguments, one by one:

  • -r β€” optional, bestie! relative mode. the translation vector gets added to the current attribute value. without -r, the attribute is just set to the given vector directly. absolute girlboss vs. relative girlboss, pick your vibe. πŸ’–
  • obj β€” the name of the primitive you're editing. path prefixes like comb/part.s are totally accepted, iykyk; the trailing component name is what gets used. 🫢
  • attribute β€” a letter or two-letter code that selects which vector attribute of the primitive to translate (full menu down below, babe).
  • "tx ty tz" β€” the translation vector, and yes it has to be one single quoted space-separated string of three floating-point values, in local units. no commas, no separate args. that's the whole vibe check. 🌈

πŸŽ€ Supported primitives and attributes πŸŽ€

the original served this as a table, but tables are not the aesthetic, so here it is as a list β€” every single row preserved, fr fr:

  • TGC (Truncated General Cone) β†’ attribute h or H β€” translates the height vector. the cross-section vectors (A, B, C, D) get recomputed so they stay perpendicular to the new height. obsessed with the consistency. ✨
  • TGC β†’ attribute hr or HR β€” translates the height vector and redefines the reference vertex so the base stays fixed. base stays put, height moves. πŸ’…
  • EXTRUDE β†’ attribute h or H β€” translates the extrusion direction vector. the sketch reference vectors (u_vec, v_vec) get recomputed to remain perpendicular to the new height. slay. πŸ¦‹
  • EXTRUDE β†’ attribute hr or HR β€” translates the extrusion direction vector and redefines the reference vertex. πŸŽ€
πŸ’€ heads up: only TGC and EXTRUDE are currently supported. other primitive types will return an error. so don't come for this command with a random primitive and expect a glow-up β€” it will simply not happen, ngl.

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Translate the height vector of a TGC

mged> ptranslate cone.s h "0 0 100"

displaces the height vector of the TGC primitive cone.s by 100 units in the Z direction (absolute mode, babe). the cross-section axes are recomputed so they remain perpendicular to the new height. perpendicular queen. πŸ‘‘

Example 2. Relatively translate an extrusion direction

mged> ptranslate -r wall.s h "10 0 0"

adds (10, 0, 0) to the current extrusion direction vector of the EXTRUDE primitive wall.s. that's it, that's the whole flex. πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” the actual legends behind all this. 🫢


πŸ› BUG REPORTS πŸ›

found a bug or a problem? spill the tea via electronic mail to devs@brlcad.org and let the team cook. πŸ™ˆ


🌸 mwah πŸ’‹ that's the page β€” brought to you by BRL-CAD and its PTRANSLATE(nged) era. go forth and translate those vectors, bestie, and remember: local units, quoted string, only TGC and EXTRUDE. periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from