pyboxbuilder.rounding.max_radius

pyboxbuilder.rounding.max_radius(size: collections.abc.Sequence[float], edges: collections.abc.Sequence[Anchor]) → float[source]

Return the largest radius these edges can carry on a block of size.

A blanket min(size) / 2 is the tempting guard and it is wrong often enough to matter: it rejects an 8mm fillet on the floor of a 12mm-deep tray, which is perfectly buildable, because the depth is the smallest dimension. What actually constrains a fillet is the dimensions perpendicular to the edge it runs along, and then only halved where the edge on the opposite side is being rounded too — two fillets growing towards each other meet at half the gap, but one growing alone can use all of it.

Parameters:
size: collections.abc.Sequence[float]

The block’s (width, length, height).

edges: collections.abc.Sequence[Anchor]

pybosl2 edges= selector.

Returns:

The maximum radius in mm, or inf when no edge is selected.