Sheet Metal Nesting API
Yes — there is an API for sheet-metal nesting. Nesting irregular sheet-metal parts — brackets, gussets, flanges, gaskets — onto plate stock is a true-shape nesting problem, and the CutOptim Engine API solves it over HTTP at POST /v1/optimize/nest. Your ERP, MES or quoting software sends the part outlines and the plate sizes as JSON and gets back the nested layout, the placement of every part and the plate count — for laser, plasma or waterjet.
This is live today. The nesting engine (jagua-rs, a geometric collision engine) runs in production behind POST /v1/optimize/nest — a different class of algorithm from the rectangular guillotine packer, returning a true-shape nest rather than a rectangular cut plan.
Every format, engine, limit and code sample for developers: CutOptim nesting API
{
"parts": [
{ "name": "gusset",
"polygon": [[0,0],[400,0],[0,400]],
"qty": 16, "allowedRotations": [0,90,180,270] },
{ "name": "bracket",
"polygon": [[0,0],[350,0],[350,120],[120,120],[120,350],[0,350]],
"qty": 10, "allowedRotations": "continuous",
"meta": { "part": "BRK-350" } }
],
"stock": [
{ "w": 3000, "h": 1500, "qty": 12,
"exclusions": [{ "polygon": [[0,0],[250,0],[0,250]], "quality": 0 }] }
],
"options": { "minSeparation": 2, "edgeClearance": 10 }
}Nesting isn't in the public demo — run this example with a free test key. Create a free test key
- Live today on
POST /v1/optimize/nest— arbitrary polygon parts (with holes), not just rectangles. - Per-sheet exclusion zones nest around a plate defect, a clamp footprint or a pre-printed area (
stock[].exclusions). - Material partition: tag parts and plates and each part nests only on plate of its own material.
- Attach a meta object (part number, order line) and it comes back on every placed copy, so the nest reconciles with your ERP.
- Several plate sizes: the nest compares them by plate area, or by price with
minimizeCost, and may mix them — a half-empty last plate moves to a smaller size. - On a representative 272-part job the nest used 6 sheets where the same parts by bounding box need 9 — the honest metric is plate count, not a density percentage.
- Free validation:
POST /v1/validate/nestchecks a job with no key and no quota.
Why sheet-metal fabricators need it
Plate is expensive, and irregular parts waste it: a rectangular packer treats each part’s bounding box as solid, so the air inside a gusset or an L-bracket is thrown away. True-shape nesting interlocks the real outlines, reclaiming that air. On a representative 272-part job the nest used 6 sheets where the same parts by bounding box need 9 — the honest metric is plate count on the same parts, not a density percentage.
What you send and what comes back
Send each part as a polygon (with optional holes) and a quantity, plus the plate sizes. The response gives every placement as a rigid transform (a rotation in degrees, then an x/y translation), the plate count, the density and any parts that did not fit. Tag parts and plates with a material and the job is partitioned by material — a part is nested only on plate of its own material — and any meta object (your ERP part number, order line) comes back verbatim on every placed copy, so the nest reconciles with your system. Every plate also carries the stock row it was cut from, its cut length and pierce count, and stockUsage totals plates and price per plate size.
Exclusion zones — nest around a defect
Per-sheet exclusion zones (stock[].exclusions) let the engine nest around a plate defect, a clamp footprint or a pre-printed area — a quality-0 zone is a hard no-go region for every part. Rotation can be continuous or a discrete list; options.minSeparation sets the spacing between parts for the torch or beam width, and options.edgeClearance the clearance at the plate edge. The layout is deterministic: a pinned seed reproduces the same nest for a quote or an audit.
Instant for the quote, max for the order
POST /v1/optimize/nest answers synchronously with the lbf engine — deterministic and inside the request, fast enough to price a job while the customer waits. When the job is released to the machine, send the same body with engine: "max" and poll GET /v1/jobs/{id}: it runs lbf first, then spends a time budget you set (options.timeBudgetMs) looking for a layout with fewer plates, and never returns more. The response has the same shape either way; a sheet with exclusion zones is still served by lbf inside that job, with a warning.
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.
FAQ
Is there an API for sheet-metal nesting?
POST /v1/optimize/nest. You send each part as a polygon (with optional holes) plus the plate sizes and get back the nested layout, the placement of every copy and the plate count — for laser, plasma or waterjet. It is a geometric collision engine that runs in production today.Does it handle plate defects or clamp areas?
stock[].exclusions) — polygons the engine keeps every part off. A quality-0 zone is a hard no-go region, so you can nest around a defect, a clamp footprint or a pre-printed area. This is a capability the rectangular API cannot express.Can I tag parts with my ERP part numbers?
How many plates will it save?
Can it choose between several plate sizes?
options.minimizeCost — so the answer does not depend on the order you list them in. It may also mix sizes: each plate, the least-filled first, is re-nested onto the cheaper or smaller sizes and replaced when the whole plan is better, so a half-empty last plate often moves to a smaller size. sheets[].stock and stockUsage say which size every plate came from.Does it report how much of a plate a small job uses?
usedWidth, usedHeight and usedArea — the bounding box of its placed parts from the plate corner — so a quote can charge a strip or the bounding box instead of the whole plate. The least-filled plate is compacted toward that corner by default, with rotation subsets of what each part allows; plate count and price never change.