How to convert DXF to Gerber

Hi. I want to import a dxf file with my design (consisting of several hundreds of non-self-intersecting and non-empty polygons) and convert it into a gerber file where each polygon must show up as a filled zone. The import of the dxf file works fine, but only the outlines of the polygons show up in KiCad, and I cannot find a way to fill them.

I want to use the gerber file to make a mask for silk screen printing, so it’s not important for me to follow any specific PCB design rules as long as the polygons show up as filled within the gerber file. Could you please tell me if there are any possible ways to achieve this with KiCad?

Thanks and best regards
Eskil

I know that are expected this feature to v6 https://bugs.launchpad.net/kicad/+bug/1728272
There is some work around using StepUp or other mechanical tool https://kicad.org/external-tools/.

1 Like

What about saving the filled DXF drawing as a bitmap and using the Bitmap to Component Converter process, treating it like you would a logo? You might have to experiment to get the bitmap resolution and sizing right, but perhaps could be a workaround?

1 Like

Interesting question… the important bit here, will be preserve of the polygon info to make a zone fill.
DXF import into kiCad works now, but I think does not manage line to zone (closed polygon+fill) distinctions.
ie it expects 2d segments, not fills.

Checking finds…

https://github.com/mondalaci/dxf2svg2kicad/tree/master/scripts - no Zone fill support ?

https://github.com/apgoetz/dxf2brd - No Zone fill support ?

https://github.com/pandysong/dxf2kicad_mod - for footprints, but looks close ?

If you are ok with the design-as-footprint, maybe that dxf2kicad_mod will be good enough ?
Worth a try ?

1 Like

people for artistic pcb usually are using svg and this nice tool

4 Likes

Thank you for your advice and quick response. I’ve tried the bitmap conversion, but didn’t achieve the proper level of accuracy with this method yet. I’ll give the different workarounds a try and see what I get and then report back what works for me. =)

Best regards
Eskil

When I got into the problem of printing logo on PCB my solution was:

  1. Make a black/white bitmap in 2:1 scale. The program I used to edit graphic (I don’t remember what it was) could save bmp file up to 600 dpi so I saved my picture as 500dpi and then interpreted each pixel as 1 mils x 1 mils.
  2. I have written a simple program converting bitmap to gerber. I didn’t understood all about gerber I just get a ready gerber with one 1 mils line in it. My program wrote exectly the same file but that one line replaced by planty 1 mils width horisontal lines (I interpreted bmp line by line - no optimisation).
  3. Protel 3 I used allowed to import gerber. I add logo at the end of PCB work as my files are big and something starts to work slowly after it.
    I serched for that program now. Source is 180 lines and exe (Windows) is 15k (yes - there were times when exe-s were so small).
    I understand now there are much better tools, but if you wont it…
1 Like

Those examples are almost as cool as sex! (Well, perhaps depending on who you’re married to.)

A few weeks ago I saw a quote for a plastic overlay for a front panel. The cost for the overlay was more than the cost of enclosure plus BOM-cost for the electronics inside it! Now I’m re-thinking my attitudes about using PCB’s as front panel overlays on prototypes or even LRIP (low-rate initial production) models. I always thought PCB’s-as-front-panels looked cheap and tacky at best, and a poor excuse for a front panel at worst. Your examples nake me think this idea might be more viable than I thought.

Dale

Dale @dchisholm
you may find this useful :slight_smile:

svg2shenzhen is making this task easier…

1 Like

Thinking some more about this, Gerber has RS274X which includes fill commands, which could make conversion of the right sort of DXF more practical.

Google finds

and I see lines like this
ret.append({"layer":layer,"command":"%LPD*%" if darkfield else "%LPC*%"})
which sound promising - those %LPD and %LPC are the fill dark, and fill clear commands.
(using those in the right careful order, you can make cutouts into solid areas)

You could try that, and load the result into GerbView to check ?

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