pyboxbuilder.box.features¶
Reusable closure features shared by the box types (T162).
A lid only works if the body has the matching half of the same feature — a rabbet needs a ledge cut for it, a sliding lid needs grooves the right depth, a filament hinge needs knuckles that interleave and share a pin axis. Keeping both halves of each feature in one function is what stops them drifting apart.
Everything is built in the box’s own frame: (0, 0, 0) is its lower-left corner at the bed. pybosl2 primitives are centre-anchored, so placement goes through shell.block / shell.corner.
Classes
The numbers a cap box's four corner cutouts are cut from. |
|
The numbers a cap box's body and lid must agree on. |
|
The two halves of a closure feature. |
|
A sliding lid's fingernail dish: where it is, and how big. |
Functions
Apply horizontal side interlocking features according to spec.interlock_type (FR-089, FR-102). |
|
Apply stacking features to a box body according to spec.stackable (FR-101). |
|
Apply matching stacking features to a box lid according to spec.stackable (FR-101). |
|
Return positive bump and negative dimple (FR-099). |
|
Build a true flared trapezoidal vertical dovetail joint key or socket (FR-102). |
|
Build a double-dovetail butterfly connector clip that locks adjacent boxes (FR-102). |
|
Return positive detent bead, lid relief slot, and body dimple (FR-099). |
|
Return positive loop tab and negative body pocket cutter with hook (FR-099). |
|
Return negative cylindrical magnet cavities for lid and body (FR-099). |
|
Build the female pattern-matched stacking groove cutter for a box floor or lid. |
|
Build the male pattern-matched stacking lattice ridge for a lid or tray top. |
|
Return an inset perimeter foot/V-ridge rim (FR-101). |
|
Return a perimeter channel/V-groove cutter to be subtracted from floor or lid top (FR-101). |
|
Return dual opposing captive dovetail sliders that pinch toward the center to release. |
|
Return a compliant thumb-press push-button release catch on the front wall. |
|
Return a flush print-in-place quarter-turn rotary cam disk inside the lid. |
|
Return a captive print-in-place horizontal dovetail sliding bolt catch (card_library style). |
|
Return a captive print-in-place vertical dovetail slider catch on the front wall. |
|
Return a print-in-place rotary spin catch (turn-button cam latch) on the front wall. |
|
Return 4 corner locator feet (FR-101). |
|
Return 4 corner indent cutter solids to be subtracted from floor or lid/rim (FR-101). |
|
Return 4 corner 45-degree pyramid (or multi-pyramid grid / cone) female indent cutters. |
|
Return 4 corner 45-degree pyramid (or multi-pyramid grid / cone) male bosses. |
|
Return the combined housing and captive vertical dovetail slider assembly for |
|
Return |
|
Return a print-in-place articulated draw-latch bail on the front wall. |
|
Return dual opposing captive horizontal dovetail sliders in the vertical body wall. |
|
Return a flush quarter-turn rotary cam disk mounted in the vertical body front wall. |
|
Return a vertical-wall print-in-place horizontal dovetail sliding bolt catch. |
|
Return positive wedge barb and negative pocket groove (FR-099). |
|
Return a cap box's body: full footprint below, stepped in for the skirt above. |
|
Return the four corner cutouts that let a cap lid be pushed off (FR-002i). |
|
Size a cap box's corner finger cutouts, or explain why it cannot have any. |
|
Return a cap box's lid: a plate whose skirt grips the body's stepped-in band. |
|
Work out a cap box's shared geometry from its declared size. |
|
Return a retention catch for cap boxes or slipover boxes (FR-002q2, FR-002q3, FR-099). |
|
Return a finger notch wrapping a corner, as the original's |
|
Return the dovetailed channel a lid slides in, and the lid that fills it. |
|
Extrude a footprint outline upward from base_z. |
|
Extrude a polygon footprint with rounded vertical corners and optional top/bottom roundovers. |
|
Interleaved knuckles along the back edge, bored for a filament pin. |
|
Size and place the dish that starts a sliding lid moving (FR-002e5). |
|
Return the solid to subtract from a lid to leave the dish. |
|
Return the front snap-fit or print-in-place catch for a hinged box (FR-002v, FR-099). |
|
Return the volume a hinge occupies inside the box, as a solid to subtract. |
|
Return the slight chamfer that lets a lid start into its grooves (FR-002d). |
|
Return the radius on the sliding lid's leading corners (FR-002e4). |
|
Return the front magnet boss and matching body/lid magnet sockets for a hinged box. |
|
Return |
|
Grow or shrink a footprint outline by distance (positive shrinks). |
|
(inset per side, body height) for a polygon-footprint body. |
|
Return a cap whose skirt follows a polygon footprint instead of a rectangle. |
|
Return a sleeve that slips over a polygon-footprint body, stopping at the foot. |
|
Calculate the (x, y) world position for regular polygon cells in a tessellated grid (FR-102). |
|
Return a ledge cut into the top rim, and the plate that drops into it. |
|
Generate closed 2D polygon vertices for a regular N-sided polygon (FR-102). |
|
Return a retention catch that clicks the sliding lid shut (FR-002e1, FR-099). |
|
Return the dovetail depths that hold a sliding lid in its grooves. |
|
Return the sliding channel and lid, in the slide-along-X frame. |
|
How much body a sleeve leaves exposed above the foot (FR-002p). |
|
(inset per side, body height) for a slipover box. |
|
Return the keyed pyramid configuration for the given 0-based vertical stacking interface. |