I’m starting a new project. The problem I need to address is now glass cutting and how to optimize a set of cuts to satisfy an order of cut glass sheets. The algorithm I used is the following:
- Get the largest piece of material from the order.
- Get the smallest piece of material from the available material that can contain the ordered piece.
- Repeat the process.
It seems to be working just fine for a large set of examples. I cannot find some example where it would fail to produce the best result. There were some constraints I had to take into account.
- Cuts should always be done from side to side on the available material and the cuts should be done perpendicular to the largest of the sides of the material whenever possible.
- Each cut should be independent of the previous cuts and sequential in case there’s a glass breaking or anything else. In that case the cuts should be able to be “replayed” from the failure point forward after doing the correction.
Here’s an image of the result.