Import from DXF ignores line width

I was about to file a bug report, but then thought maybe it’s an issue with my DXF file:

triangle.dxf (6.4 KB)

It was exported from Rhino 3D using a custom export scheme:

I imported it into KiCad with 1 mils line thickness selected:

However, the thickness in KiCad is 0.2 mm:

So I have to change all lines manually to 1 mils, which can be tedious for complex graphics.

Something wrong here, or is this a bug in KiCad?

By the way, I also tried running dxf2idf from PowerShell and from the command prompt. However, that tool just goes in the background and consumes a lot of resources.

Application: kicad
Version: (5.1.0)-1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.68.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.61.1
Compiler: GCC 8.2.0 with C++ ABI 1013
Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

Is it mining bitcoins in the background? That seems to be the most common maleware in these times. Converting a few lines should be trivial for any program on any PC less than 30 year old.

Then it would at least be doing something. dxf2idf does not even show a summary of all parameters, as it should according to documentation.

Anyhow, I just tested import of a triangle saved from LibraCad in R12 DXF format:

triangle_LibreCad.dxf (9.9 KB)

Without surprise, Pcbnew has the same problem as with the DXF file exported from Rhino: Line width selection is ignored. This means I have to change line width line by line…

I imported your triangle twice.
Once with a line widht of 3mm, and the 2nd time with an 8mm line width.
It seems to work as expected.

I’m still waiting for KiCad V5.1 to get through Debians package management and am using V5.0.2, but because it works for me seems to confirm that there is no problem with your drawing.

Application: kicad
Version: 5.0.2+dfsg1-1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.67.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.62.0
Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

Thanks for the test! Maybe it’s an issue with version 5.1.0 then, and/or with Windows KiCad.

It’s a bug in the 5.1 import routine. Would you be able to report it over at https://bugs.launchpad.net/kicad ?

Done: 1821234

I found the doc about the dxf format

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