How it works
How ForgeWorks picks a cutting plan
Your bars come off fixed stock lengths, so the steel you buy is not the steel in the structure. Working out how to cut a schedule out of stock is a genuinely hard problem, and ForgeWorks does not pretend to solve it perfectly. This page says what it actually does, how close to optimal that lands, and where it does worst.
What the nest is choosing
One objective: buy the least total stock length. Each bar diameter is packed separately, because bars of different diameters cannot share a stock bar, and within one diameter the least purchased length is also the least purchased mass.
Everything else — how many bars are opened, how much offcut is left, what the plan costs — follows from that one choice.
The algorithm
Pieces are sorted longest first and placed with Best-Fit Decreasing: each piece goes into the open bar that will have the least room left afterwards, and only opens a new bar when it fits nowhere. Retained offcuts from earlier runs are offered to the packer before any new bar is.
That is one plan. ForgeWorks packs several and keeps the cheapest, per diameter:
- Your stock list as configured — opening the smallest bar each piece fits.
- Each stock size on its own. The mixed pass is greedy about bar size, so on its own it would buy two 12 m bars for a schedule one 15 m bar would hold. The single-size passes catch that.
- One mark per bar. Uniform pieces of a single mark sometimes tile a bar exactly where a mixed pack leaves an unusable tail. This is also what a yard does without software — so including it means the plan can never be worse than cutting mark by mark, and where it wins it is easier to execute besides.
Offcuts at or above your reusable threshold are kept and tagged for the next run; anything shorter is scrap. Kerf defaults to 0 mm because rebar is sheared, which removes no material — set it only if you are sawing.
How good is it, really
Best-Fit Decreasing is a heuristic. The exact answer to this problem is NP-hard, so the honest question is not whether the plan is optimal but how far off it is. We check by brute-forcing the true optimum on schedules small enough to solve exactly, and comparing.
| Case | Hit the optimum | Mean gap | Worst case |
|---|---|---|---|
| Single 12 m stock, no kerf — the shipped default | 96.40% | 1.40% | 50.00% |
| Single 12 m stock, long pieces | 100.00% | 0.00% | 0.00% |
| Two stocks, 12 m and 15 m | 56.50% | 5.27% | 25.00% |
| Single 12 m stock, 5 mm saw kerf | 96.67% | 1.56% | 50.00% |
800 randomised schedules, overall mean gap 2.05%. The worst cases are real and we are not hiding them: on a six-piece schedule a bad split can cost one extra bar, and one bar over a two-bar optimum is a 50% overshoot. That is the arithmetic of small numbers, not a pattern — the median and 95th-percentile gap in that same single-stock case are both 0.00%.
Where it is weakest: small schedules, two stock sizes
Give the packer two stock lengths and a handful of pieces and the gap widens, because the choice of which bar to open matters most when there are few pieces to absorb the mistake.
| Schedule size (12 m / 15 m stock) | Mean gap from optimum | Worst |
|---|---|---|
| 6–8 pieces | 4.55% | 25.00% |
| 9–11 pieces | 7.93% | 25.00% |
| 12–14 pieces | 10.07% | 25.00% |
Real rebar packages are not that size. Past the point where brute force is affordable we bound the gap from above by comparing against a perfect-packing lower bound — a plan with literally no waste, which is usually unachievable — so the true gap is smaller than these numbers:
| Pieces in the schedule | Bought more than a perfect pack, at most |
|---|---|
| 25–60 | 4.38% mean |
| 150–400 | 1.08% mean |
| 600–1,200 | 0.56% mean |
The pattern is the useful part: the bigger the package, the closer the plan gets to the best one that exists. A tender-sized schedule is the good case, not the bad one.
Two things that are guaranteed, not measured
It never loses to cutting mark by mark
Because per-mark packing is one of the candidate plans, the result can only be as good as or better than cutting each mark from its own bars. Across 420 randomised schedules there were zero in which nesting bought more steel than the mark-by-mark baseline. What it saves against that baseline, by schedule shape:
| Schedule | Saved vs cutting mark by mark | Range |
|---|---|---|
| 8 marks, qty 1–40 | 8.30% | 0.00% – 17.48% |
| 17 marks, qty 1–40 | 10.41% | 5.90% – 16.37% |
| 17 marks, qty 10–200 | 7.31% | 2.34% – 11.52% |
| 25 marks, qty 10–200 | 8.09% | 5.44% – 11.50% |
| 60 marks, qty 10–200 | 8.86% | 6.48% – 11.04% |
Adding a longer stock length never makes it worse
Configuring 12 m and 15 m instead of 12 m alone was worse in 0 of 750 schedules — identical in 431 and better in 319. The longer bar gets chosen when it packs better, not only when a piece is too long for the shorter one.
On the demo project
The worked example the app loads on first open is 17 marks and 1,004 pieces across pad footings, ground beams, columns, beams and a suspended slab. Nested on 12 m and 15 m stock with no kerf, it buys 242 stock bars:
| Theoretical weight — what the schedule says | 4.101 t |
|---|---|
| Nested purchase weight — what you order | 4.304 t |
| Difference | 0.203 t — 5.0% over theoretical |
| Saved by nesting — vs cutting each mark from its own bars | 5.43% |
Five percent is not a dramatic number and we will not dress it up as one. It is the number on this schedule, and it moves with every job — the stock lengths you buy, how uniform your marks are, and how much of the package is short bars. The point is that a spreadsheet does not show it to you at all, so it lands on the job instead of in the bid.
Checking it yourself
Every figure on this page comes from a verification harness that runs the shipped calculation kernel against a brute-force optimum — not from a marketing estimate. The app carries its own kernel checks too: open Kernel checks in the sidebar and it runs them in front of you, including the developed-length and bar-mass cases. The calculation basis document sets out the formulas.