pyboxbuilder.box.features.sliding_dovetail

pyboxbuilder.box.features.sliding_dovetail(spec: BoxSpec) → tuple[float, float][source]

Return the dovetail depths that hold a sliding lid in its grooves.

The lid’s two long edges are angled — a dovetail — so the lid is trapped in its grooves. In cross-section, perpendicular to the slide axis, the lid is a trapezoid whose top face is the box interior (no key — the top sits flush with the inner walls) and whose bottom face reaches half the wall width into each wall. The groove never reaches the outer face, so there is always wall material behind it to support the lid (FR-002c).

Parameters:
spec: BoxSpec

Reads wall_thickness.

Returns:

(top, bottom) — how far the key reaches into each side wall at the lid’s top face and at its underside, in mm. The top is 0 (the lid’s top face is the interior width); the bottom is half the wall width.