1D NESTING

Guide · How it works

How Bar and Tube Cutting Optimization Software Works

What happens between typing a cut list and getting a buy list: the cutting stock problem, the two search methods this planner uses, how kerf and miters enter the arithmetic, and what to expect from browser and desktop tools.

Try it on your cut listSame engine as every tool page

The problem

The cutting stock problem in plain words

You need a list of pieces and can buy bars of one or more lengths. Every piece must come out of some bar, every cut costs a blade width, and the bar ends are trimmed square. Find the purchase that costs least, and the order of cuts in each bar. Mathematicians call this the one-dimensional cutting stock problem.

It was described by Kantorovich in 1939 and given its classic pattern model by Gilmore and Gomory in 1961. It is NP-hard, so no known method is fast on every instance, but shop-sized lists, a few hundred pieces of up to a few dozen lengths, are usually small enough to solve exactly in a browser.

Algorithm

First-fit decreasing, then exact search to the lower bound

1 · Sort the pieces longest first and lay them end to end (each with one kerf of 3 mm)UPUPUPUPRLRLRLRLRLRLΣ(L + k) = 17188 mm ÷ usable 5980 mm = 2.87 → at least 3 bars2 · Exact search picks whole-bar patterns; here it meets the bound with 3 barsUPBar 1 · 98.7% · drop 49 mm scrapUPRLRLRLRLBar 2 · 97.0% · drop 155 mm scrapUPUPRLRLBar 3 · 90.0% · drop 578 mm reusable
Machine frame job: 4 × 1660, 6 × 1040, 6 × 710 mm on 6000 mm bars, kerf 3 mm, 10 mm trims. Dashed lines mark each usable bar length.
Lower bound
Add every piece plus one kerf and divide by the usable length of the longest bar. Here that is 3 bars; no plan can do better.
First-fit decreasing
Sort pieces longest first; put each into the first open bar where it fits, else start a new bar. Fast; its proven worst case is 11/9 of the optimum plus a fraction of a bar (Dósa, 2007).
Exact search
List every pattern, a set of pieces that fits one bar, then search over remaining demand for the cheapest combination of patterns. When it finishes, the plan is proven best.
Fallback
Lists with more than 20,000 patterns, 400,000 demand states or a fixed work cap fall back to first-fit decreasing, and the summary says Best found instead of Optimal.

On the machine frame both methods reach 3 bars, equal to the bound, so the summary shows Optimal. Ties are broken by fewer cuts, then by keeping drops long, so leftovers are more likely to be reusable.

Objective

Cost, bar count and length with mixed stock

2 × 2900 mm, goalBuysBarsYieldCost
Lowest purchase cost2 × 3000 mm296.7%$80.00
Fewest bars1 × 6000 mm196.7%$96.00
Least stock length1 × 6000 mm196.7%$96.00
6000 mm at $96 and 3000 mm at $40 per bar, kerf 3 mm, 10 mm trims; computed by the engine.

With one stock length every goal gives the same plan. When the per-metre price differs, the goal decides: two short bars are cheaper here, one long bar is less handling. Cost is the default because it matches the invoice. On the 80/20 frame it buys a 3000 mm bar for the last pieces, $42.00 less than 6000 mm bars only.

Geometry

Kerf and miter arithmetic

Square cuts are simple: each piece takes its length plus one kerf. Angled ends need two more facts, the profile width W and the angle a. An end reaches d = W · cot a past the centerline, and the blade slot measured along the bar is k ÷ sin a.

When two neighbours have parallel ends, one cut serves both and the triangle between them disappears. The search can turn pieces over to create those parallel pairs. On the window preset that takes the job from 6 to 5 bars and 40 to 25 cuts; see the miter cut length optimizer for the drawings.

Determinism

Same input, same plan

The engine uses no random numbers and no time limits that depend on your machine. The same cut list, settings and stock always produce the same bars in the same order, so a share link, a re-import or a Pro export rebuilds exactly the plan you checked on screen. The linear material yield calculator guide shows how its yield figure is computed.

Shop needs

What a shop needs from the software

OutputWhy it mattersHere
Purchase listHow many bars of each length and material to order or pull from the rackFree, on screen
Stop marksTape readings from one zero for every piece, kerf includedFree on screen; full list in the Pro PDF and CSV
Shop travelerOne block per bar with a scale drawing, angles and flip flagsPro PDF
LabelsPart ID, length, angles and bar number on each piecePro PDF, Avery sheets
CAD fileBars drawn 1:1 for checking, CNC saw prep or archivingPro DXF + SVG
SpreadsheetBOM, cut schedule and remnant ledger back in ExcelPro CSV pack (3 files)

Compare

Browser planner vs installed desktop tools

CapabilityThis browser plannerTypical installed desktop tool
InstallNone: a web page; works on Windows, macOS, Linux, tabletsInstaller, usually Windows only
Where the cut list is processedIn your browser; Pro files built in memory and not storedOn your computer
Excel inputPaste rows, or import CSV, TSV, job JSON (5 MB)Varies: import, paste or manual entry
Mixed stock lengths and pricesYes, cheapest mix, fewest bars or least lengthCommon
Mitered ends and shared cuts90/45/60/30° ends, complementary flip switchVaries by product
Offcut inventoryYes, used first at $0 when switched onCommon in paid editions
Barcode labelsPro: Avery 5160 / L7160, Code-128 per piece and offcutVaries; often a higher edition
DXF exportPro: 1:1 R12 DXF on 6 layers + SVGVaries
Price modelFree planner; Pro $4.99 for 7 days, $7.99/month or $19.99 onceOne-time license; one benchmarked Windows tool lists $173 per seat
Desktop column describes the category, not one product; check the vendor's current feature list before buying.

A desktop tool makes sense when you need offline use on a locked-down shop PC or a direct link to a CNC saw controller. A browser planner suits estimators and small shops who want an answer now, on whatever device is at hand, and only pay when shop-floor files are needed.

Privacy: the nesting runs in your browser. Imported files are never uploaded. A Pro export sends the job JSON once to this site, the file is built in memory and returned, and nothing is stored. Start on the 1D nesting optimizer, or the pipe and aluminum tools.