# Kerfwise Sheet Nesting Optimizer > Nest rectangular parts on sheets with kerf, trim and grain: layouts, yield, offcuts, SVG + DXF. A cutting optimiser for panel saws and CNC routers: list rectangular parts with quantity and grain, choose the sheet size (e.g. 2800 × 2070), saw kerf and trim margin, and get guillotine-cuttable or MaxRects layouts, sheet count, yield per sheet, reusable offcuts, the guillotine cut sequence, SVG drawings and a DXF R12 file. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://kerfwisesheetnesting.usefulweb.site/ (interactive tool at https://kerfwisesheetnesting.usefulweb.site/tool) - JSON API: POST https://kerfwisesheetnesting.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://kerfwisesheetnesting.usefulweb.site/api/v1/tool) - OpenAPI: https://kerfwisesheetnesting.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://kerfwisesheetnesting.usefulweb.site/mcp - tool `kerfwise_sheet_nesting` ## Inputs - parts (table, required): Parts - Length runs along the grain. Tick grain to forbid rotation (on a grained material). - sheetLength (number): Sheet length - Common sizes: 2800 × 2070, 2440 × 1220, 3050 × 1220, 2500 × 1250, 2620 × 2070, 2750 × 1830, 2800 × 2100, 2440 × 1830, 1220 × 610. - sheetWidth (number): Sheet width - sheetQty (integer): Sheets available - 0 = unlimited. - sheetPrice (number): Price per sheet - kerf (number): Saw kerf - trim (number): Trim margin per edge - method (select): Method - grainedMaterial (boolean): Material has grain - allowRotation (boolean): Allow rotating parts without grain - minOffcutLength (number): Min. offcut length to keep - minOffcutWidth (number): Min. offcut width to keep ## Method - Parts are inflated by one kerf and the usable sheet (sheet − 2 × trim) by one kerf, so neighbouring parts are exactly one kerf apart and the outer parts touch the trimmed edge. - Guillotine: free-rectangle packing with best-area-fit / best-short-side-fit and split rules (shorter-leftover-axis, longer-leftover-axis, min-area); every placement records its edge-to-edge cuts, giving a panel-saw cut sequence. MaxRects: maximal free rectangles with best-short-side, best-area or bottom-left fit (tighter, for CNC). - Each method runs a fixed set of strategies (4 sort orders × fit/split rules × rotation on/off) and keeps the best: fewest unplaced parts → fewest sheets → least sheet area → largest single offcut → guillotine preferred. Deterministic for identical input. - Grain: on a grained material, parts marked grain keep their length along the sheet length; other parts may rotate 90°. Yield = part area / full sheet area. Offcuts = non-overlapping free rectangles ≥ the minimum offcut size. ## Limits - Heuristic optimisation: good, fast layouts, not a proven optimum. Check that your saw can follow the cut sequence and measure your blade’s real kerf.