create kicad footprint from dxf file
Loading README and project media…
dxf2kicad_modCreate Kicad footprint from DXF file. This simple and dirty script was
designed for my own purpose a few years back. At that time, I was using Kicad
to design a simple PCB, but the shape of footprint could not be designed using
Kicad footprint design tool. A workaround is to create the shape in CAD tools
and convert it to the Kicad footprint format. Hence this work was a bit of
hacking.
A generated footprint from a dxf file:

The corresponding kicad_mod file which could be viewed
by Kicad footprint viewer.
It will read the DXF file and find lines and arcs (only supporting these two
types so far) which compose a close-loop graphic, it converts arcs to lines and
connected all lines together using fp_poly command in kicad_mod file. Each
layer is handled separately, the layer name is converted to layer name in
kicad_mod file.
dxfgrabberhttps://github.com/mozman/dxfgrabber.git
repeclone https://github.com/pandysong/dxf2kicad_mod.git
cd dxf2kicad_mod
kicad_modpython dxf2kicad_mode "Your-dxf-file-name-here" > "your kicad_mod file.kicad_mod"
pipenvInstall pipenv is not yet installed:
pip install pipenv
repoclone https://github.com/pandysong/dxf2kicad_mod.git
cd dxf2kicad_mod
pipenv to install dependenciespipenv install
pipenvpipenv shell
Then use it as normal
python dxf2kicad_mod.py test_data.dxf > test_data.kicad_mod