DXF import from footprint editor doesn't work

When I try to import a DXF file into the footprint editor, I get graphics of a 3 position terminal block, and a circle - neither of these are part of anything that I’ve drawn. There is only 1 dxf file on my computer, and I have verified what it looks like by using an online dxf viewer. Previously, I was using version 4.0.4, so I upgraded to 4.0.5, and the problem persists. The dxf file came from VISIO, line color orange. I’ve tried importing it to different layers, and the odd graphics move to the different layers, but my dxf data is nowhere to be found.

Any suggestions ?

Do you have Librecad? This uses similar dxf code to KiCad
http://librecad.org/cms/home.html

Unfortunately DXF is not just DXF… depending on what DXF Visio speaks and what DXF KiCAD understands you can get all kinds of problems.

To make my point here is the Autodesk Inventor Professional DXF export dialog:

So even the ‘creators’ of the format acknowledge at least 6 versions.
And I can adjust a lot more than just the format version as you can see on the tabs marked.

Any chance you can play with the Visio DXF export settings?

PS: 2004 DXF works for me (Inventor <> KiCAD), didn’t try others really.

R12 with exploded parts should be the most supported
kicad UM: 6.1.2. Using a DXF drawing for the board outline

I imported the DWG into DoubleCad, then used the Save As to try to export other DXF formats as shown below.

None of these work. Where does this strange graphic come from that I didn’t draw ?

Sorry, some of them got chopped off before.

ok, you can go to dxf R14, but after exploding all the parts
It should work
or just load the dxf in LibreCAD as already suggested by @davidsrsb and explode all the parts and save in dxf R12
M

1 Like

OK, I’ve got it. The DXF output from VISO was 1000x too small, and the units were inches instead of mm. That is, my 39mm long part was 0.039" long when imported into DoubleCad. So I changed the units in DoubleCad, scaled x1000, and exported the DXF (R14 format), and it imported into KiCad just fine.

Thank you for all the responses.

1 Like

I guess that’s one pitfall of using VISIO rather than CAD software to make the drawings. LibreCAD works well (KiCad’s DXF library is a particular version of the LibreCAD library) but other drafting software like Dassault’s DraftSight also work. In general, drafting software ensures that the appropriate units of length are specified in the DXF file. The other things to keep in mind about KiCad’s DXF import are: (1) objects will be imported from all layers, (2) the only supported objects at the moment are line, arc, polyline (all others, like points, are ignored).

1 Like

A useful enhancement for any DXF import would be a simple Extents-Sanity-report, and a means to set a scale factor, and maybe a new origin.

Some DXF’s can define units, but many do not, and it rather than dance through multiple CAD programs and tests, it is simpler if DXF import allows the simple housekeeping.