Kicad-cli.exe plots Edge.Cuts different than Plotting from PCBnew itself

I am scripting fab file output with kicad-cli.exe pcb export gerber since my EMS has special demands for Gerber File names and layers.

One restriction from my EMS is that width of board outline must be 0.

So I have configured "board_outline_line_width": 0.0, in the Project settings.
My DXF with the outline also has 0mm width and I input with Input->Graphical Elements. Set my import layer to Edge.Cuts and the DXF width to 0 as well.

In PCBnew the board outline is visible and it never extends while zooming. So it is really 0
When I generate gerbers from File->FabData->Gerber Data with these settings
grafik
the board outline in the gerber file shows up as 0 as well (no extending while zooming)
When I invoke the Gerber generation of this layer with

%KICADPATH%\kicad-cli.exe pcb export gerber -o gerber\11_dim.GBR --use-drill-file-origin -l Edge.Cuts %1.kicad_pcb

the outline in the file is 0.1mm.

I get the same result when I invoke

"C:\Program Files\KiCad\7.0\bin\kicad-cli.exe" pcb export gerbers -o gerber --use-drill-file-origin --ev -l Edge.Cuts myPCB.kicad_pcb

Comparing the Gerber Files for the Gerber created by PCBnew I get

%TF.GenerationSoftware,KiCad,Pcbnew,7.0.8*%
..
G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.000000*%
%TD*%
G04 APERTURE END LIST*
D10*

The Gerber file created by kicad-cli.exe pcb export gerber(s) has

%TF.GenerationSoftware,KiCad,Pcbnew,7.0.8*%
...
G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.100000*%
%TD*%
G04 APERTURE END LIST*
D10*

So the %ADD10C,0.100000*% shows the difference.

I am using
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

An requirement of a line width of 0 for Edge.Cuts is apparently unusual, as many PCB’s have been made without complaints. But it also sounds logical. Line width does not have a meaning for Edge.Cuts. My guess is that “normally” the center of the line is used, but it is still guesswork. In older KiCad versions, the width of the lines on Edge.Cuts was treated as copper tracks for calculating zone clearance from the edge.

And yet, when I draw a graphic line on Edge.Cuts and attempt to set the line width to 0, then KiCad complains with:

image
I also had a look at the Gerber X2 standard from Ucamco, and it states that lines must have a width of 0 or greater, so apparently lines of width zero are allowed.

My vote would be to make a bug report for this. In my opinion KiCad should be able to handle zero width lines internally, especially because gerber standards also allow it.

But you can also swing it the other way. Page 155, chapter 6.5 “The Profile” of the Gerber X2 standard states:

In case the path uses a non-zero aperture the center line represents the profile.

When following that line of thought, you can contact your EMS (I had to look that up) give them a copy (or link) to the gerber standard and show them that non zero width lines for PCB outlines are allowed.

1 Like

Please file a bug report for this so it doesn’t get lost.

Please file a bug report for this so it doesn’t get lost.

I have created an issue here

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