pyboxbuilder.compartments.element.grid_pack

pyboxbuilder.compartments.element.grid_pack(prototype: CompartmentElement, count: int, *, origin: tuple[float, float] = (0.0, 0.0), pitch: tuple[float, float] = (0.0, 0.0), alternate_rotation: float = 0.0) → tuple[CompartmentElement, ...][source]

Repeat one element count times along a straight line (FR-004b).

This is the “five owl workers stacked in a column” case: the same silhouette at a fixed pitch, optionally flipping every other copy so the pieces nest.

Parameters:
prototype: CompartmentElement

The element to repeat; its offset is ignored.

count: int

How many copies to place.

origin: tuple[float, float] = (0.0, 0.0)

Position of the first copy.

pitch: tuple[float, float] = (0.0, 0.0)

(dx, dy) step between successive copies.

alternate_rotation: float = 0.0

Extra rotation applied to every odd-indexed copy.

Returns:

The placed copies, in order.