my Attempt at 2d concave polygon nesting in ruby within Sketchup
This is early days.
I've got the following issues:
-
I need to put more work to placing one polygon completely inside the outline of another before the no-fit-polygon alorigthm. (inner fit alorithm)
-
I know this isn't going to be fast. It's interpretted and I'm not a ruby expert, so I'm probably writting slow code.
-
I probably need to go back and add in circular arcs...but I might wait till after I've got optimising algorithm working
-
I've got to do an optimising routine....currently I only have the no-fit-polygfon done (inner-fit)
I base my work upon the good work of Jack Qiao (https://github.com/Jack000/SVGnest). Who inspired me to have a go at my own sketchup based code. I only got this far by standing on his shoulders.
I'd one day like to be able to generate CNC code with this stuff....but that is so far away, it's not worth thinking about.