Edge.cuts line width incorrect when generating gerber with kicad-cli
Description
If the default line width for Edge.Cuts is set to zero. And PCB-outline is drawn in Edge.Cuts layer, then ...
Plotting this layer using C:\Program Files\KiCad\7.0\bin"\kicad-cli.exe pcb export gerber -o gerber\11_dim.GBR --use-drill-file-origin -l Edge.Cuts outline.kicad_pcb
results in plotting the outline using a 0,1mm line. It would be expected to have the line being plotted by line with zero width.
From Gerber file:
%TF.GenerationSoftware,KiCad,Pcbnew,7.0.8*%
...
G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.100000*%
%TD*%
G04 APERTURE END LIST*
If the outline was created in PCBnew using the rectangle tool and Gerber Data generation is started from GUI in PCBnew no Gerber data is plotted
%TF.GenerationSoftware,KiCad,Pcbnew,7.0.8*%
%TF.CreationDate,2023-12-01T15:59:49+01:00*%
%TF.ProjectId,outline,6f75746c-696e-4652-9e6b-696361645f70,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Profile,NP*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.8) date 2023-12-01 15:59:49*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*
If the same outline is created using the line tool the correct output is being generated:
%TF.GenerationSoftware,KiCad,Pcbnew,7.0.8*%
%TF.CreationDate,2023-12-01T15:50:38+01:00*%
%TF.ProjectId,outline,6f75746c-696e-4652-9e6b-696361645f70,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Profile,NP*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.8) date 2023-12-01 15:50:38*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.000000*%
%TD*%
G04 APERTURE END LIST*
D10*
X100000000Y-50000000D02*
X100000000Y-100000000D01*
X150000000Y-50000000D02*
X100000000Y-50000000D01*
X150000000Y-100000000D02*
X150000000Y-50000000D01*
X100000000Y-100000000D02*
X150000000Y-100000000D01*
M02*
Steps to reproduce
- In PCBnew set the default line width for Edge.Cuts to 0 (PCB-Configuration -> Text&Graphic -> Preset. PCB-Outline = 0mm)
- Select Edge.Cuts layer
- Draw a rectangle using the Rectangle tool
- Save PCB
- Invoke Gerber Generation (Fab-Data -> Generate Gerber Data)
- Check output file -Edge.Cuts.gbr. No Gerber Data is plotted and
%ADD10C,
command is missing. - Invoke Gerber Generation using kicad-cli using the above command the outline will be plotted using a 0,1mm tool
%ADD10C,0.100000*%
- Delete the rectangle in PCBnew and draw the same outline using the line tool
- Save file!
- Generate Gerber data from GUI. The output will be as expected using a line with 0mm width.
- Generate Gerber data from CLI. The output will be using a line with 0.1mm width.
KiCad Version
Application: KiCad PCB Editor x64 on x64
Version: 7.0.8, 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: Sep 29 2023 18:44:47 wxWidgets: 3.2.2 (wchar_t,wx containers) Boost: 1.81.0 OCC: 7.7.1 Curl: 7.88.1-DEV ngspice: 41 Compiler: Visual C++ 1936 without C++ ABI
Build settings: KICAD_SPICE=ON