Second Mac run (KiCad demo board opened from the mounted installer
image) got past the dialog and died twice:
1. make_output_dir crashed with OSError 30: the demos volume is a
read-only filesystem. Now falls back to a temp directory named
after the board, with the path printed (the Messages panel showed
it is actually read there).
2. The error figure - and every other figure - could never render:
matplotlib refused with Cannot load backend TkAgg ... as qt is
currently running. macOS bundled Python ships tkinter, so the
old tk-first probe picked TkAgg while the PySide6 dialog and
progress window had already made this a Qt process. Windows never
saw it because KiCad Python there has no tkinter. Qt now comes
first - PySide6 is a hard dependency, so it is always there.
Both covered by tests that fail on the old code: the dev env has both
toolkits installed, so the backend-order assertion is exercised for
real, and the RO fallback is simulated by denying mkdir under the
board dir. 140 passed on the dev stack and on the Python 3.9 +
numpy 2.0 / scipy 1.13 / matplotlib 3.9 / PySide6 6.10 stack that a
Mac venv resolves.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
On OK the dialog closed and nothing appeared until the figures did,
which on a real board is minutes of looking like the plugin did
nothing. Put a small always-on-top window up for that stretch: the
stage now running, elapsed seconds, and Cancel.
Qt only repaints while the event loop runs and the solve owns the
thread, so the window pumps events itself - from inside the CG/AMG
iteration callback, which is where the time actually goes. That is
also where Cancel is noticed. The state is module-level because the
tick happens several frames deep in scipy/pyamg, and threading a
handle through those signatures for a progress bar is not worth it;
it stays inert until start(), so the standalone runner and the tests
are unaffected.
The window covers the figure work too, not just the solve: laying out
labels and writing four PNGs at full DPI is seconds on a real board -
10-15 of them on a large one - and closing before that left the same
silent gap one step later.
The mouth of a populated THT pad kept only foil copper on every layer:
on the component side and inner layers the joint looked (and conducted)
like plain plane, and current had to crowd through the single barrel
attachment cell. The filled hole - lead cylinder plus solder bore - now
adds conduction-equivalent copper of the full hole depth on EVERY
spanned layer (the pin continues beyond both mouths, so each layer sees
the whole plug cross-section). Side to side the joint differs only by
the solder: coat and cone stay on the protrusion side.
Cone and plug contributions accumulate ADDITIVELY (stack.t_extra_nm)
and fold into thick_scale once; multiplying the factors would overstate
mouth cells carrying both. The raster map draws filled mouths in a
darker tin with their own legend entry.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every barrel was drawn with the same green dot under one 'vias' legend
label, making through-hole pads read as vias. Pad barrels (kind='pad')
now draw violet with a 'THT pad barrels' entry; the legend lists only
the barrel kinds present.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- pyproject.toml + uv.lock: uv-managed dev environment (uv sync /
uv run pytest). requirements.txt stays: KiCad builds the plugin's
runtime venv from it and the PCM zip packages it.
- README: em-dash and run-on cleanup (34 -> 22, the rest deliberate),
split the 120-word THT solder-joint sentence, fix the documented
ADAPTIVE_MAX_CELL_UM value (2 mm -> 1 mm, config has 1000 um), fix
the *Packaging / publishing* cross-reference, dev sections now use
uv sync / uv run.
- LLM disclaimer: "most commits" carry the trailer (32 of 39), figures
claim now excepts the hand-drawn hole cross-section, reference the
UT3513+ measured-vs-computed validation.
- .gitignore: local AI-tooling artifacts; deploy scripts exclude
pyproject.toml/uv.lock; error-figure title punctuation aligned with
the other window titles.
Multi-layer figures (raster map, potential, current density, power
density) get a layer checkbox panel on interactive backends: unticking
a layer removes its row and the remaining rows grow to fill the window
(constrained layout reflows). At least one layer stays visible; saved
PNGs always contain every layer, with the panel hidden.
The four figure builders are restructured around per-layer painters
plus a finalize hook (legend/colorbar/annotations), driven by a shared
_layer_windows redraw loop; single-layer figures and non-interactive
runs are unchanged. The toggle path is exercised headlessly through
the real CheckButtons callback in the visual check.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two display fixes for the adaptive grid, from field feedback:
- Equipotential contours showed leaf-sized staircase corners on plane
interiors: the potential is now expanded piecewise-LINEARLY from each
leaf's reconstructed gradient instead of constant-per-leaf, and the
default ADAPTIVE_MAX_CELL_UM drops 2 mm -> 1 mm (interior leaves
beyond that buy almost nothing).
- The raster map now overlays the adaptive mesh: boundaries of coarse
leaves draw in darker copper (fine regions stay plain = fully
resolved), with a legend entry. Uniform-grid runs are unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Figures use constrained layout, which reflows on every draw, so the
content adapts when the user resizes the window; tight_layout was
one-shot. Windows larger than the screen are shrunk to fit after the
PNGs are saved, so saved output is unaffected.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Open saved figures via xdg-open/open/startfile when no GUI backend
exists, and extend the potential map's color range below the V- mean
reference instead of clipping it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DC/AC resistance, power dissipation, and via/injection-area currents of
copper zone fills. KiCad 10 IPC-API plugin (kicad-python/kipy):
multi-layer via-coupled FDM solver, multi-part terminals via User.1/User.2
marker layers, pads as contacts, uniform-injection and equipotential
contact models, per-foil skin effect, optional solder/copper buildup on
mask openings. 54-case test suite incl. exact analytic references.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>