Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update export.py to support 6.99 #373

Closed
wants to merge 1 commit into from
Closed

Conversation

tjlusco
Copy link

@tjlusco tjlusco commented Jun 16, 2022

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 AislerHQ/PushForKiCad#14 (comment)

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()

SetExcludeEdgeLayer is unavailable in 6.99, add exception escape hatch.
The type for the coordinates has changed in 6.99, adapt type to what is used by board.GetDesignSettings().GetAuxOrigin()
@yaqwsx
Copy link
Owner

yaqwsx commented Jul 4, 2022

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.

@yaqwsx
Copy link
Owner

yaqwsx commented Dec 19, 2022

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

@yaqwsx yaqwsx closed this Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants