Wednesday 1 March 2017

NewlyDraw Inkscape and DXF files

Our LS3020 laser cutter came with NewlyDraw - it's a capable "driver" for the laser cutter, but compared to newer software, it's looking pretty dated now. A lot of people junked it straight after getting their own laser cutters, but we stuck with it. And there are probably a few of these re-badged K40 machines knocking around on the second-hand market, with new owners looking for guidance on how to get the most out of NewlyDraw, so here goes.

Firstly, NewlyDraw accepts DXF files. It can create multiple "layers" (and colour code them) but given that the laser power is controlled by the hardware (a dial on the outside of the machine) rather than software, different layers aren't really much use.

Imported DXF files don't retain any colour information. Lots of laser cutter drivers allow you to cut shapes in a specific order by drawing different shapes in different colours. Not so with NewlyDraw! It does, however, allow you to change the cutting order; it's just a bit fiddly.

When clicking on the cut order button, every line and shape is displayed with a number alongside it. Simply click the numbers in the order that you want the shapes to cut (so when you click the first number, it changes to 1 and all subsequent values change; click the next shape and it's number changes to 2 and the rest of the unassigned shapes update their cutting order index numbers).



(in this image you can see that the outline is the first shape to get cut, then all the cutouts inside - obviously we want the outer shape to be cut last)


This is fine if there are only a few simple shapes. But if you import a complex dxf file, you could be clicking multiple hundreds of times. That gets really tiresome, really quickly. And, even worse than that, if you mis-click and hit the wrong number (or hit a blank space which exists the cut order routine) there's no way to go back other than start over right back at the start!

At first it seems like there's no logical sequence to the cut order when you import a DXF file. There are options in the software to "optimise cutting path" but they don't really do anything - the cut order takes precedence, effectively rendering the optimise option useless.

But we did a bit of fiddling about and found this:
In Inkscrape, we draw our cutlines using multiple colours. Shapes we want to cut out first (the inner circles of axles for example) we draw in red. Outline shapes we want to cut last, we draw in black (you can use any combination of colours and any number of "groups" of colours).

Using the Find function in Inkscape, we select all objects of the same group. With all shapes of the same colour highlighted, we choose Object - Send to Bottom (hit the End key on the keyboard).



It seems that NewlyDraw uses the "height order" of the shapes to determine the cut order - objects drawn "lower down" get cut out first. We then select all our black lines (objects to be cut last) and choose Object - Send to Top (hit the Home key on the keyboard). Now save the file as DXF and import into NewlyDraw


The cut order follows the "transpose height" of the object as they have been drawn in Inkscape. By grouping objects as they are drawn (rather than after the DXF has been imported into NewlyDraw) we can save hours of time, rather than manually setting the cut order in NewlyDraw.


EDIT: a few people have commented that you can get the same effect by selecting groups of objects, cutting them then pasting-in-place to put them back in exactly the same location; the difference being that the "placement order" of the objects is changed - and when saving as DXF, objects drawn first appear first in the dxf list of entities; something that can also affect the cut order when the dxf is imported into NarlyDraw.



No comments:

Post a Comment