Thursday, 4 July 2013

Preparing Inkscape files for laser cutting

We were quite excited, the other day, to see the laser cutter at BuildBrighton up and running again after a period of inactivity. We love our LS3020 laser cutter and although it's not the best software in the world, NewlyDraw does a half decent job of controlling it. We also quite like Inkscape - so were quite surprised when Adam said he was having problems getting his image to cut out properly on the laser cutter.

One of the reasons we like Inkscape is that it opens a vast array of different file types - and can export to a variety of file formats too; including .dxf (which NewlyDraw likes).

We use ExpressPCB to create PCB layouts, and often print to a pdf file using the virtual printer CutePDF. Inkscape loves PDF files and consistently opens them correctly - so with a bit of tweaking inbetween, it's perfectly possible to get any image, from a PDF, into .dxf format for laser cutting (or even CNC routing).

But there are a few gotchas - and it looks like Adam has hit one (or more) of these.
A quick look at his artwork revealed the problem:

Firstly, his image doesn't look like just an outline or a filled shape. It's on a grey background but there are bits of white in the image too.

When selecting the image, rather than appear as a number of separate shapes, it's just one big "group" of objects. So the first thing to do is keep ungrouping until we have more than one shape/object on the screen (and selecting and ungrouping each of these if necessary)

Our suspicions were confirmed when, after ungrouping everything, we moved the main shape slightly and revealed another shape underneath - it's no wonder Adam was having problems getting this to import into NewlyDraw for cutting, correctly.

So we got rid of all but the required shape then made sure this was ready for cutting. Remembering that our laser cutter is going to follow the path around the outside of all shapes, it is often easier to view the image with just the "stroke" set to a solid colour, and no fill - this will show up any potential problems that may otherwise be masked by a dark background. We swapped the fill and stroke settings, so that the shape had an outline but no fill:

Ta-da! The resulting image shows the path that the laser cutter is going to follow in order to cut out the shape(s)

In this particular instance, all the shapes were already defined as "paths" in the image. While most CNCs and laser cutters can deal with rudimentary shapes like rectangles, arcs and circles, it's often best to force all shapes in an image to be a "path" type (rather than a "shape" or "object" type). To do this, select all the shape(s) in the image, then Menu - Path - Objects to Path.

Lastly, save the image as .dxf (avoiding splines if possible - not all CNC/laser drivers handle these properly) and it's ready to import into NewlyDraw.

Hope this helps, Adam!