Cutting Stock 2D
cutting_stock_2dGuillotine cut layouts for rectangular parts from sheets, with kerf and grain. PREMIUM (license).
Typical input {"sheets": [{"id": "ply", "l": 2440, "w": 1220, "qty": 5}], "parts": [{"id": "side", "l": 800, "w": 400, "qty": 6}], "kerf": 3} returns {"sheets_used": 1, "layouts": [{"sheet": "ply", "placements": [{"id": "side", "x": 0, "y": 0, "l": 800, "w": 400, "rotated": false}], "fill_pct": 64.5, "offcuts": [...]}], "unplaced": []}. Every cut is a guillotine cut (edge to edge): the sheet is ripped into strips and each strip cross-cut, which is what a panel saw does; grain true forbids rotating parts unless a part sets rotate true. Use for cabinet, sign and sheet-metal cut lists. Not proven optimal: a best-fit shelf heuristic, reported as such. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "sheets 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 | saw blade width lost per cut. | |
| grain | No | true when parts must keep their orientation (l along the sheet's l). | |
| parts | Yes | {id, l, w, qty, rotate}; rotate overrides the grain rule per part. | |
| sheets | Yes | {id, l, w, qty}; used in the order given. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||