pyboxbuilder.packing.layout.pack_boxes¶
-
pyboxbuilder.packing.layout.pack_boxes(container_size: tuple[float, float, float], boxes: list[dict[str, Any]], gap_threshold: float =
10.0, min_spacer_dim: float =15.0, obstacles: Sequence[tuple[float, float, float, float, float, float]] =()) BoxPacking[source]¶ Pack sub-boxes into a container using 3D Guillotine + Extreme-Point fallback.
- Parameters:¶
- container_size: tuple[float, float, float]¶
(width, length, height) of the outer box interior.
- boxes: list[dict[str, Any]]¶
List of dicts with keys: label, size (w, l, h), expandable, etc.
- gap_threshold: float =
10.0¶ Shallow Y gaps <= this are absorbed into expandable boxes.
- min_spacer_dim: float =
15.0¶ Minimum spacer dimension before absorption.
- obstacles: Sequence[tuple[float, float, float, float, float, float]] =
()¶ Pinned
(x, y, z, w, l, h)regions already occupied.
- Returns:¶
BoxPacking with placements assigned.