pyboxbuilder.box.shell

The walled shell every box type starts from, and how solids get placed.

Each box type used to carry its own copy of outer - inner, which meant the hollowing rule lived in thirteen places. It lives here instead, and it takes one decision with it: a box is only hollowed out wholesale when nothing else is going to define its cavities. As soon as a box has compartments, the interior stays solid and the compartments are what get carved out of it — otherwise the individual wells (a slot per worker, say) would be lost inside one big void.

block and corner live here too. Every pybosl2 primitive is centre- anchored — cuboid([10, 20, 5]) spans -5..5 by -10..10 by -2.5..2.5 — while box geometry is naturally written in corner coordinates (“the floor is ft thick, so the interior starts at z = ft”). These two helpers do that conversion once, so no caller has to remember to add half a size.

Functions

apply_finger_holes

Cut any exterior finger holes out of a box body (FR-006).

apply_ribbon_channels

Carve ribbon pass-through channels if enabled.

base_rounding

Return the edge radius for this box body's base.

block

Return a cuboid of size whose minimum corner sits at at.

body_rounding

Return the edge radius for this box body.

bottom_chamfer_slivers

Return chamfer slivers for the bottom edges of a block of size.

build_shell

Outer block, hollowed to the interior unless spec.hollow is False.

corner

Place a centre-anchored solid so its minimum corner sits at at.

finger_cut_conflicts

Finger cuts that overlap something, described one per line (FR-006c).

finger_hole_scoop

Return the placed cutout for one finger hole (FR-006).

interior_block

Return the solid that build_shell removes — the box's full interior volume.

no_lid_finger_holes

Return the finger holes a no-lid box cuts into its longer walls (FR-047).

round_inner_rim

Round the inner top edge of a lidless box's rim (FR-043f).

sliding_rim_rounding

Return the radius for a sliding box's exposed top edge (FR-043f1).

warn_about_finger_cuts

Emit finger_cut_conflicts() as warnings, and build anyway (FR-006c).

with_no_lid_finger_holes

Return a no-lid spec with its default finger holes, unless it already has some.