DXF file import is incorrect

Hi all,

I try to import a DXF drawing to PCB as a borad outline, but I found that the import drawing is incorrect.

Here is the drawing in which is shown in LibreCAD:

Here is the drawing after import to KiCAD:

Here is the DXF file:
Button Outline.dxf (41.9 KB)

Here is the KiCAD version:
Application: KiCad PCB Editor x64 on x64

Version: (7.0.0), release build

wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.0.1
FontConfig 2.14.1
libcurl/7.83.1-DEV Schannel zlib/1.2.13

Platform: Windows 11 (build 22621), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: Feb 12 2023 01:35:19
wxWidgets: 3.2.1 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.2
Curl: 7.83.1-DEV
ngspice: 39
Compiler: Visual C++ 1934 without C++ ABI

Build settings:

The DXF import is buggy. Try saving the file with different file formats, which worked for me.

Maybe your issue is related to this one: Importing DXF results in “Invalid Bezier curve” (#11153) · Issues · KiCad / KiCad Source Code / kicad · GitLab

for mechanical interoperability you may consider FreeCAD and kicadStepUp

I get the same results. In LibreCAD it looks as a closed outline, but in KiCad there are two arcs on the bottom. I also imported it in FreeCAD (looks OK) , then exported it again to another .dxf file and opened that one in KiCad, with also the same faulty result.

After that I exported it as an .SVG from FreeCAD and imported that to, again with faulty result, but a bit different this time. In the screenshot below, the topmost shape is the DXF import, and the bottom shape is the SVG import.

What sort of entities are these supposed to be? If I draw “normal” lines or circles in LibreCAD, they don’t have any width. My LibreCAD knowledge is very limited, and I can’t even figure out how to make it show me what sort of entity an object is. In FreeCAD they are all “shapes”.

This may be worth a bug report, but it would be nice to know more about the original drawing first.

Please report this with the file attached on the GitLab issue tracker. There have been some DXF-related fixes but this problem appears to be something different.

I have created an issue in gitlab:
DXF file import is incorrect (#14210) · Issues · KiCad / KiCad Source Code / kicad · GitLab

1 Like