pscale [-r] obj attribute sf
PSCALE(nged)
NAME
pscale - scale a scalar or vector attribute of a primitive
SYNOPSIS
DESCRIPTION
The pscale command scales a specific attribute of the BRL-CAD primitive obj by the scale factor sf. The attribute is identified by a single letter. The modified object is written back to the database.
The arguments are:
-
-r — Optional. Relative mode: the scale factor is applied relative to the current attribute value (multiplicative). Without
-r, the scale factor is an absolute value. The scale factor must be positive and greater than zero in either mode. -
obj — Name of the primitive to edit. Path prefixes (e.g.
comb/part.s) are accepted; the trailing component name is used. -
attribute — A single letter selecting which attribute of the primitive to scale (see table below).
-
sf — The scale factor. Must be positive (greater than zero).
Supported primitives and attributes
| Primitive | Attributes | Description |
|---|---|---|
EHY (Elliptical Hyperboloid) |
|
Height, semi-major axis, semi-minor axis, neck-to-base distance. |
ELL / SPH (Ellipsoid / Sphere) |
|
A, B, and C semi-axis vectors. Scaling |
EPA (Elliptical Paraboloid) |
|
Height, semi-major axis, semi-minor axis. |
ETO (Elliptical Torus) |
|
Major radius, tube diameter, semi-minor cross-section axis. |
EXTRUDE |
|
Extrusion height vector magnitude. |
HYP (Hyperboloid) |
|
Height, semi-major, semi-minor, and c-value. |
PARTICLE |
|
Total length, vertex radius, head radius. |
RHC (Right Hyperbolic Cylinder) |
|
Half-width, height, c-distance, radius. |
RPC (Right Parabolic Cylinder) |
|
Half-width, height, radius. |
SUPERELL |
|
A, B, C semi-axis vectors. |
TGC (Truncated General Cone) |
|
Top/bottom radii, cross-section axes, height vector. |
TOR (Torus) |
|
Major radius, tube (minor) radius. |
PIPE |
|
Bend radius, radius, inner radius, outer radius. |
METABALL |
|
Field strength, strength value. |
Other primitive types return an error.
EXAMPLES
mged> pscale cone.s h 1.5
Sets the height of the TGC primitive cone.s to 1.5 times its current absolute value.
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.
mged> pscale sphere.s a 50
Sets the A semi-axis of sphere.s to 50 (in local units).
AUTHOR
BRL-CAD Team
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org