Best-Fit command in Rhino

I am wondering if rhino has a built-in option which can automatically fit solids and/or surfaces on each other in the best way possible, without the need of any manual positioning.

Thanks in advance.

Hello - It does not… at least if I understand your query - do you have an example?


I think the only way to do this is in Rhino is using Grasshopper with plugins like Galapagos (evolutionary optimization algorithm) and Lunchbox (neural network, machine learning), also Owl (neural network).

There are some examples in the old grasshopper forums, but you’ll have to search, I don’t have a lot of bookmarks in there.

Dynamic relaxation might also be capable of solving such tasks, you should check Kangaroo as well.

For example this image. I have a surface in yellow and a certain solid in black. I would like to fit this yellow surface automatically in the best possible way. Not needing to keep trying manually.

Are these surfaces curved?

That will make the task even more complex.

Nevertheless, make some research yourself. What you are looking for is a nesting algorithm. You have 4 options:

  1. Make a script covering all possible translations and all possible rotations.
  2. Google “nesting algorithm”. Pick one that is most comprehensible and implement it in Grasshopper. All of these (as I already said) use either Evolutionary Optimization or a Neural Network.
  3. Buy a nesting software or dig up a free one, but that will not work with curved plates.
  4. Hope that someone in this forum will give an algorithm. (That will never happen)