Skip to content

feat(wire): winding label + pin/connection editor, incl. Blind connections#3

Open
gpitel wants to merge 2 commits into
OpenMagnetics:mainfrom
gpitel:feature/blind-connection-editor
Open

feat(wire): winding label + pin/connection editor, incl. Blind connections#3
gpitel wants to merge 2 commits into
OpenMagnetics:mainfrom
gpitel:feature/blind-connection-editor

Conversation

@gpitel

@gpitel gpitel commented Jun 16, 2026

Copy link
Copy Markdown

Summary

Adds a per-winding editor to the Wire Configuration panel (BasicLabelPinSelector.vue):

  • Winding Label (functionalDescription.name) and a Pins / Connections editor (type + pinName + lead length), padded to the MAS minimum of 2.
  • Blind (winding-to-winding) connections: two windings sharing a blind pinName are joined internally. The Name field becomes an <input list> combobox suggesting blind node ids already used on other windings; Length is disabled on blind rows. Connections are pure MAS metadata, so edits do not re-wind the coil.

Before / After

Wire Configuration grid — main (no per-winding editor) vs this PR, which adds the Label + Pins / Connections editor (shown with a Pin row and a Blind row joined at internal node J1):

Before (main) After (this PR)
before after

Note on the Blind connection type

"Blind" is not currently in the MAS connectionType enum (pin/screw/smt/flyingLead/tht/pcbPad). It round-trips through the live app and MKF (neither validates connection.type), but strict generated loaders (PyMKF api/MAS.py, the TS enum) won't recognize it. Happy to align on adding blind to the upstream enum if that's preferred.

Commits

  • 5224d52 — winding label + pin/connection editor
  • 27bec81 — Blind winding-to-winding connection type

Validation

Headless Playwright DOM check: the Type dropdown offers Blind, a blind Name renders as a <datalist> combobox, the cross-winding node id is suggested, and Length is disabled on blind rows — PASS.

🤖 Generated with Claude Code

grantpitel and others added 2 commits June 14, 2026 11:17
…ration

Adds BasicLabelPinSelector.vue to edit a winding's name and its connections
(pin name, terminal type and lead length) in the Wire Configuration panel.
Connections are MAS metadata, so edits don't invalidate the wound geometry. The
pin field is a dropdown when the bobbin declares pins, otherwise a free-text
input; lead length is entered in mm and stored in metres, and the connection
count is clamped to 2x numberParallels. Renaming a winding propagates to the
construction references so name-matched derived views stay consistent.
Extends the Wire Configuration pin/connection editor (BasicLabelPinSelector)
with a blind (internal winding-to-winding) connection:
- add "Blind" to the connection Type dropdown
- when a row's type is Blind, render the Name field as an <input list> +
  <datalist> combobox: free text to mint a node id, plus a dropdown of blind
  node ids already used on any winding (pick one to join this winding to it)
- disable the Length input on blind rows (an internal joint has no lead length)

Two windings sharing the same Blind pinName are joined. "Blind" is a local
string value (not yet in the generated MAS.ts ConnectionType enum) and
round-trips to MAS verbatim.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gpitel

gpitel commented Jun 21, 2026

Copy link
Copy Markdown
Author

Correction to my note above — the engine does validate connection.type. On a design that loads cleanly, changing only two connections to {"type":"Blind"} makes masAutocomplete (run on every load via checkAndFixMas) throw Input JSON does not conform to schema!, and the coil then fails to wind. So any blind design currently fails to load.

I've added Blind/blind to the connectionType enum across the stack — MAS + MKF/MAS schemas, MAS.hpp (from_json/to_json), and the MAS.ts / PyMKF / WebBackend copies (happy to PR the MKF/MAS change). The one piece I can't do is rebuilding libMKF.wasm — it lives in the private WebLibMKF (gpitel 404s on it). Could you grant access so I can rebuild it, or rebuild it with the enum value added?

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