pyboxbuilder.lid.pattern.hole_size

pyboxbuilder.lid.pattern.hole_size(spacing: float, web: float | None) → float[source]

Return how big a hole is, given the pitch and the web between them.

Parameters:
spacing: float

Centre-to-centre distance between neighbouring holes, in mm.

web: float | None

Material to leave between them; None uses DEFAULT_WEB_MM.

Returns:

The hole’s size across the flats, in mm. Zero when the pitch cannot hold a usable hole and the thinnest printable web at once — the caller then leaves the lid solid rather than perforating it uselessly.