Opennest with Pack Objects Script

Hi all,

I am trying to build a script to combine pack objects and opennest (latest update), based one existing geometry in Rhino (both outlines and attributes). Goal is to have a universal script, for geometry like this:

I am aware that there would be other approaches (e.g add numbering in a later stage), but I am aiming to be more modular in my approach to using grasshopper: baking more often and transforming manually the things that are easier to do in Rhino, and loading geometry again in another GH script.

I almost got it to work (script in attachment), but encounter an issue:

using transform of the the pack objects component does not give me the correct transformation:

I assume it has something to do with the planes I use (derived from planar component), but cannot sort it out.

Moreover:


→ the algorithm does not come up with solutions like this:

Is there a way to modify parameters to get solutions like this?

Thank you in advance for your help, and thanks again to Petras for an amazing plugin and a great update with v2.
Opennest_With_Packing.gh (86.6 KB)

any ideas?

Thank you!

It works well with xy-planes


The nesting kan be improved i. e. by increasing thr number of rotations:

RE Opennest_With_Packing.gh (83.1 KB)
1st time I try OpenNest2, some things have changed as it seems…

Thanks for your reply!

The issue is that the numbers have a different orientation compared to the original. For numbers it is not that much of an issue, but for other geometry it will be. I want to use the pack objects component to have a more uniform nesting.

Even with 360 rotations, it does not come up with a ‘flipped symmetry’ solution as in my example.

Did you try to download example files from food4rhino and nest geometries with attributes?

This is really annoying, but the definition simply works as is…I was confused by the weird positioning of the numbers, but they correspond to the original. My bad, sincere apologies.

I did come a long way to optimise the script (added it in attachment, hope it can be useful to others). It features:

  • dynamic selection of objects within rhino using gh remote.
  • No need to select outlines and ‘attributes’ separately, the script filters based on colour and curve length and matches.
  • optimised packing using minimum bounding box

Thanks again!
UTIL_Pack_Nest_Rhino_Objects.gh (36.9 KB)