OpenNest impression

I spent couple days try to dive into OpenNest’s algorithm. I have learned something from it, and this will be more like a note sharing following with some questions.

First of all, amazingly done component.

I have had this chance try to use multiple objective GA tools (wallaciX or Tunny) to explore openNest. I think there has been some people have tried it. However OpenNest being too nicely done. The component itself won’t give much variant as random sampling, which is not that desired for GA doing exploration search.

Therefore I dived into the openNest code , (thanks for making it open source). I find out the OpenNest.dll actually link with SvgNest . And browsing thru the code, found there’s a GA inside .

Which means, the nesting itself has already been optimized by GA internally, so it’s hard to make it with some degrees of variants.

For my purpose, I needed to somehow force some geos, closer to each other and place them into several sheets. I have tried group nesting tool, but seems it only works on 1 sheet. Also a great component, letting user to choose the placement type(gravity, sqeeze… not sure if it’s the same as the number feeding in placement on OpenNest)

So, the situation was like that. I concluded I have 2 ways do-able and possible.

  1. understand SvgNest, and write a C# version from js code, decouple the GA and fitness score as output (which can be optimized by Tunny or WallaciX

OR

  1. use NodeInCode and utilize the branch data structure, and randomly pick some sheets out from the prepared sheets to nesting branch by branch to create the variant which Tunny can optimize with.

The first one will cost me a lot of time, I ended up giving up the idea. BUT I still think it’s such a needed feature for some amount of people.

Any thoughts and comments are welcome. Maybe what I did was wrong and not worth. Or maybe there’s this customizable side of OpenNest, I am not knowing of.

1 Like

To add what I wanted to say, I think OpenNest, or SvgNest have 2 main part logic : cached No Fit Polygons (fast computing non-overlap zone) + Adam Optmization. I believe some cases we would like only the goody from No Fit Polygons (fast computing non-overlap zone)

I can expose No fit polygon from boost library.
But there is more than NFP and GA algorithm solely.

I am planning to have C++ library without .NET and Rhino with a simple OpenGL viewer.

In that case we could get into more nifty details and collaborate on GitHub in fully transparent code. SvgNest was a good start and it has been changed in various of ways but the optimization algorithm is far from good and I clearly know the border conditions where things just dont work. It is more about defining various heuristics depending on specific context, rather that running different optimization solvers.

I let you know when it is published with a proper contribution guide.

1 Like