Nesting or organisation of shapes

I have a 900x600 laser, and a file with about 230 individual parts that will need many different sheets to complete.

When I import my dxf file, I have a heck of a job going through and organising which parts fit and selecting/deselecting which to cut.

So, I have to do all of that outside of Lightburn and then bring the nested file in to cut.

One thing I like about Lightburn is that I rarely have to go out to a third-party app to get things done, so a built-in nesting tool would be a real boon.

Thereā€™s a few open-source ones to look at that could become the basis for a Lightburn nesting tool:

https://deepnest.io is the best I have found to date.

1 Like

The problem with open source is that if you use them in your software, you have to make your software open source as well. OZ will need to write his own nesting software if he wants to add the feature to LightBurn.

That is not always true, it depends on the license. I checked deepnest and itā€™s license allows for commercial use in closed source projects. That said, many devs donā€™t want to deal with the legal aspects of using open source and will just roll their own to avoid it.

Nobody suggested using open source software, and youā€™re wrong about having to make yours open source.

Not a programmer or patent lawyer, I take it?

The suggestion was to get ideas of how nesting algorithms work, not to clip code

I emailed Oz a while back to see if he had considered investigating the possibility of incorporating Deepnest code into LB. He said he had looked into the coding/design and that it wasnā€™t a good candidate for being part of LB.

SVGNest has a permissive license, though Iā€™m not sure if DeepNest does as well. Both are primarily written in JavaScript, and not nearly as modular as they could be. Implementing nesting is on my wishlist, but itā€™ll take a chunk of time to do.

3 Likes

Thanks. It would be a useful tool.

2 Likes

After doing some more work with Deepnest, Iā€™ve come to the realisation itā€™s a complete pile of poo. It does a great job of nesting, but it doesnā€™t handle dxf files properly - my 380mm object came in at 1077mm.

After playing around some, I managed to get it in at 400mm-ish. Not close enough.

What kind of numb nut produces something that changes the scale so badly?

Apparently the author hasnā€™t been seen since he produced it - thereā€™s an increasing bug list and he hasnā€™t addressed a single one, so Deepnest is off the list.

Iā€™ll give SVGnest a look, but never work in SVG files and would have to do multiple conversionsā€¦ grrrr.

DXF files do not store the unit of measure used, so that could be the issue. If you saved it in cm but load it as inches, for example, the scale would be 2.54x larger. Iā€™m amazed that DXFs (being a CAD / engineering format) have this issue.

Iā€™ve dug through the code a bunch and itā€™s a bit of a mess, and almost entirely written in JavaScript, so it would need a full port. Itā€™ll happen, but itā€™ll take time.

Yeah, Iā€™m not new at thisā€¦ 40+ years of systems engineering means I donā€™t make basic mistakes like mix up mm and inches. His app is flawed.

I never use inches, for anything. It would take a conscious and determined effort. Iā€™m a product of binary, decimal/metric and hex. You can keep yer weird base-12 Latin nonsense.:wink: Heck, Iā€™m for going full metric calendar!

Iā€™ve tried putting in various numbers to the SVG ratio to try and work out where the calculation is. I suspect heā€™s converting from metric to inches and back multiple times and building up such a set of rounding errors that my 6mm becomes 6.92mm in just a few moves. Iā€™ve seen that kind of thing in CNC apps and slicers, too.

And thanks for the commitment - nesting is such a time-consuming task and if you can knock it off, will truly make this (more of ) a standout product.

Andā€¦ while weā€™re on the subject of shape management, I would like to see some method of chaining jobs.

For example: I have 7x sheets worth of shapes to cut. How I handle it at the moment is to manually nest a full sheet, group it and assign it to a non-cutting colour. Repeat for the other six sheets. Then I pick a sheet, assign it to a material, flip the ā€˜cutā€™ tag, move it to the centre and run. Repeat for the other six.

A way of stacking those seven groups and running through them sequentially would be fab.

Of course, I may just be looking at it wrong (itā€™s been known to happen) and my workflow is whack.

I had a similar problem with things not scaling correctly. I try to convert to .svg first since it seems to work best. It is funny how you can run the same file multiple times and get different results each time. Sometimes barely different in terms of efficiency but other times unacceptably different. Nature of the beast I guess but you have to hope you donā€™t get a bad ā€œrunā€ if you only run it once.

You know the same guy wrote svgnest and then Deepnest, right? Each has its flaws but at least svgnest is free. Since he isnā€™t making money on it, I give him props for maintaining a website that can sometimes be helpful.

Add your vote here to get updates when development starts / progresses:

The plan for this is to have multiple pages within a LightBurn file, all sharing the same cut settings.

1 Like

No, the developer of deepnest took svgnest and added stuff, like dxf import.

Svgnest works fine, but I was trying to avoid another conversion.

And if he maintained it, it would probably be fixed. He has 58 outstanding issues, some of which date back to when he released the app. Heā€™s not replied to a single one.