PSCALE(nged)

scale a scalar or vector attribute of a primitive

πŸ“… published 7.44.0, from nixpkgs unstable

✨ PSCALE(nged) ✨

okay bestie, welcome to pscale β€” one of the nged girlies and honestly kind of a niche icon πŸ’… she scales a single scalar or vector attribute of a primitive and writes it right back into the database, no cap.


🌸 NAME 🌸

pscale β€” scale a scalar or vector attribute of a primitive πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

pscale [-r] obj attribute sf

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: pscale takes a specific attribute of the BRL-CAD primitive obj and scales it by the scale factor sf. The attribute gets picked by a single letter, and the modified object is written back to the database. Literally that simple, periodt. ✨

The arguments are:

  • -r β€” optional, babes. Relative mode: the scale factor gets applied relative to the current attribute value (multiplicative). Without -r, the scale factor is an absolute value. Either way the scale factor has to be positive and greater than zero. 🫢
  • obj β€” the name of the primitive you're editing. Path prefixes (like comb/part.s) are accepted β€” the trailing component name is what actually gets used. iykyk.
  • attribute β€” a single letter that selects which attribute of the primitive to scale (full menu down below πŸ‘‡).
  • sf β€” the scale factor. Must be positive (greater than zero). no zero, no negatives, we don't do that here πŸ’€

πŸ‘‘ Supported primitives and attributes πŸ‘‘

Not every primitive is invited to the party β€” but these ones ate:

  • EHY (Elliptical Hyperboloid) β€” h/H, a/A, b/B, c/C β€” height, semi-major axis, semi-minor axis, neck-to-base distance. 🌈
  • ELL / SPH (Ellipsoid / Sphere) β€” a/A, b/B, c/C β€” the A, B, and C semi-axis vectors. Scaling A with no sub-attribute scales all three uniformly. iconic behavior fr.
  • EPA (Elliptical Paraboloid) β€” h/H, a/A, b/B β€” height, semi-major axis, semi-minor axis. πŸ’œ
  • ETO (Elliptical Torus) β€” r/R, d/D, c/C β€” major radius, tube diameter, semi-minor cross-section axis. πŸ“
  • EXTRUDE β€” h/H β€” extrusion height vector magnitude. short and sweet.
  • HYP (Hyperboloid) β€” h/H, a/A, b/B, c/C β€” height, semi-major, semi-minor, and c-value. and psst: h accepts the v/V sub-attribute. 🧚
  • PARTICLE β€” h/H, v, h (lowercase) β€” total length, vertex radius, head radius. yes the lowercase h is a different thing, read it carefully bestie 😭
  • RHC (Right Hyperbolic Cylinder) β€” b/B, h/H, c/C, r/R β€” half-width, height, c-distance, radius. ⭐
  • RPC (Right Parabolic Cylinder) β€” b/B, h/H, r/R β€” half-width, height, radius. πŸ¦‹
  • SUPERELL β€” a/A, b/B, c/C β€” the A, B, C semi-axis vectors.
  • TGC (Truncated General Cone) β€” a/A, b/B, c/C, d/D, h/H β€” top/bottom radii, cross-section axes, height vector. πŸ’…
  • TOR (Torus) β€” a/A, h/H β€” major radius, tube (minor) radius. πŸŽ€
  • PIPE β€” b/B, r/R, i/I, o/O β€” bend radius, radius, inner radius, outer radius.
  • METABALL β€” f/F, s/S β€” field strength, strength value. πŸ”₯
⚠️ Other primitive types return an error. she's picky, and honestly? valid.

🌟 EXAMPLES 🌟

Example 1. Scale the height of a TGC

mged> pscale cone.s h 1.5

Sets the height of the TGC primitive cone.s to 1.5 times its current absolute value. slay. πŸ’–

Example 2. Scale a TOR major radius relatively

mged> pscale -r ring.s a 0.8

Multiplies the major radius of the torus ring.s by 0.8, shrinking it to 80% of its current size. shrinking but make it cute πŸŽ€

Example 3. Scale the A axis of an ellipsoid

mged> pscale sphere.s a 50

Sets the A semi-axis of sphere.s to 50 (in local units). big girl numbers. ✨


πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team β€” legends, honestly 🫢


πŸ› BUG REPORTS πŸ›

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β€” pls do tell them, they wanna know πŸ™ˆ


okay that's the whole page, bestie!! go forth and scale responsibly πŸ’…βœ¨ this has been PSCALE(nged) from the BRL-CAD User Commands collection β€” mwah, see u in the group chat πŸ¦‹πŸ’–

πŸ“¦ where this page comes from