pyboxbuilder.compartments.sizing.distribute_row_width¶
-
pyboxbuilder.compartments.sizing.distribute_row_width(items: list[RowItem], available_width: float, gap: float =
2.0) list[tuple[str, float, float]][source]¶ Grow the growable items in a row so the row fills available_width.
Slack is shared in proportion to each growable item’s current width, so a wide well absorbs more of the leftover than a narrow one and the row keeps its visual rhythm.
- Parameters:¶
- Returns:¶
(label, width, length) per item, in the same order, at 0.1 mm precision.
- Raises:¶
ValueError – If the items cannot fit in available_width at all.