Optimizing cutting length for model making

Hi all,

I am currently building a model and have limited materials to use, 1 meter thin steel rods. I have a list of lengths to cut too, and trying to optimize the data so i find the right combination of length that would fit this 1 meter. So i would need to add a combination of numbers that approximates 1 meter (cant be more) for all the values on the list. This may be combining 5 numbers or 2 numbers untill all of the numbers are used. Is it possible to do this with grasshopper without using python?

For example, one combination could be item 23 and 24: (426+456 =884) and item 16, 17, 18 (315+ 324+334 = 943), etc. What would be the most efficient way to do this? I hope with makes sense.

optimazing cutting Length.gh (8.9 KB)

1 Like

Hi @seraphin_bouchard
Here’s a script I’ve constructed for just that purpose. It utilises ordered best-fit bin packing - basically 1D nesting. Included is a small visualisation of the nesting.

The code is a mess, but it works - I’ve developed this and used it throughout several projects. First in calculating the amounts needed, and then nesting the finished pieces.

I know you anly wanted 1000mm precuts, but I added the 1200 as well so you see how to add different precut lengths and amounts there.

optimazing cutting Length.gh (23.5 KB)

5 Likes

Great! this works perfectly. Thanks a lot :slight_smile:

This tool is awesome for my workflow. Thanks !