Laser Cutting Nesting API
Yes — there is an API for laser cutting nesting. Cutting irregular parts on a laser is a true-shape nesting problem: a part is an arbitrary polygon, not a rectangle, and parts interlock into each other’s concave pockets. The CutOptim Engine API solves it over HTTP at POST /v1/optimize/nest — your CAD/CAM, ERP or quoting software sends the part outlines and the stock sheets as JSON and gets back the nested layout, the placement of every part and the sheet count.
This is live today. Nesting is a different class of algorithm from the rectangular guillotine packer — a geometric collision engine (jagua-rs) that runs in production behind POST /v1/optimize/nest — so it returns a true-shape nest, not a rectangular cut plan.
POST /v1/optimize/nest
{
"parts": [
{ "name": "bracket",
"polygon": [[0,0],[300,0],[300,100],[100,100],[100,300],[0,300]],
"qty": 12, "allowedRotations": "continuous" },
{ "name": "gusset",
"polygon": [[0,0],[280,0],[140,240]],
"qty": 8, "allowedRotations": [0,90,180,270] }
],
"stock": [{ "w": 3000, "h": 1500, "qty": 20 }],
"options": { "minSeparation": 0.3 }
}- — Live today on POST /v1/optimize/nest — arbitrary polygon parts (with holes), not just rectangles.
- — Per-sheet exclusion zones keep parts off a defect, a clamp footprint or a pre-printed area (stock[].exclusions).
- — Continuous or discrete rotation, plus minSeparation for the beam width and part spacing.
- — On a representative 272-part job the nest used 6 sheets where the same parts by bounding box need 9 — the honest metric is sheet count, not a density percentage.
- — Deterministic: a pinned seed makes the same request return the same nest, for quotes and audits.
- — Free validation: POST /v1/validate/nest checks a job with no key and no quota.
Why laser shops need true-shape nesting
A rectangular packer counts each part’s bounding box as solid, so the notch-air inside an L-bracket or a triangular gusset is wasted. True-shape nesting interlocks the actual outlines, reclaiming that air. On a representative 272-part job the nest used 6 sheets where the same parts placed by bounding box need 9 — the honest metric is sheet count on the same parts, not a density percentage (a bounding box reads a higher density for a worse result).
What you send and what comes back
Send each part as a polygon outline (with optional interior holes) and a quantity, plus the stock sheets. The response gives the placement of every copy as a rigid transform — a rotation in degrees, then an x/y translation — not a re-emitted polygon: rotate your input outline and add the offset to reconstruct the placement exactly. It also returns the sheet count, the per-sheet and overall density, and any parts that did not fit. Ask for include:["svg","dxf"] and the achieved layout comes back as a file inline.
Exclusion zones and continuous rotation
Two things a rectangular API cannot express come with the nesting engine. Per-sheet exclusion zones (stock[].exclusions) keep every part off a defect, a clamp footprint or a pre-printed area — a quality-0 zone is a hard no-go region. Rotation can be continuous (any angle) or a discrete list, and options.minSeparation sets the clearance for the beam width and part spacing. The layout is deterministic: set options.seed and the same request returns the same nest.
A two-page summary — the problem, what you send and get back, a request and response, and how to build on the engine. Print-ready, with a QR back to this page.