Easy nesting coding suggestion

Hey I was just reading a few threads on nesting and couldnt participate due to them being closed. Please forgive me starting a new one.

I see that it has been suggested that the nesting coding would be hard to do.
Can I suggest a different approach?
Agreed it would be hard to do if you wanted to work out the perfet nest, BUT what if only a semi decent nest was all you needed? Think of it like this…To break a cipher you can have software look for patterns, and crack the cyper with lots of AI (artificial intelegence), OR you can brute force the cypher and try every combination until you finally break it. The latter takes no AI at all, just computer crunching.
What if nesting was as simple as, there are X amount of shapes on the page, calculate thier area, calculate the material area, now randomly place the shaped into the origin corner ensuring they are seperate from each other by 2mm. Calculate the average area (elastic band area) they are taking and subtract it from the material area.The computer does this randomly 100 times and keeps the result that has the smallest average area taken up. ‘Bang’ thats your nest. Users dont care about a nest where the difference is 30% size redeuction for a brute force nest vs 40% for a calculated reduction.
Currently I nest my stuff by hand, It made me think, if I can nest with my own brain, then surely a computer can do this in a nano second with just a few rules. I think ‘dumb’ nesting would be better than no nesting. The user might also be offered the option on how many brute force trials the computer does before it selects the best answer.
Am I being too simplistic in my thinking?

A little - you’re not far off how it will likely be implemented. Most of the complexity is in deciding where you can place shapes. If you and I look at this pair, it’s dead obvious where to place them:

image

For a computer, it has to iterate through all the geometry and figure out where the intersections happen, and how to place the shapes so they don’t intersect. That by itself is very expensive, so you want to do it as little as possible. There are ways to make this faster, but they’re complex to write.

It’s not so much the “try a bunch of things and pick the best” that’s the hard part, it’s the “find any arrangement at all that works in a reasonable amount of time” that’s hard.

Thanks for your responce.
Ha ha Im glad to be too simplistic, as I wonder if sometimes we over complicate due to our personaility or mindset of how something should be done. (Talking about myself here)
OK how about this way of looking at the problem each shape needing to be nested has an imaginary circle around them. The computer just nests the circles. OR one step better, the shapes have an imaginary rubber band around them and the computer nests the blob shapes. I think Im try to say that even a crude inefficient nest tool is better than no nest tool.

For example, LB puts an invisible offset border around each shape and just nested those offset shapes. No rotating of shapes or anything fancy. It would do the job well enough for most of us. Sure its not perfect, but its better than not having anything. Call it an alpha test, suggesting there is better coming.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.