Pack Bins
pack_binsPlace up to 20 boxes into containers or pallets with rotation, weight and support rules. FREE.
Typical input {"items": [{"id": "A", "l": 60, "w": 40, "h": 30, "weight": 12, "qty": 4}], "containers": [{"id": "pallet", "l": 120, "w": 80, "h": 150, "max_weight": 500, "qty": 2}]} returns {"containers_used": 1, "containers": [{"placements": [{"id": "A", "x": 0, "y": 0, "z": 0, "l": 60, "w": 40, "h": 30}, ...], "volume_fill_pct": 20.0}], "unplaced": []}. rotation per item: any, upright (rotate around the vertical axis only) or fixed; fragile items carry nothing; rules.min_support (default 0.6) is the share of a box's base that must rest on the floor or on boxes below. Use to decide pallet or carton count before booking freight. Not proven optimal: it is a first-fit-decreasing heuristic, reported as such. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""}. Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | list of {id, l, w, h, weight, qty, rotation, fragile}, all in one length unit. | |
| rules | No | optional {min_support: 0-1, default_rotation: any|upright|fixed}. | |
| containers | Yes | list of {id, l, w, h, max_weight, qty}; used in the order given. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||