pyboxbuilder.compartments.layout

Compartment auto-layout — 2D shelf + obstacle-aware MaxRects bin packing.

Classes

CompartmentLayout

Result of laying out compartments inside a box interior.

CompartmentPlacement

Position of a single compartment inside a box.

Functions

candidate_box_sizes

Generate Pareto-non-dominated outer (W, L, H) envelopes for compartments.

center_compartment_placements

Center and evenly distribute placed compartments across unused interior slack.

compute_min_box_size

Return the smallest compact box that holds these compartments.

layout_compartments

2D layout of compartments inside the box interior with obstacle and rotation support.

normalise_compartments

Pad every compartment tuple out to the full seven fields.

pack_compartments_across_bins

Partition compartments across multiple bin interior footprints with symmetry-broken 2D packing.