feat(wire): winding label + pin/connection editor, incl. Blind connections#3
Open
gpitel wants to merge 2 commits into
Open
feat(wire): winding label + pin/connection editor, incl. Blind connections#3gpitel wants to merge 2 commits into
gpitel wants to merge 2 commits into
Conversation
…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>
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a per-winding editor to the Wire Configuration panel (
BasicLabelPinSelector.vue):functionalDescription.name) and a Pins / Connections editor (type + pinName + lead length), padded to the MAS minimum of 2.pinNameare 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 nodeJ1):Note on the
Blindconnection type"Blind"is not currently in the MASconnectionTypeenum (pin/screw/smt/flyingLead/tht/pcbPad). It round-trips through the live app and MKF (neither validatesconnection.type), but strict generated loaders (PyMKFapi/MAS.py, the TS enum) won't recognize it. Happy to align on addingblindto the upstream enum if that's preferred.Commits
5224d52— winding label + pin/connection editor27bec81— Blind winding-to-winding connection typeValidation
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