Problem with Lasercutting and SVG file

I am working on a project, where there is a PCB just behind the front panel. This PCB has a display, some knobs and LEDs. I am using EasyEDA for this. Because of this,it would be very convenient to use this software to create the front panel as well. It is possible!

In EasyEDA I used 3 layers:

  1. A layer with just the text to be engraved on the front panel
  2. A layer with all the holes to be cut into the frontpanel (for the Display, LEDs and knobs)
  3. A layer with the outline, to cut the frontpanel loose from the material

I then exported each layer as an SVG file.

The first issue I encountered, is that the SVG is only exporting the objects on the layer. Because the text is not all over the front panel, my resulting size is smaller than the outline. Same for the holes file. I solved this by putting “+” signs as a marker on each layer on every outer corner. Every SVG will then be the exact same size, and I can easily align each file with those markers.

The real issue came next:

The first layer I added in Luban (Processing Mode: Vector), and I created a toolpath for engraving. This works fine, but for some reason there is a bounding box all around. For engraving this isn’t a big issue, but with cutting this will cut loose my panel!

When I examine the SVG file with a text editor (it is after all just an XML file), I found out i needed to delete the following part:

It determines the outer rectangle, and it will be engraved/cut, even with the stroke set to “none”.

Not good!

To finish the description of my workflow:

  1. I import (Processing Mode: Vector) the text layer to engrave
  2. I import (Processing Mode: Vector) the holes layer to cut the holes for the controls
  3. I import (Processing Mode: Vector) the outline layer to cut the front panel loose

The last step was necessary, because I was unable to change the order things are cut within one file. And the outer rectangle was cut first, which makes my panel disconnected from the material, and lying loose on the bed.

I deleted the rectangle definition in all three files, imported them in Luban and engraved/cut front panel, and it did a great job with that!

The exported SVGs were quite small: 77 lines each, with the biggest one (text layer) just 17.5 kB

Did I do something wrong, or is there a way I can simplify my workflow (skipping the text edit of the SVG file)?

Any help/insight is appreciated

Marcel, using an SM2 A350 with 1600mW laser toolhead

Perhaps not solving the underlying issue, but as a quick solution: Use Inkscape to remove anything from the SVG you did not expect to be there.
And while you’re in Inkscape, use “Object to path” to convert everything in pathes - Luban sometimes struggles with some elements like rectangles with rounded corners or SVG text. May not be an issue in your case, but in case you spot strange renderings of your cutting or engraving path, this might help. Luban’s display looks always correct, but if you preview the GCode, you may notice errors.

Luban’s SVG parser is incomplete. I suspect it doesn’t pay any attention to stroke settings. You need to keep files as simple as possible to keep it from screwing up. As @Hauke said, Inkscape is a good program for removing anything from the file that you don’t intend to be cut/engraved, and for turning everything into plain paths.

You may get better results from Lightburn, a more sophisticated software package that many people here use for laser work, but it isn’t free.

1 Like