Example nesting code?

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)

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

Looks like I’ve sorted it:

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

Cheers

DK

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)

2 Likes

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

OK - I’ll have a look

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

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

Hello, i’m wondering if there is any incentive to write this in python script?


I’m just going to leave this here.

2 Likes

@emerson.porras, thanks for that.

As an update on the whole thread in my own script I’ve replaced the Generation components with Openest and the have seen an improvement in both function and performance.

Cheers

DK