pyboxbuilder.box.types.magnetic_hinge.MagneticHingeBox

class pyboxbuilder.box.types.magnetic_hinge.MagneticHingeBox[source]

Bases: BoxTypeBase

Hinged box with a filament pin hinge at the back and a small magnet catch at the front.

build_body(spec: BoxSpec) → Bosl2Solid[source]

Return the shell with rear hinge knuckles and a front magnet boss and socket.

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

Return a hinged lid carrying rear knuckles and a front underside magnet socket.

interior(spec: BoxSpec) → Interior[source]

Return the frame the box’s contents may occupy.

interior_mask(spec: BoxSpec) → Bosl2Solid[source]

Return the usable interior volume, less the rear hinge and front magnet boss.

lid_keepouts(spec: BoxSpec) → list[tuple[float, float, float]][source]

Keep lid surface patterns clear of the front magnet socket.