Question about placements of multiple quantity part
Hi,
First of all, great work. Thank you so much for this.
I have noticed I get this kind of result often:
And I wonder if you have some clue where one should look to fix this so that in this situation, the parts "falls" into the left.
I think it is caused by a floating point collision between the already placed parts and the to be placed part. May be you have some idea how it can be fixed.
Thanks again !
Hi, thanks 👍 Unfortunately, I'am not actively maintain this project at the moment (due to lack of free time). I think it's better to check , if the same problem persists in the original JavaScript project (DeepNest) with the same parts. if it does, then solving it is out of scope of this repository (maybe it's better to create a separate branch or repository) . If not, then it's better to fix this bug ASAP
Not 100% sure , but I'll probably have some free time to delve into it soon. If anyone can participate I'll be glad. Thanks for reporting.
Yes, same problem with deepNest. I will try to find a solution. I have to dig in the code a bit. Lets see :)
I will keep you updated. thank you again !
Hi. I have been digging a bit in the source and I came out to the conclusion that the problem is not so much linked to the fact that a piece fit or not in the unused space, but how the generic algo works.
I think it lacks some heuristics to handle simple and repetitive geometries. The approach works well for a set of random shapes, like lettering or organic shapes, but not for fitting as many identical rectangles as possible onto a sheet.
I need a nesting component fit for industry for my applications so I will create a derivate repo based on your work. If you want to contribute you are more than welcome, but I understand if you don't have time.
Btw did you port everything from the original JavaScript project to C#? Alone? Your work is very valuable to me. Thanks again !
Hi
Hi. I have been digging a bit in the source and I came out to the conclusion that the problem is not so much linked to the fact that a piece fit or not in the unused space, but how the generic algo works.
I came to exactly the same conclusions in the past. As for me, it is just a big calculator to stick polygons together (by using the Minkowski alorithm) and a pretty weak heuristic.
I think it lacks some heuristics to handle simple and repetitive geometries. The approach works well for a set of random shapes, like lettering or organic shapes, but not for fitting as many identical rectangles as possible onto a sheet.
From my perspective, there are several ways to improve the quality of the nesting process:
- improve the heuristic itself,
- replace/boost genetic algo to/with something else.. tabu search ?..neural networks ?..,
- try to reduce the number of bad results (the easiest way). For example, by having a bunch of more stable packing algorithms under the hood that operates with simplified parts (something like 2d box packing, guillotine, irregular strip packing, etc (most of them have implemenations on github)) and using the most appropriate algorithm for various inputs. They can probably be run in parallel, and the best result can be selected later. Thus, simlple algorithms can be used to reject bad nestings.
I think, It will significantly increase the robustness of the nesting process .
I need a nesting component fit for industry for my applications so I will create a derivate repo based on your work. If you want to contribute you are more than welcome, but I understand if you don't have time.
I would be happy to contribute (if I can be useful somehow)
Btw did you port everything from the original JavaScript project to C#? Alone? Your work is very valuable to me.
Yeah, it was one of my first ports JS → C# , later I made an even more complex port (https://github.com/fel88/Dagre.NET) it was really exhausting. But JS has a great built-in debugger, so it was kinda of a meditation to compare two data flows in two debuggers and make them work the same way.
Thanks again !
You are welcome