Problem trying to import DXF files

As for the first problem, Windows is in general case-insensitive with file names but Linux etc. is case sensitive. This is a source of many many bugs for many many cross-platform projects. If a developers tests a file with certain name only with Windows it may not work with Linux.

Maybe you should give your KiCad and system info for the second problem (from the About dialog).

That really should be mandatory for people reporting problems, but most people don’t bother!

Yep, my bad :slight_smile:

I am using windows 10, x64 and Kicad 4.0.7

Tell me if you need more information

  1. if you want to import the dxf as the board edge, you need to avoid the page frame, the contact draws and the drill targets
    riserbottom-board.dxf (31.0 KB)

  2. you can then import the dxf of the board edge as Edge layer and after the other draws as supporting layer (i.e. Drawing)
    riserbottom-all.dxf (76.5 KB)

and this is the result
riserbottom.kicad_pcb (32.9 KB)

1 Like

Hello,

I tried to import both of your .dxf files, none of them worked

What i do on Kicad is file, import, DXF file then I select center of my page and edge cuts for my layer but everytime nothing happen

Do i do something wrong ?

Thanks

Just to make sure - is the layer visible? It’s possible to select it as active even if it’s invisible. Have you tried to draw something there by hand to see if it works?

Yes it is active, and when I draw something myself it works

I am using windows 10, x64 and Kicad 4.0.7

I tested it on the same environment…
I don’t know why you shouldn’t see it…

As a different approach you may consider also to use FreeCAD and StepUp to define your pcb Edge or to convert dxf to pcb Edge
the Sketcher for Getting to Blinky

3 Likes

Hi,
I’m a little late to the party but opened the mezzanine.DXF file in Sublime text editor and noticed a bunch off lines of what I cal “Hex-ascii garbage.”

Ooops ! sent prematurely.

Anyway, the mezzanine.DXF opened in my BricsCAD v18 app and I exported as AutoCAD r10 ascii. Presto ! No lines of hex-ascii garbage ! File then imported fine in V4.06.
Saving dxf drawings to R10 format has given me no problems in any KiCAD bound project drawn up in BricsCAD. I found that suggestion long ago in the KiCAD developers manual somewhere…
My 0.02

hi all
I’m new here
I try as many other here to import dxf files to define bord edges and nothing happends
I tried the 5.0.3
and the 4.0.7
strangely the importe is working on a collegue that runs the 4.0.7 so i tryed the same release and it dont works on mine (Windows 10 pro 1803)
I tried to import lowercase files I checked that hand drawing on the layer I try to import is working (it’s ok)
I tried to import full dxf I want with holes or only outlines nothing helps
I will tried under ubuntu and it works

as new user I can’t upload my files to let someone try an import
but you can find it here : https://drive.google.com/drive/folders/1xGGYVS91wRmmGTRe9LThDzh0yIpiJCSL?usp=sharing
thank’s for any help or advice or any idea

I get access denied.
What generated the DXF file, AutoCAD have several versions?

There is no such thing a 5.0.3 yet, I think that you mean 5.0.1_3

DXF was export from Solidworks
sorry for the acces error (it must because of pro drive using) i put it mon my personal one and you must be able to view it : https://drive.google.com/open?id=1ZXAoFp9ME1r0YBFd8R9pQQUNM6bC1f3A
I dont think It’s comming from DXF files themselves because it works on a colegue computer with same windows and same kicad
and it works on my computer on ubuntu with same files each time


heres the DXF export option (sorry my solidworks is in french but it must be self explainatory
thank’s for your help and your fast answer

Since it works on linux, there are a few Windows-specific quirks that might help:

  • Make sure that your dxf file is local (not on a shared drive)
  • Make sure that you do not have any KiCad files on a Google sync directory (or similar)
    • If you do use this, please try with the syncing disabled

Also, try with “Exporter toutes les splines comme polylignes”. Splines are relatively new in KiCad and may not work correctly in Windows or with your version.

Can’t import DXF file exported from P-CAD 2006.

Although i can open it in AutoCAD:

autocad opens dxf

But importing in KiCAD results in may errors:

kicad error dialog

and draws only circles which i don’t have in file:

kicad opens dxf

BTW, i have same importing issue with FreeCAD.

Can this issue be related to DXF file itself or to the way P-CAD exports it?

I’m using kicad Version: (6.0.0-rc1-dev-990-g0f247264f), release build on Windows 8.1

My file: temp.dxf (232.7 KB)


upd: converted P-CAD project to Altium Designer and exported pcb to gerber file. It opens fine in GerbView:

altium gerber in GerbView (with th components)

then I’ve exported it to kicad_pcb, but SMD polygons turned into vias

polygons turned into vias

Which FC release do you have? and are you using legacy dxf importer or the built-in one?
I have no issue in FC…

i’ve managed to successfully import dxf to FreeCAD 0.18 (rev. 14928) using legacy import, got same result as You.

however, plain exporting from FC to new dxf file and importing it in KiCAD results in this:

so I obviously have to edit FreeCAD import somehow to be able to modify it. Because I also want to make solder paste template it FC :slight_smile:

no issue for me from a dxf exported from FC


temp-exp-fc.dxf (35.2 KB)

a surprise, to be sure, but a welcome one

thanks for helping out. I’ll try to find out how to reproduce this result

OK, I managed to fetch your .dxf files.
I can open then in LibreCAD, which uses very similar code to KiCAD and the board outline is about 250mm square.
When I import into KiCad 5.0.1_3 on Windows 10 the outline is visible, but bigger than the A4 sheet, which it should be at that size