# Automatic rectangle packing

**URL:** <https://discourse.mcneel.com/t/automatic-rectangle-packing/124830>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [May 25, 2021, 3:12pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830 "2021-05-25T15:12:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![diederick](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/diederick/32/584028_2.png) [@diederick](https://discourse.mcneel.com/u/diederick)\
**Post date:** [May 25, 2021, 3:12pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/1 "2021-05-25T15:12:51Z")

</div>

I’ve posted a couple of somewhat related topics while looking into Grasshopper for interior/furniture design. [I’m was recently looking into solutions that allows me to generate dimension lines](https://discourse.mcneel.com/t/generating-dimensions-for-construction/124825).

Now I’m wondering if someone knows a way to generate a diagram that can be used to saw a wooden plate in the most optimal way and/or even suggests how many plates one would need to create the cabinet?

---

<div class="post-metadata">

**Author:** ![rajaa](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/rajaa/32/770789_2.png) [@rajaa](https://discourse.mcneel.com/u/rajaa)\
**Post date:** [May 25, 2021, 3:38pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/2 "2021-05-25T15:38:35Z")

</div>

Look for nesting solutions. There are few GH solutions posted publicly as well as some plugins in Food4Rhino.

---

<div class="post-metadata">

**Author:** ![diederick](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/diederick/32/584028_2.png) [@diederick](https://discourse.mcneel.com/u/diederick)\
**Post date:** [May 25, 2021, 4:12pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/3 "2021-05-25T16:12:55Z")

</div>

Thanks @rajaa

I’ve Googled a bit and I see there is RhinoNest and OpenNest. It seems that RhinoNest is a commercial product but there is also OpenNest. OpenNest is pointing to [www.food4rhino.com](http://www.food4rhino.com) which seems to be down atm; not sure if the side has been down for a longer time or if it’s just a coincidence.

What are the popular nesting options?

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [May 25, 2021, 4:22pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/4 "2021-05-25T16:22:29Z")

</div>

You should still be able to install OpenNest via the PackageManager.  
From Rhino command line type `PackageManager`, enter OpenNest in the search field, select it and click install.

---

<div class="post-metadata">

**Author:** ![diederick](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/diederick/32/584028_2.png) [@diederick](https://discourse.mcneel.com/u/diederick)\
**Post date:** [May 25, 2021, 4:26pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/5 "2021-05-25T16:26:25Z")

</div>

Thanks so much @DanielPiker. Did you maybe mean PluginManager?

When I search for `PluginManager`, hit enter and then search for OpenNest I don’t get any results:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/a/0/1a08779c184f817115589b7df076665df1eb971d.png)

---

<div class="post-metadata">

**Author:** ![DanielPiker](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/danielpiker/32/666337_2.png) [@DanielPiker](https://discourse.mcneel.com/u/DanielPiker)\
**Post date:** [May 25, 2021, 4:32pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/6 "2021-05-25T16:32:04Z")

</div>

No, PackageManager. If you’re on an older version of Rhino the PackageManager might not be available though.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/3/1/33176e37c32f9194cc24fde49ae11e594db1d33f.png)  
I see OpenNest is also on GitHub [GitHub - petrasvestartas/OpenNest](https://github.com/petrasvestartas/OpenNest)  
So you could get it from there, or ask @Petras_Vestartas who made it.

---

<div class="post-metadata">

**Author:** ![603419608](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/603419608/32/487406_2.png) [@603419608](https://discourse.mcneel.com/u/603419608)\
**Post date:** [May 25, 2021, 4:37pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/7 "2021-05-25T16:37:33Z")

</div>

Hi  
If you are a Rhino7 user execute “PackageManager”, Rhino6 user execute “TestPackageManager”

---

<div class="post-metadata">

**Author:** ![diederick](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/diederick/32/584028_2.png) [@diederick](https://discourse.mcneel.com/u/diederick)\
**Post date:** [May 25, 2021, 6:26pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/8 "2021-05-25T18:26:58Z")

</div>

Thanks again @DanielPiker and @603419608 this was a good moment to update from 6 to 7. I’ve installed it and going to look into OpenNest.

---

<div class="post-metadata">

**Author:** ![diederick](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/diederick/32/584028_2.png) [@diederick](https://discourse.mcneel.com/u/diederick)\
**Post date:** [May 25, 2021, 8:13pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/9 "2021-05-25T20:13:13Z")

</div>

I just stumbled upon this site [https://www.cutlistoptimizer.com/](https://www.cutlistoptimizer.com/) which seems to be perfect. I provides a nice way to cut a piece and gives a cut order. I’m not sure if OpenNest has a similar feature but I’m curious how I could create a list of for each panel with \<length, width\>?

---

<div class="post-metadata">

**Author:** ![Petras\_Vestartas](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/petras_vestartas/32/480531_2.png) [@Petras\_Vestartas](https://discourse.mcneel.com/u/Petras_Vestartas)\
**Post date:** [May 25, 2021, 8:41pm UTC](https://discourse.mcneel.com/t/automatic-rectangle-packing/124830/10 "2021-05-25T20:41:09Z")

</div>

Yes, bin - packing (for this specific function, you need to update to the latest version from food4rhino, because I did not update it in package manager yet)

> [@OpenNest with sheets sorted areas](https://discourse.mcneel.com/t/opennest-with-sheets-sorted-areas/123926/5):
>
> 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. An…
