DXF export creates invalid paths
Description
DXF plot creates invalid output.
When drawing arcs and lines on a user layer to form some shape for exporting the resulting DXF plot will show elements where the endpoints are not aligned.
The endpoints of lines and arcs will be serveral fractions of micrometers apart.
When importing this DXF to FreeCAD to extrude a solid from this it will fail with an error that there are non-closed paths.
I could fix this by running a script that fixes the endpoints of the lines to the nearest (closer than "X") endpoint of an arc. (see https://gitlab.com/transistorgrab/kicad-dxf-cleaner/-/blob/main/DXFcleaner.py)
Steps to reproduce
- Open Kicad PCB editor
- switch to User.x layer (e.g. User.3)
- draw a rectangle with rounded corners
- draw a 90° arc
- draw a line snapped to one end of the arc
- copy 1st arc, rotate by 90°, snap to end of line
- copy 1st line, rotage by 90°, snap to end of arc
- repeat last two steps until rectangle is finished
- open plot dialog
- choose DXF option
- uncheck all checked layers
- check User.x (e.g. User.3) layer
- export by pressing "plot" button.
- Open generated DXF in DXF capable CAD programm e.g. FreeCAD
- Zoom into the area of connection between arc and line
- See gap.
KiCad Version
Application: KiCad x64 on x64
Version: 7.0.5, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 6.0.0
FontConfig 2.14.1
libcurl/7.88.1-DEV Schannel zlib/1.2.13
Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: May 27 2023 02:48:13
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.81.0
OCC: 7.6.3
Curl: 7.88.1-DEV
ngspice: 40
Compiler: Visual C++ 1936 without C++ ABI
Build settings:
KICAD_SPICE=ON
Edited by André S.