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.

So fantastic - saved me a ton of time today! THANK YOU

Hi @Petras_Vestartas ,
I’ve seen the topic about the latest OpenNest realease. Thank you for still supporting this great project.

Do you know if the upper transformation bug with “Packing Boxes” component got solved in the newest OpenNest release?

Yes I fixed that for boxes (current version).

Some of the fixes for the main opennest component I am still working on, soon it will be updated in the next release :crossed_fingers:

1 Like

Hi @Petras_Vestartas ,
That is great! Thank you once again for further perfecting OpenNest.
Just last question: all these new updates for OpenNest are for Rhino 8 version only?
Available either via Package Manager, or food4rhino?

1 Like

Yes currently all the updates will be for Rhino8, I think Rhino7 cannot be downloaded.
Also everyone needs to shift towards .NET Core instead of .NET framework. I want to maintain different configurations as less as possible :slight_smile:

1 Like

2D

3D

1 Like

Thank you very much once again @Petras_Vestartas !