Cutting Stock 1D
cutting_stock_1dLeast-waste cut plan for bars, pipes or boards from stock lengths, with saw kerf. FREE.
Typical input {"stock": [{"length": 6000, "cost": 30}], "parts": [{"length": 2200, "qty": 3}, {"length": 1500, "qty": 4}], "kerf": 3} returns {"bars": [{"stock_length": 6000, "cuts": [2200, 2200, 1500], "waste": 94}], "bars_used": 3, "waste_pct": 4.2, "solver_status": "OPTIMAL"}. Minimises total stock cost (or count when no cost); CP-SAT proves optimality when it finishes inside the time limit and otherwise returns the best plan found as FEASIBLE. Use for a cut list of up to 200 pieces. Not for sheets: use cutting_stock_2d. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "stock and parts must be non-empty lists ( and )"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kerf | No | material lost per cut (same unit as lengths). | |
| parts | Yes | required pieces: {length, qty}. | |
| stock | Yes | stock lengths available: {length, cost, qty} (qty = how many of that length may be used; default unlimited). | |
| time_limit_s | No | solver time budget in seconds (default 3, max 15). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||