Glass Cutting Optimization API
Yes — there is an API for glass cutting optimization. Glass is scored and snapped edge to edge, so cutting it to size is a 2D guillotine problem: every cut runs in a straight line from one edge of the sheet to the other, exactly as a glass table works. The same engine that powers the CutOptim app solves it over HTTP at POST /v1/optimize/2d — your ERP, quoting or production software sends the panels and the stock sheets as JSON and gets back a guillotine-valid cut plan, the yield and an inline SVG of the layout for the cutting table.
This is live today — the CutOptim engine already runs 2D guillotine optimization in production for the app; the Engine API exposes the exact same solver over HTTP, so the plan an API call returns matches what the app shows, and every plan is producible on a straight-line glass table.
{
"parts": [
{ "name": "Pane A", "w": 800, "h": 600, "qty": 6 },
{ "name": "Low-E lite", "w": 1200, "h": 900, "qty": 4, "rotatable": false }
],
"stock": [{ "w": 3210, "h": 2250, "qty": 10, "price": 92.0 }],
"options": { "kerf": 0 },
"include": ["svg"]
}- Live today on
POST /v1/optimize/2d— the same engine as the app, not a pre-release. - Every plan is guillotine-valid — the straight edge-to-edge cuts a glass table can actually make.
options.kerf: 0 for score-and-snap;rotatable: falselocks a coated or mirror lite to its orientation.- Ask for
include:["svg","dxf"]and the layout comes back inline — no storage, no second call. - Free validation:
POST /v1/validate/2dchecks a job with no key and no quota.
Why glass shops need it
Glass is expensive and the risk of breakage makes waste minimisation critical. Cutting a batch of panels in the order they arrive leaves odd strips on every sheet; a 2D optimizer rearranges the panels across the stock so the batch needs as few sheets as it can find. Doing it by hand does not scale to a job of dozens of panels — doing it inside your own quoting or ERP software, through the API, does.
Guillotine-valid — the only cut a glass table can make
Glass cannot be cut out of the middle of a sheet: every cut is a straight score that runs edge to edge, then a snap. The engine returns a guillotineValid plan with the cut sequence and each cut’s stop position, so the layout an API call produces is one the cutting table can actually execute. Set options.kerf to 0 for score-and-snap (no material is removed), or a small value for laminated glass cut on a diamond wheel.
Coating and pattern orientation
Low-E and mirror glass has a fixed coating direction and cannot be turned freely. Mark such a part with rotatable: false and the engine keeps it in its requested orientation while still turning the panels that can rotate — so the plan respects the coating without you pre-sorting the job. Ask for include:["svg"] (or "dxf") and the achieved layout comes back as a drawing inline in the response, ready for the cutting table or a CAD handoff.
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 glass cutting optimization?
POST /v1/optimize/2d. You send the panels and the stock sheets as JSON and get back a guillotine-valid cut plan, the yield and, on request, an inline SVG of the layout. It is the same engine that runs the CutOptim app, callable over HTTP.Does it handle score-and-snap (zero kerf) and coated glass?
options.kerf to 0 for score-and-snap, where no material is removed, or a small kerf for laminated glass cut on a diamond wheel. For Low-E or mirror glass whose coating direction is fixed, mark the part rotatable: false and the engine keeps it in its requested orientation while still turning the panels that can rotate.Can I get the cutting-table drawing back from the API?
include:["svg"] (or "dxf") to the request and the response carries the achieved layout as a self-contained SVG or an R12/AC1009 DXF string — no storage, no second call. You can also validate a payload for free at POST /v1/validate/2d, with no key and no quota, while building the integration.Can it plan with only the sheets I have in stock?
options.respectStock and each stock quantity becomes a hard limit: the engine lays out the panels on the sheets you actually hold, and any panel that does not fit comes back in unplaced instead of being placed on a sheet you do not have. Without it, the plan assumes more sheets can be bought and reports how many are needed.Can it keep a margin along a damaged or uneven sheet edge?
options.trim takes a separate margin for each side of the sheet — left, right, top and bottom — so a chipped or uneven edge is kept out of every panel without wasting the same width on the clean sides. The trimmed strip is kept out of the layout, so no panel is cut from it.