DXF (from KiCAD) Import Problems

I’m bumping into the known issue of Lightburn not importing my DXFs (created by KiCad) properly. They do however, import correctly into Inkscape. I’ve seen suggestions here to join the paths in Inkscape and re-export them. This doesn’t work for me. I’ve searched and tried everything I could think of. I’ve attached a screenshot of the imported DXF from Inkscape and LB.

I’ve been struggling with for the last four hours (beginning as 3:00 AM). I’m so frustrated I’m ready to throw my computer out the window. Any help you could give me would be… helpful. (obscure “Holy Grail” reference)

Thanks

Can you upload your DXF here for us to have a go at?

Sure… Nothing proprietary here. Thanks Marcus.
ArduinoAgitator-brd

Sorry, can you actually attach the DXF file itself so we can try working with it in Inkscape etc.

That’s what I did but it turned into a graphic. I’m putting it into a shared DropBox folder and I’ll get a link posted.

Ok, that’s odd. I’ve never known the forum to do that before!

EDIT: It’s ok, it’s come over as an SVG. These do get translated as an inline graphic but you can right-click and save them.

1 Like

SVG Files

Cool. Thanks again.

If you open it up in Inkscape, select the traces then perform a “Stroke to Path” this will expand the stroke into a solid filled shape.

image

You’ll still need to do some editing in LightBurn to get the required result.

Here’s the SVG with stroke expanded (right-click & save image):
ArduinoAgitator-brd - Stroke expanded

Here’s a LightBurn file that I’ve edited:
ArduinoAgitator-brd.lbrn2 (48.7 KB)

Hope this helps.

1 Like

Thanks Marcus. I do appreciate it. I think what I might try is pull the SVG into Inkscape and then export it as a hi-res PNG or TIFF. Using LB’s passthrough mode @ 300 LPI should give me acceptable results. This is used for burning the mask layer for PCBs and the example is used here is ultra simple. Some boards have hundreds of tracks on them and touching up each one individually in LB is way beyond the limits of my patience. I’ve included a more “typical” PCB.

complex_hierarchy-brd

No problem. Yes manually editing each trace/pad/connection would be very tedious for more complex boards. Hope the hi-res passthrough works out.

1 Like

Would you be willing to share your process?
KV0OOM

Hey Karl,

I spend a lot of time designing PCBs in KiCad for my day job, including doing all sorts of weird stuff no one else should be doing (aspirations for PCB designs generated by code, a coworker writing a 13,000 line rust library to parse and manipulate the KiCad file format to make changes to lots and lots of boards at once, scripts and pipelines to create exports of CAD Models, gerbers, graphics of our PCB designs…)

Anyways, I have been thinking about your problem and I suggest you try playing with tracespace view

Here is a tracespace render of the gerbers of an open source board I was looking at a while ago. You would just export standard gerbers from KiCad and feed them in here.

Now, I will use the download button in the top right corner, and I get a bunch of SVG files, one for each layer, as well as a combined graphical but still vector SVG render of the top and bottom of the board.

LB doesn’t like this SVG, so I went ahead and ran it through here. I didn’t change the size or anything:

Here you go.

It’s not perfect, as some of the “oval” shapes have internal geometry that needs to be removed, but a few minutes with snipping tools would be better than the advanced custom drawing you’d have to do before.


Alternatively, you could convert the original SVG to PNG at a high DPI:


And there you go, that should be ready to run.

I have spent a lot of time working on tangentially related problems that use this same tooling :slight_smile:

Another benefit here is that if this flow works well for you, it is possible to script and automate it, everything from the “creating the gerbers in kicad” to “using the tracespace open source libraries to create these SVG’s” to “using another library to convert them to PNG which you can use in LB”.

The two principal issues you’re having are:

  1. LightBurn doesn’t support line thickness (stroke width)
  2. LightBurn doesn’t support “painting over” shapes

The trace lines you’re showing here have been exported with a stroke width that is turning into the width of the trace. The pink circles are actually exported as white, but LightBurn doesn’t have a white layer so they get mapped to the closest, which is pink. Those circles are intended to “paint over” the lines that pass under them, and create holes for the vias.

Exporting as a relatively high DPI image and just running it in Threshold mode will be the simplest way forward here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.