OpenNest with sheets sorted areas

Hi @Petras_Vestartas ,

I have four curves, which need to be nested into four sheets in the latest OpenNest version (03.04.2021).
For some reason the nesting fails. Here is a screenshot:

However, if I sort the sheets according to area (from largest to smallest sheet), then OpenNest successfully nests the four input curves:

Why is this so?

I would prefer to use (nest) the smaller sheets first, and then what is left to be nested on the larger area ones. But this is not possible at the moment.

Thank you in advance for any kind of help.

Attached is the file.
openNest_sortingSheets.gh (22.0 KB)

Yup this is a bug, I have been notified by another user. The algorithm stops if a current sheet is not nested. I need to solve it.

I’m wondering if for this specific case box packing would work better. But I believe you do not have rectangular objects and this is only an explanatory scheme?

1 Like

Hi @Petras_Vestartas ,
If I understood correctly, the algorithm will stop the optimization if at least one of the sheets (at any index in the input “Sheet” lists) is not nested? Or did I misunderstand you?

Yes, these are my real cases - rectangular objects. They are not simplified.
In essence, I am trying to use OpenNest for 1D cutting optimization. So only the width of each sheet/geo curve us important. The height is irrelevant, it can be any dummy value.

Yes.

If it is only 1d optimization maybe it is worth to write a simple code to find best fit.

I will also try to see if I can use box packing for such scenarios. But i do not remember if it accepts one or multiple sheets.

I try to solve this issue

1 Like

Thank you once again for the clarification Petras.
The problem for 1d optimization is that, the code which can be found online mostly does not take initial bars of different length as an input (sheets in case of OpenNest), but a user needs to define one, and then the code will just show how many of those bars of that length are needed.
If this is not the case, then, most of them seem to always start nesting the ‘geo’ from the longest towards shortest, which may not yield the best solution.

Any input from your side on this issue, is welcomed.

This is a 1D packing problem that I did some extension to 3D box packing algorithm.
The method incrementally packs all the containers and leaves empty ones without possible solution. I also added the T output to transform custom geometries within boxes. The nesting sequence is the container list sequence.

BoxPackingWithoutRotations.gh (23.2 KB)

Also works for scenarios like this:

Since this is the first implementation (at least for your given case it works not tested more), you must specify sheets yourself at your desired positions else boxes will overlap.

I only release this version here, if you want to use it, replace the OpenNest.gha with this one:
OpenNest.zip (183.7 KB)

1 Like

Hi @Petras_Vestartas ,

Ačiū!!! This is a great component!
Just a few small comments, in case you have free time in the future.
When I increase the number of ‘Geo’, but keep the sheet crvs, some transformations get buggy. I attached one such example.
‘D’ input seems to not work.
BoxPackingWithoutRotations2.gh (17.7 KB)

Once again, thank you for this contribution and the addition.