pyboxbuilder.box.types.filament_hinge.FilamentHingeBox

class pyboxbuilder.box.types.filament_hinge.FilamentHingeBox[source]

Bases: BoxTypeBase

Filament (living) hinge lid box type.

build_body(spec: BoxSpec) → Bosl2Solid[source]

Return the shell with half the hinge knuckles along its back edge.

build_lid(spec: BoxSpec, decoration: object = None) → Bosl2Solid[source]

Return a plate carrying the interleaving knuckles, on the same pin axis.

The hinge pin is a length of filament threaded through after printing, so the two halves stay separate parts.

interior(spec: BoxSpec) → Interior[source]

Return the frame the box’s contents may occupy.

interior_mask(spec: BoxSpec) → Bosl2Solid[source]

Return the interior, less the room the hinge takes up inside it.

The hinge sits within the box’s outline, so its barrel and webs stand in the back of the interior. Compartments are clipped to what is left rather than being allowed to collide with it.

Parameters:
spec: BoxSpec

The box’s spec dict.

Returns:

The usable interior volume.