There are two ways to solve an order. The first is to open a new sheet straight away; the second is to try the offcuts on the rack first and move to a sheet only if they are not enough. Both produce a valid plan, but their costs are not the same: the offcut has already been paid for, the new sheet has not.
At first this choice was left to the solver. Offcuts were added to the list of candidate sheets and prioritising them was treated as the engine's job. It was measured, and the assumption turned out to be wrong: the engine tries to reduce the number of sheets, not to favour an offcut. Given two options it takes the one that uses fewer sheets, and it can ignore glass that has already been paid for.
So priority was written into the caller rather than the solver. The order is first solved using offcuts only; parts that do not fit come back and are solved in a second pass against standard sheets. This two pass approach treats the same order against two separate pools of material and makes the order of preference explicit.
The result sometimes uses more sheets, and that is a deliberate trade. Using an offcut from the rack is cheaper than opening one more sheet from inventory; but that is only possible if the offcut is actually recorded. Glass that has not been written down with its dimensions does not exist in inventory, even while it sits on the rack.
A cutting optimisation program has to say this behaviour out loud, because the user sees the result and asks why it opened two sheets. The answer sits on the plan screen: the first sheet is an offcut from the rack, the second is new. If a sheet optimisation program hides that, trust goes with it.
For this approach to work the offcut has to be recorded with its dimensions. If a piece from the cut goes onto the rack without being written down it counts as absent from inventory; the engine cannot see it and the first pass comes back empty. Four pieces of information are enough: width, height, glass type and where it is kept. The moment those four are written, the piece becomes searchable.
Offcut use has limits too. Not every piece fits every job; edge condition, scratches and glass type mismatch are real obstacles. What the system does is not to force offcuts into use but to remind you of the suitable ones. If none is suitable a new sheet is opened, and that is not treated as a failure. The aim is not to consume an offcut on every order but to avoid forgetting what is already there.