Quite a lot of people do not realize how quickly KiCad is evolving. With a lot of programs that are 20 or more years on the market the codebase has pretty much stabilized and lacks innovation. As a result people just stopped caring whether their software lags a few mayor versions behind.
Another reason why people became skeptical about updating is the move to the “cloud” and the rental model of monthly or yearly payments, while they have a perpetual license for an older version. This makes (at least some) people think about whether upgrading to the newest version with only a few new features is actually an advantage for them, and thus also strengthens the idea of just keeping on working with the old version.
None of these reasons are of course valid for KiCad which both evolves rapidly and comes with free perpetual upgrades. But when you get into the above mindset, it’s easy to forget to upgrade, unless you’re on Linux, in which the OS handles the upgrades of all properly installed programs during normal system maintenance.
@marekr I inherited the project from another developer and it is a complex system. KiCad and this gerber export script is a small part of it. I know nothing about cam. Changing any version could have an effect on scripts that would be time consuming to debug. On top of this @paulvdh is right.
OK. You can report a bug with this if you can share the Python script and the board in question. For now it is impossible to say with the information we have so far whether or not this is a bug in the Python script or a bug in KiCad.
Python scripting in KiCad is based on SWIG, and it is not a very stable interface. It is common that scripts break between mayor KiCad versions, but updating to the latest bug fix release should be quite safe. For KiCad, bug fix releases are made approximately once a month, and each time the 3rd number of the KiCad version number is incremented. Each month some 70 to 100 bugs get fixed, so lagging that far behind is not good. The first mayor release of KiCad also tends to have quite a lot of small bugs. Because of this many people (especially companies) wait a few bug fix releases before upgrading to the next mayor release. It is also quite common to only upgrade the mayor version once the last bug fix release of a series has been released.
For now, KiCad seems to settle on a yearly release schedule for the mayor version upgrade in February, just a short while before FOSDEM
Maybe it is an option for you to use kicad-cli It is a command line program that can be used in scripts outside of KiCad. It has quite a lot of built in help, but no man page. You get to the build in help, when the command line is not complete, and then it shows a page with keywords for the last valid command line option. I.e, kicad-cli pcb export gerber shows the options for exporting gerber files.
paul@cezanne:~$ kicad-cli pcb export gerber
input: 1 argument(s) expected. 0 provided.
Usage: gerber [--help] [--output OUTPUT_FILE] [--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--exclude-refdes] [--exclude-value] [--include-border-title] [--no-x2] [--no-netlist] [--subtract-soldermask] [--disable-aperture-macros] [--use-drill-file-origin] [--precision PRECISION] [--no-protel-ext] INPUT_FILE
Plot given layers to a single Gerber file
Positional arguments:
INPUT_FILE Input file
Optional arguments:
-h, --help Shows help message and exits
-o, --output Output file [nargs=0..1] [default: ""]
-l, --layers Comma separated list of untranslated layer names to include such as F.Cu,B.Cu [nargs=0..1] [default: ""]
--drawing-sheet Path to drawing sheet, this overrides any existing project defined sheet when used [nargs=0..1] [default: ""]
-D, --define-var Overrides or adds project variables, can be used multiple times to declare multiple variables.
Use in the format of '--define-var key=value' or '-D key=value' [nargs=0..1] [default: {}]
--erd, --exclude-refdes Exclude the reference designator text
--ev, --exclude-value Exclude the value text
--ibt, --include-border-title Include the border and title block
--no-x2 Do not use the extended X2 format
--no-netlist Do not generate netlist attributes
--subtract-soldermask Subtract soldermask from silkscreen
--disable-aperture-macros Disable aperture macros
--use-drill-file-origin Use drill/place file origin
--precision Precision of Gerber coordinates, valid options: 5 or 6 [nargs=0..1] [default: 6]
--no-protel-ext Use KiCad Gerber file extension
I did try the CLI now. It is not suitable for me. It is slower to export each layer to its own file and the file sizes are different so I assume the exported files differ.
If i plot the masks from KiCad directly it runs fine without the alert