LightBurn: Nesting Shapes

A question on the LightBurn forum about packing shapes onto an irregular piece of leather let me work out the details of a LightBurn feature I thought I understood but had trouble explaining.

Start with an irregular shape:

Random fabric - overview
Random fabric – overview

That’s made of rags from the box o’ wipes out of view on the right, laid out in no particular order, on a contrasting background to simplify the next step.

The camera tucked into the lid shows the view from above:

Random fabric - LB camera overlay
Random fabric – LB camera overlay

Tap the Trace button and fiddle with the sliders to get a nice solid outline, along with other junk off the edge of the cardboard:

Random fabric - LB trace
Random fabric – LB trace

All of the traced vectors will be in a group:

Random fabric - LB shapes
Random fabric – LB shapes

Ungroup them, select the outline in the middle, invert the selection, and mass-delete the junk around the edges.

If you don’t move anything, the outline will be exactly over the shape on the platform. This will come in handy later.

Import all the shapes you want nested inside the outline, group them with the outline, and hand them to the Arrange → Nest Selected tool:

Random fabric - LB nesting setup
Random fabric – LB nesting setup

LightBurn saves the selected objects as an SVG file with the file name in the clipboard and fires up a browser tab at https://svgnest.com/. Upload the SVG and let the nesting algorithm chew away for a while:

Random fabric - LB nested
Random fabric – LB nested

The weird triangles come from the Dot Mode perforations that ought not be there; inner shapes get subtracted from outer ones, which makes perfect sense. Your shapes will differ.

Download the nested shape SVG, load it back into LightBurn at the prompt generated after exporting the shapes, and LightBurn will apply the transforms to the original shapes. Put the outer shape on a tool layer and the inner shapes on whatever cutting layer you like, snap the outer shape (with the nested shapes inside) to the previously undisturbed outline of the stuff on the platform, and Fire The Laser!

Now there’s a pretty good chance I can do that again …