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.
POST /v1/optimize/2d
{
"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: false locks 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/2d checks 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 wastes a published 15–30% of the sheet; a 2D optimizer rearranges the panels across the stock to bring that well down. 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.