Cutting optimization & nesting algorithms

Plain-English explanation of bin packing, guillotine cuts, and how a cut optimizer saves money on every project.

By Team OptimalLayout8 min min read

A cutting list optimizer answers one question: given these sheets and these parts, what is the layout that wastes the least material? It sounds simple, but it is a classic computer science problem called 2D bin packing, and it is NP-hard — there is no known way to find the absolute best answer quickly, so every real-world tool uses heuristics. This guide explains, in plain English, how those heuristics work, what the trade-offs are, and how much money a good optimizer can actually save you.

1234Each cut runs edge-to-edge through the current sub-region — never across a placed panel.
Guillotine cuts run edge-to-edge through the current sub-region — colours mark the sequence.

Guillotine vs. free nesting

The first fork in the road is how the sheet is cut. A guillotine cut goes all the way across the sheet, edge to edge — that is what table saws, track saws and panel saws do. Free nesting allows parts to sit anywhere on the sheet, tucked into corners or around L-shaped offcuts, but you need a CNC router or a jigsaw to make those cuts.

  • Guillotine — slightly lower yield, but you can cut it on any saw. Standard on cabinet shops and panel saws.
  • Free nesting — 3–8 % better yield on a typical mix of parts, but requires a router table or CNC.

OptimalLayout produces guillotine-friendly layouts by default so the diagram works on any saw. If you own a CNC and want denser packing, watch for a free-nesting mode in a future update.

How the algorithm works

Modern optimizers use a variant of the maximal-rectangles heuristic combined with repeated random search. In slow motion the algorithm does this:

  1. Sort parts from largest to smallest area — big parts first, because they are the hardest to place.
  2. Place the first part in a corner of an empty sheet.
  3. Split the remaining free space into rectangles that record every place a future part could still fit.
  4. For each next part, find the free rectangle where it fits with the least leftover width and height — this is the best-short-side-fit rule.
  5. Try both rotations when the grain allows and pick whichever leaves the tidier residue.
  6. When a sheet fills up, start a new one and continue.
  7. Repeat the whole run with dozens of different sort orders and random tie-breaks, then keep the layout with the highest yield.

That last step is what separates a good optimizer from a bad one. A single pass can miss the best answer by 10 %; running a hundred passes and taking the winner gets you within a percent or two of the theoretical optimum, in about a second on a phone.

Kerf, grain and edge trim

The algorithm is only as good as the constraints you give it. Three settings dominate the result:

  • Kerf — the width of material the blade removes. Under-set it and the last strip on the sheet won't fit; over-set it and you buy an extra sheet for nothing. Match your actual blade (see the kerf guide).
  • Grain / rotation lock — veneered and directional-pattern parts must not be rotated. Lock them in the parts list (see the grain guide).
  • Edge trim — 10–20 mm subtracted from each side of the raw sheet to remove factory-cut edge damage before the algorithm starts placing parts.

Reading the yield number

Every optimizer reports yield — the percentage of the sheet actually used by finished parts. A yield of 82 % means 18 % of the sheet becomes offcuts and kerf. What is a good yield?

  • Below 70 % — either you have very few parts, or your parts are much smaller than the sheet. Try a smaller stock size.
  • 70–85 % — typical for a mixed kitchen or wardrobe job.
  • 85–92 % — excellent; the layout is dense and the algorithm has little room left.
  • Above 92 % — usually only possible when parts happen to tile the sheet exactly.

Chasing the last percent is rarely worth it — a 90 % layout with tidy, easy-to-cut strips beats an 93 % layout that needs eight fiddly rips in the wrong order.

How much can you actually save?

On a typical kitchen project with 30–50 parts, a good optimizer cuts material use by 8–20 % compared to laying parts out by hand. Take a concrete example: a small kitchen needs 12 sheets of 18 mm melamine at €55 each. A hand-drawn layout uses 12 sheets; a well-tuned optimizer fits the same parts on 10, saving €110 in one job. Do that six times a year and it pays for a Pro plan several times over.

The gap widens on jobs with many small parts. A shopfitting run with 200 shelf pieces might be 15 sheets by hand versus 12 by optimizer — a 20 % saving, both in material and in cut time.

Common mistakes

  1. Forgetting the kerf — the diagram fits on paper, but not on the saw.
  2. Ignoring the grain lock, then discovering half the doors have the wrong grain direction on assembly day.
  3. Entering the nominal sheet size instead of the real one (a 2440 sheet is often 2438 mm on the invoice).
  4. Cutting in the wrong order — always make the guillotine cuts the optimizer suggests, so offcuts stay large enough for future rips.

Put it to work

Open the optimizer, enter your sheet size, add your parts, set kerf and grain, and hit optimize. You get a labelled cutting diagram, a sheet count and total cut length in seconds — the same output a €2,000 shop package produces, from your phone.

Cut order matters as much as the layout

The optimizer decides where parts go on the sheet; you decide the order you cut them out. A good layout cut in the wrong order becomes a bad layout — offcuts get chopped up before the next part can use them. Two principles keep offcuts useful:

  1. Rip long first, then cross-cut. The first cut on the sheet should be the longest guillotine cut the diagram shows. That splits the sheet into two large strips you can then work on one at a time.
  2. Always cut so the useful offcut stays whole. If a diagram shows an L-shaped waste area, cut so that the L becomes one rectangle plus one strip, not three fragments. Every time you cross an offcut you make it less useful for the next job.

The optimizer's diagram is numbered in cut order for exactly this reason — follow the numbers and you get the yield the algorithm promised, not a lower one.

Batching multiple projects

One of the biggest wins from a cut optimizer is batching: throwing all of next week's small jobs into the same optimization run. A single cabinet on its own might use 82 % of a sheet; three cabinets together often reach 92 % on the same three sheets, because the algorithm can slot small parts from job B into the wasted corners of job A.

In OptimalLayout, tag parts with a project name in the label field so the labelled diagram still tells you which shelf goes to which customer. The tag has no effect on placement — it only shows in the printed diagram.

When the optimizer says 'add a sheet'

Sometimes you add one more small part and the sheet count jumps by one. That is normal for bin packing — a single part that doesn't quite fit forces a whole extra sheet. Two workarounds:

  • Shrink the offending part by 1–2 mm if the design allows. Often a shelf can be 898 mm instead of 900 mm and the cabinet still closes.
  • Split it in two if it is a back panel or plinth that will be hidden — two pieces butted together on a hidden joint use much less material.

Rerun the optimizer after each tweak. Because the algorithm is fast, iterating on the design is cheap — most projects converge to their real minimum sheet count in three or four runs.

Reference table

ObjectiveOptimizes forTypical resultChoose it when
Fewest sheetsMaterial usageHighest yield, more complex layoutsMaterial is the dominant cost
Fewest cutsNumber of straight cutsSlightly more waste, faster at the sawLabour or shop time is the bottleneck
Shortest cut lengthTotal blade travelLess blade wear, fewer long ripsCutting thick or abrasive board
Grain-lockedFixed panel orientationLower yield by 3 – 8 %Visible veneer or matched fronts
What each optimization objective actually buys you.

Team OptimalLayout

Team OptimalLayout is a group of experienced makers and optimization engineers working every day on efficient material use in the workshop. We share practical tips, insights and clever solutions to help you cut less waste and work faster.

Related guides

Put it to use

Open the free OptimalLayout optimizer and apply what you just read.

Open optimizer