Skip to content

Fix uwMitered_wizard compatibility for KiCad 9 - #88

Open
shyver wants to merge 1 commit into
easyw:masterfrom
shyver:fix-kicad9-uwmitered
Open

shyver wants to merge 1 commit into
easyw:masterfrom
shyver:fix-kicad9-uwmitered

Conversation

@shyver

@shyver shyver commented Jul 22, 2026

Copy link
Copy Markdown

Summary: Update the uW Mitered Bend footprint wizard to be compatible with KiCad 9 pcbnew Python API changes.
Files changed: ./rf_tools_wizards/uwMitered_wizard.py
What I changed:
Fix SetAnchorPadShape call: pass layer first to match KiCad 9 signature; keep a fallback for older bindings.
Fix polygon primitive creation: build a PCB_SHAPE polygon for the padstack path and call AddPrimitive(shape, layer);
call AddPrimitivePoly(layer, vpoints, thickness, filled) for the modern wrapper signature.
Fix LSET construction: add helper singleLayerSet() that builds an LSEQ and constructs an LSET from it instead of calling LSET(layer) which fails under KiCad 9.
Preserve compatibility: keep conditional branches (e.g., hasattr(pcbnew, 'D_PAD') and try/fallbacks so older KiCad versions remain supported where possible.
Why: KiCad 9 changed several pcbnew Python bindings (pad anchor shape signature, primitive polygon/primitive APIs, and layer-set construction). These changes caused the wizard to raise exceptions; the PR updates the script to call the new APIs correctly while keeping backward-compatible paths where feasible.

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.

1 participant