Example nesting code?

unhandled

(Kiteboardshaper) #1

Hi Guys,

Have a need to nest groups of 2D curves to prep them for laser cutting.

I’ve tried the usual Generation Nesting tool but it cant deal with groups, don’t mind having a go at rolling something myself with GH or Python, just wanting to know if anyone has some code to get me started?

Example of the groups and the material limits attached.

Cheers

DK

180531_nesting of groups.gh (255.3 KB)


(Tim Stark) #2

Can‘t look at your file atm. Can you separaten them in different branches instead of grouping them?


(Kiteboardshaper) #3

Looks like I’ve sorted it:

Got to bail from office now - will upload code tomorrow.

Cheers

DK


(Kiteboardshaper) #4

So here is my solution to the problem.

Couple of notes - I only require the panels to be moved to the fabric - not rotated. It is important that the thread line directions are known/controlled in the process. This allowed me to cut the nesting code down to just a single jitter.

The nesting is done with just the outside curve (seam allowance) and then a separate piece of code works out what was moved where and does the same to the groups.

Actually easier than I expected and this will be a great feature for my tool.

Downside is the run time, about 40 secs for just these parts, and the complete program has a lot more - might not include it as a live feature in the main code base but use the data dam and a button to run as needed.

Cheers

DK

180601_nesting of groups_solved_discourse.gh (255.4 KB)


#5

just a note: you might want to check the license of generation…


(Kiteboardshaper) #6

OK - I’ll have a look


(Kiteboardshaper) #7

https://creativecommons.org/licenses/by-nc-nd/3.0/

My whole project is currently a hobby/interest only - not commercial - will sort that out if it ever changes.

Cheers

DK


#8

then you’re good. And in case you need to cut that part out of your definition, production companies often have their own nesting software