Issues getting all geometries to nest on sheet

Hi all,

Trying to get a script running for nesting some flat geometries for laser cutting but running into some issues getting all the shapes to show up on the script. All of the geometries appear to be linked but some just aren’t registering on the opennest solver. Any help is greatly appreciated!


All the tied geometries

Versus what makes it out of the opennest solver

2.1 Laser Nesting Script.gh (11.0 KB)

You didn’t internalise your geometry (right-click on Geometry component and pick Internalise data).

-Kevin

2.1 Laser Nesting Script.gh (12.6 KB)
My bad, the data should be internalized now

Coming out of the Join Curves component are 70 curves, all but 7 of them are invalid.

If you delete the duplicate lines before the Join Curves component you get 23 closed curves that all nest.

2.1 Laser Nesting Script_re.gh (15.9 KB)

-Kevin

I was short on time when I wrote my post yesterday, this probably comes closer to what you are trying to achieve.

2.1 Laser Nesting Script_re2.gh (15.6 KB)

Instead of just culling the duplicate line segments, this divides them into groups before joining them. The result is 39 closed curves instead of 23. I’ve just grouped the input line segments based on midpoints. This works with your input geometry, but to create a more robust solution you could add more selection criteria to the grouping code (start/end points, length, etc…).

-Kevin