Commit Graph

8 Commits

Author SHA1 Message Date
janik 666abaa50f Populated THT holes conduct in-plane as their solder plug + lead
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>
2026-07-17 20:38:01 +07:00
janik c77e3408bd Raster map: THT pad barrels get their own marker and legend entry
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>
2026-07-17 20:37:28 +07:00
grabowski d9ca118e1b uv dev environment, README writing pass, publish hygiene
Build PCM package / build (push) Successful in 8s
- 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.
2026-07-17 13:24:08 +07:00
janik 1c97090005 Layer visibility checkboxes in the result windows
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>
2026-07-15 18:27:06 +07:00
janik 1a28f2a593 Smooth adaptive potential maps and draw the mesh on the raster figure
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>
2026-07-15 18:12:52 +07:00
janik bc8dcab9e4 plots: responsive figures (constrained layout + fit-to-screen)
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>
2026-07-15 16:02:02 +07:00
janik ffbd4a86b5 plots: cross-platform PNG opener; keep uniform-model V- cells in range
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>
2026-07-15 14:55:09 +07:00
janik 06c62e04f8 Initial import: KiCad zone resistance plugin
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>
2026-07-14 17:22:00 +07:00