DXF to Gerber Converter

Anyone know of a good DXF to Gerber conversion program ?
Preferably running on Linux or second choice, online.

DXF files can be imported in KiCad directly, but I have no idea how far you can get with this.
The main goal is to do things like import a PCB outline from a CAD package.

I understand your concern but Autocad is a preferred platform for RF antenna design. It works and autocad is far more advanced in manipulating fine details for designing e.g. quarter wave resonators to high accuracy.
For standard PCB’s your recommendation is spot on, but this is not the case of use here.

There is a dedicated DXF to gerber plugin for Autocad for this purpose, but I just wonder if there is a general stand-alone Linux version available that will do dxf to gerber and that is what the question is about.

If you want to get a kicad footprint from a DXF antenna design, you may have a look at FreeCAD StepUp and the sketcher for footprint generation…
there is a RF antenna example to start with…

The KiCad DXF importer is also supposed to work for designing things like antennas externally, can you say more about why you need to go direct to gerbers?

In 5.x you can’t turn the imported DXF shapes into copper zones, which might be part of the problem, but you can now do this in the nightly builds (it will be included in 6.0 release)

Two Approaches that work…

Approach 1 (using DXF’s):
1). Draw your lines in whatever program you want (I used FreeCad for this example but have also used Inkscape).
• Export as DXF

2). In Kicad’s main panel, Click the Footprint Tool
Start a new Footprint (with or, without using Pads. Two different Icons for this choice).
After naming it, File>Import Outline From DXF
• Use the defaults or, Set Scale, Layer, line Width. Can’t set for Copper Layers - see next step
• Save it. It creates a yourfile.MOD (it’s just a .txt file)

3). Using any TextEditor (use unicode UTF-8 font, Not Rich Text)
• Open the .MOD file
• You’ll see the lines are on the Layer that you selected in step #2 (let’s assume layer “Dwgs.User”). Replace All “Dwgs.User” with (for example)“B.Cu”
• Save it.
~ Done ~ now use it like any other footprint

Approach 2 (using PNG’s or Jpeg’s):
1). Make your lines in any Graphic program, save as .PNG (or Jpeg, BMP…etc)

2). In Kicad’s main panel, Click the BMPeditor Tool
• Load the PNG or other (yes, it does load Jpeg, PNG, BMP…)
• Adjust settings for best quality
• Set desired output layer
• Export it. It creates a yourfile.MOD

3). Same as Step #3, above

~ Done ~

Screenshot of of .MOD file being edited…

Results

Thanks craftyjon

More intermediate processes is just a bad idea and always always introduces artifacts, That is why I am looking for a straight dxf to gerber converter. The autocad dxf/gerber plugin is the best route, but I want to see if a Linux alternative is available. This is first primarily only for 2D gerber and not 3D gerber.

From youtube Kicad is supposed to have dxf import from the file menu.
I downloaded the latest version from Kicad. there is no dxf import in the Linux version. It seems it is only in the windows version ? The only import is for Eagle CAD.

Update:
I did not see BlackCoffee’s post after I wrote this, so it may address some of my questions and will investigate that advice and respond later.

Adding to my previous Post:

An alternate to Approach to Editing the Mod/text file is to Place the Footprint on PCB, Double-Click it (Edit either Library or the placed instance) and select desired layer to move it to.

Also Important, When using the BMP tool, set it to Black&White

~ Done ~

showNtell2.mov

[Edit:]
In response to:

DXF import is in:
Pcbnew / File / Import / Import Graphics/

The Import is the Approach #1 in my post… (use either in PCBnew or in Footrpint editor (if adding pads…etc and making a tweaked footprint. Otherwise, just import it and Double-Click, change layers as desired…). If from Footprint Editor it has a different import indicator but, does the same thing…

What about freeCAD step up mod?
With this you can load DXF and export as kicad footprint/pour

I dont know what “step up mod” means. Only reference to it is midcraft. No clue what you are referring to.

BlackCoffee,
Maybe I somehow use a very old version although I took the latest from the download site.
There is no PCBNew. PCBNew is only referred to in the GerberViewer.
I get none of the menus you show in your tutorial above.

I downloaded 5.1.7. Some of the menus you show are there, but nothing you describe.

I dont want to waste all of your time with this as my question was really about a standalone converter, but I will give kicad a try.
Also, Kicad never worked at all with the stock debian apt installations. It always threw errors if you click on menus. That is the reason I stopped using it years ago before flatpack versions.


The flatpack version does work and does not have these errors. Flatpack unfortunately is static linked and HUGE which is not the way to go in the long run.

.

Also curiously, the flatpack version of Kicad cannot browse NFS volumes. All my designs are on NFS mounted volumes and is available and working with all other applications. The Kicad Flatpack version cannot browse NFS shares. Really strange !

FreeCAD has a Kicad plugin call “stepup”. You can convert dxf to kicad footprints (well technically speaking a DXF to a Sketch that can then be exported as a footprint)

Ok thanks, I’ll try that.

PCBnew is what Kicad’s PCB maker is called. I don’t know from where you see PCBNes (a typo?)

I think you can figure out it was a typo without asking me to tell you…" S" is just below 'W" on a QWERTY keyboard.

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