OpenNest New Release 🎉

OpenNest was released with new nesting engines written in C++ :partying_face: .
YAK packages are now automated using GitHub Actions for Windows and Mac.

Documentation:

There are three key components:

  • Old Interface of OpenNest 1 to maintain the legacy interface.
  • OpenNest 2, with a rewritten core.
  • OpenNestCollision version.

User interface is made for:

  • Grasshopper 1 (Primary) (C#/C++)
  • Standalone OpenNest (C#/C++)
  • Grasshopper 2 (Experimental) (C#/C++)
  • ScriptEditor for Python Developers (Python/C++)

Source code:

Installation: Rhino 8 → Package Manager (_PackageManager) → search OpenNest → Install.

The project is credited with all the key references studied over the past years.

Some examples:

Experimental 3D Nesting, recommended to scale up meshes a bit to avoid collisions and then use transform output to transform non scaled elements:

Rhino Command “OpenNest” :

Grasshopper2: I kept same workflow to match between GH1 and GH2

Python Developers: you can also use OpenNest for your own workflow using Python:

aab9d56e-b1a0-407c-8c37-5600fc8ab906_ko-ficircle

Thanks @Petras_Vestartas! :saluting_face:

I’ve noticed on macOS in the Rhino 8 (8.31.26126.13432, 2026-05-06) that the Options buttons seem out of alignment comparing to your component screenshot above:

Thank you, updated:

Thanks for the hard work Petras, this is awesome!

I wonder, is there any way to still set options externally to the component? My defs needs to be used by other people and sliders are only at the beginning of the def.

Also, it was nice to have a boolean gh button to trigger the calculation.

Again, thank you!

I am wondering how often do you change the options, would the run be enough?

For collision component i can make same as for opennest1, since OpenNest1 and OpenNest2 is only user interface difference.

It’s true that options are not changed that often. I would say that boolean alone would be enough!

I was also using spacing/gap semi-often, which was the same slider connected to sheet offset, because there is not way to set an offset from sheet borders.

But I guess that is a minor detail.

I will then move run only as the input.

BTW the offset I placed now at the sheet and geometry level, because before we could not change sheet offset. Now you can change both.

Thanks @Petras_Vestartas for this major update!

What do you think about allowing different rotation constraints for some objects within a single nesting process?

In many cases, freeform objects can benefit from 360 rotations to achieve the most efficient packing, while “rectangular objects” often need to be limited to only a few orientations, such as 4 rotation steps. Currently, this can require separate nesting operations, even when all parts belong on the same sheet. It could be useful to assign different rotation settings to different groups of geometry so that all parts can be nested together while respecting their individual orientation requirements.

Perhaps this could be achieved through Grasshopper branches, where one branch could use custom rotations and another branch could use 4 rotations within the same nesting operation.

Great idea!

On API level this is already here, but not on Grasshopper user interface.
Yes it would result in faster packing, correctness when aligned to a direction and potentially tighter packing.

Since elements to nest have their own component, it can be a parameter of them.

Dear Petras,

why do you canceled the opennest options as single component? We taked place opennest in clusters and have inputs like rotation and seeds outside. now our definitons don’t work! we must rebuild the workflow new - in a running system for our clients. That is not amuseable. please think about this. Tobias

There is always a fixed previous version, that what is the version control used for. So your code and your client code would always work.

Since I don’t have any clients using OpenNest, I’m not familiar with the actual use cases. I am not getting paid for this, except having fun in development.

I’ll consider bringing the Options back into the OpenNest2 component, as they were before.

That said, please keep in mind that the library is continuously evolving. New options are introduced, the solver has been upgraded because the previous version did not perform reliably, and some optimizations were getting trapped in local optima. I’m also constantly discovering new ways to improve the nesting process and achieve better results. Let alone, it was rewritten in a completely different language.

For these reasons, maintaining full backward compatibility can sometimes be challenging.

Hi @Petras_Vestartas,

I wanted to raise a constructive point regarding the use of custom “on-component” UI controls in Grasshopper components, as it can inadvertently introduce friction for certain workflows.

There is a growing segment of the community using non-canvas user interfaces—such as HumanUI, Synapse, or DKUI—and some who even compile .gh files into headless Yak-deliverable Rhino plugins. In these scenarios, the end-user has zero access to the actual Grasshopper canvas.

When standard input parameters are replaced entirely by custom capsule controls, it removes any possibility of remote, automated, or off-canvas control.

I completely understand the passion behind this—I volunteer my own time to maintain and upgrade a free to use GH plugin (DKUI). It is incredibly rewarding, and I gladly do it because the tool benefits my own development.

However, I have realized that as a user base grows, so does our architectural responsibility. The longer a plugin is “in the wild,” the more people rely on it. Some of these users eventually base paying client work on our tools. Because of this, a primary goal in my own development cycle is ensuring that new feature upgrades do not break downstream workflows or isolate the components from the broader ecosystem.

Thank you for all the amazing work you put into your plugin. I hope this feedback is helpful for its future evolution!.

Cheers

DK

hi @Petras_Vestartas
I installed OpenNest using the Package Manager. It runs successfully in Grasshopper 1, but it does not run in Grasshopper 2. Is there a way to install or make it work in Grasshopper 2? (All versions are up to date. Windows – Rhino 9 WIP,Rhino8)

That’s great to hear. Having the rotation constraint as a parameter of each element would actually be even more flexible. Since the API already supports it, exposing it through the Grasshopper interface would be a very valuable addition. It could also reduce computation time by limiting the number of rotations evaluated for certain parts while still allowing unrestricted rotation where needed. Is this something you are considering implementing in a future version?
Out of curiosity, how do you envision passing that information to the nesting component? Through a dedicated rotation input, or perhaps as metadata attached to each element similar to key/value properties?

Adding rotations at the geometry level:

I am waiting for the David Rutten reply here: Yak Grasshopper 2 and 1 - #12 by Petras_Vestartas

@Petras_Vestartas This is amazing, will begin testing the C# API now!

I have pushed a new update x>2.73.0 with the following Change-log:

A 5-10% better packing for OpenNestCollision component, comparing to previous release (10 000 iterations):

OpenNest2 no-fit-polygon nesting within x<2000 iterations can also delivery relatively good results:


Added “Rotation” option at the geometry level. You can control element rotation. In the screen shot below I’ve set rotations to 4 for rectangles (90 degrees rotations), other elements are rotated 360 times (1 degree rotations):

The options works in both ways: a) when options component is connected to the solver, b) or using drop-down menu. The “Options” component will adapt when connected to a solver, as parameters are different for each case. Other wise you can change the layout of parameters by the right click of the solver input:

Examples are on Food4Rhino:

Grasshopper 2 is available only on Rhino 9 WIP, and you need to install it manually. But when you install OpenNest through package manager, you need to manually load opennest_gh2.rhp file from the Plugins, you can find this file by searching on your pc, I use “Everything” tool:

Lastly, Examples and API was unified across CPP, CSharp, Python, source code is attached to each example. CPP is built using CMake. And this issue was resolved: np_nest spacing parameter causes all parts to be rejected · Issue #8 · petrasvestartas/OpenNest · GitHub

You are always welcome to contribute via pull-requests on: GitHub - petrasvestartas/OpenNest: 2D Nesting · GitHub