Update export.py to support 6.99
These changes fix the workflow for fabrication output generation in 6.99.
Version
Application: KiCad Version: (6.99.0-2103-gdc6c27b686), release build Platform: macOS Version 12.4 (Build 21F79), 64 bit, Little endian, wxMac
Test Case
kikit fab jlcpcb --no-drc ./Untitled.kicad_pcb ./out
Issue 1
SetExcludeEdgeLayer is not available in 6.99.
File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kikit/export.py", line 88, in gerberImpl popt.SetExcludeEdgeLayer(settings["ExcludeEdgeLayer"]) AttributeError: 'PCB_PLOT_PARAMS' object has no attribute 'SetExcludeEdgeLayer'
Fix is to apply an exception escape hatch as seen in https://github.com/AislerHQ/PushForKiCad/issues/14#issuecomment-1122398242
Issue 2
The type of the aOffset parameter for EXCELLON_WRITER_SetOptions has changed.
/site-packages/pcbnew.py", line 8005, in SetOptions return _pcbnew.EXCELLON_WRITER_SetOptions(self, aMirror, aMinimalHeader, aOffset, aMerge_PTH_NPTH) TypeError: in method 'EXCELLON_WRITER_SetOptions', argument 4 of type 'VECTOR2I const &'
Instead of hardcoding the type, use the type returned by board.GetDesignSettings().GetAuxOrigin()
Hi, thank you for your contribution. However, after the experiences with 5.99, I decided to wait until late fall 2022 until I add support for 6.99. The API changes so fast that any early effort on adopting is only wasted work that often yields clumsy code. I will leave the PR open and I will revisit it when I start adding support for v6.99.
These changes were reflected in #456:
- we still support excluding/including the outline. Now it just has to be done via a layer set
- whole KiKit was migrated to VECTOR2I