Skip to main content
← CutOptim Engine APIEngine API · nesting · live today

Garment Marker Nesting API

Yes — there is an API for marker making. Laying pattern pieces on a roll of fabric, leather or technical textile so the marker is as short as possible is a true-shape nesting problem with one open dimension, and the CutOptim Engine API solves it over HTTP at POST /v1/optimize/nest. Your PLM, ERP or made-to-order software sends the piece outlines and the roll width as JSON and gets back one marker: the placement of every piece and the length it needs — for apparel, upholstery, leather goods and technical textiles.

This is live today as the marker mode of the nesting endpoint: a stock row with roll: true and no h. The same true-shape engine that nests plate nests the pieces; only the stock changes, from a sheet of fixed size to a roll of fixed width and free length.

Every format, engine, limit and code sample for developers: CutOptim nesting API

POST /v1/optimize/nest
{
  "parts": [
    { "name": "front",
      "polygon": [[0,0],[560,0],[560,700],[420,760],[140,760],[0,700]],
      "qty": 2, "allowedRotations": [0,180] },
    { "name": "sleeve",
      "polygon": [[0,0],[480,0],[420,560],[60,560]],
      "qty": 4, "allowedRotations": [0,180] },
    { "name": "collar",
      "polygon": [[0,0],[500,0],[500,80],[0,80]],
      "qty": 2, "allowedRotations": [0,180] }
  ],
  "stock": [{ "w": 1585, "roll": true }],
  "options": { "minSeparation": 3, "edgeClearance": 5 }
}

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 — marker mode, with a roll stock row (w and roll: true, no h).
  • Returns ONE sheet whose h is the shortest marker length found, edge gap included — also in metrics.length.
  • True-shape pieces: polygons (with holes), or SVG and DXF files through parts[].source.
  • Grain and nap: allowedRotations [0, 180] per piece keeps the direction; options.minSeparation and options.edgeClearance set the gaps.
  • stock[].maxLength caps the marker (at most 200000); pieces that do not fit go to unplaced, never to a second sheet.
  • lbf answers synchronously for the quote; max is asynchronous (202, then poll GET /v1/jobs/{id}) and can only shorten the lbf marker.
  • Free validation: POST /v1/validate/nest checks a job with no key and no quota.

A roll is not a sheet

A sheet has two fixed sides, and the question is how many sheets a job needs. A roll has one fixed side — the width — and the question is how much length the pieces consume. Send a stock row with w and roll: true, with no h, and the nest returns ONE sheet w wide whose h is the shortest length it found, edge gap included at both ends; the same figure is in metrics.length. Length on the roll is what you buy, so it is the number a quote needs.

What you send and what comes back

Send each pattern piece as a polygon (with optional holes), or as SVG or DXF through parts[].source, with a quantity. The response gives every placement as a rigid transform (a rotation in degrees, then an x/y translation), the marker length, and any piece that did not fit in unplaced. Any meta object — your style, size or cut-order reference — comes back verbatim on every placed copy, so the marker reconciles with your own system.

Grain, nap and spacing

allowedRotations is set per piece: [0, 180] keeps the grain or nap direction and still lets a piece turn end for end, while a longer list or "continuous" suits a material with no direction. options.minSeparation sets the gap between pieces and options.edgeClearance the gap at the edges of the roll. An optional stock[].maxLength caps the marker at a length you choose (at most 200000 in your unit): pieces that do not fit within it are returned in unplaced, and a roll never becomes a second sheet.

Instant for the quote, max for the cut order

The default lbf engine answers synchronously — deterministic and inside the request, fast enough to price a marker while the customer waits. For the cut order, send the same body with engine: "max" and poll GET /v1/jobs/{id}: it starts from the lbf marker and spends the time budget you set (options.timeBudgetMs) on a strip search that may shorten it, and never lengthens it. The response has the same shape either way, and a warnings line names the length and, with max, whether the search shortened it.

Downloadable resource
Garment Marker Nesting API one-pager

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.

PDF2 pagesFree
Download the PDF

FAQ

Is there an API for marker making?
Yes. Laying pattern pieces on a roll so the marker is as short as possible is marker mode of the CutOptim Engine API’s nesting endpoint, POST /v1/optimize/nest. You send each piece as a polygon (or SVG or DXF) plus a stock row with the roll width and roll: true, and get back one marker: the placement of every piece and its length. It runs in production today, for apparel, upholstery, leather and technical textiles.
How is the marker length decided?
The lbf engine places the pieces and returns the length they need, synchronously and deterministically. With engine: "max" the job runs asynchronously: it starts from that lbf marker and spends options.timeBudgetMs searching for a shorter strip, and it never returns a longer one. The length is the h of the single returned sheet, edge gap included, and is repeated in metrics.length.
Can I keep the grain or nap direction?
Yes. Set allowedRotations per piece: [0, 180] keeps the piece on the grain line and lets it turn end for end, and a single angle fixes it completely. Pieces from a material with no direction can take a longer list of angles or "continuous". options.minSeparation and options.edgeClearance set the spacing between pieces and at the roll edges.
Can I limit the marker length?
Yes. stock[].maxLength caps the marker at a length you choose, at most 200000 in your unit. Pieces that do not fit within it are returned in unplaced — a roll never becomes a second sheet — so you can see what is left over and decide what to do with it.
Does it grade patterns, match plaids or plan spreading?
No. It nests the pieces you send: it does not grade a pattern into sizes, match plaids or stripes, or plan plies and spreading. Send every size and quantity you want in the marker as parts, with a meta object for your own references, and the response tells you where each copy goes.
How much fabric will it save?
It depends on the pieces and the roll width, so we do not quote a blanket percentage. The honest measure is the marker length on the same pieces and the same width: run the job, compare the length with your current marker, and compare lbf with max. max never returns a longer marker than lbf. POST /v1/validate/nest checks a job for free, with no key and no quota.

Textile and upholstery use case (app) · Benchmarks