Function Reference: solid.box

drafting: S = solid.box (DX, DY, DZ)

drafting: S = solid.box (DX, DY, DZ, U)

drafting: S = solid.box (…, ’Anchor’, A)

A rectangular block.

S = solid.box (DX, DY, DZ) returns a solid.Shape measuring DX by DY by DZ millimetres, with one corner at the origin and the block extending along the positive x, y and z axes.

S = solid.box (DX, DY, DZ, U) places the block in the geom.UCS U: DX runs along its x axis, DY along its y axis and DZ along its normal, with the corner on its origin.

The option 'Anchor' chooses the point of the block that lands on the origin, of U or of the world when U is left out:

'corner'
the corner at the least x, y and z, the default.
'base'
the centre of the bottom face.
'centroid'
the centre of the block, its centre of mass.
 
 ## A block standing centred on the top of another
 U = geom.UCS ([0, 0, 1], [20, 10, 8]);
 S = solid.box (6, 4, 3, U, 'Anchor', 'base');
 bbox (S)
 ⇒ 17   8   8   23   12   11

See also: solid.Shape, solid.wedge, solid.cylinder, geom.UCS

Source Code: solid.box