KiCad 文件桥与寄生提取
KiCad S 表达式解析(花括号/C 转义、截断与嵌套守卫),.kicad_sch/.kicad_pcb 提取为 board-topology 网表与 BOM,按几何计算每网络走线/过孔寄生 R/L;离线契约报告。
Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.
Preview gallery
Parse this KiCad schematic and PCB text: extract the netlist/BOM, compute parasitic R/L for the 20 mm VOUT trace and its via, and report the C1 missing-Value BOM risk.
Content matches the files inside the package; extracted by the publish pipeline.
LCEDA KiCad format bridge bundle
Offline Node rewrite of the reading cores of the MIT-licensed
kicad-happy agent skills (see references/PROVENANCE.md): the KiCad
S-expression parser (kicad_core/sexp.py) and the parasitic extraction
math (skills/spice/scripts/extract_parasitics.py). Importing the
design into 嘉立创EDA专业版 is a procedure in references/procedures.md.
What the script computes
scripts/demo.mjs (Node >= 20, no dependencies):
- S-expression tokenizer/parser: quoted strings with KiCad's C-style
escapes (
\xHH/octal as UTF-8 bytes),{brace}escapes, line-start#comments, a 200-level nesting guard, and explicit problems for truncated files (never a silently partial tree). - Property access incl. KiCad 9+
(property private "Name" "Value"). .kicad_sch: symbols (Reference/Value/lib_id/at), wires, labels..kicad_pcb: net table, footprints with pads (absolute pad coords, net membership), segments (net/layer/width/endpoints), vias (drill).board-topology/1.1netlist: components with pins, nets withREF.PINmembers, stats.- Per-net parasitics from geometry: trace
R = ρL/(WT)(ρ_Cu = 1.68e-8 Ω·m), via barrelR = ρH/(π(r_out²−r_in²))with 25 µm plating, via partial self-inductanceL = (µ₀H/2π)ln(2H/D). Coupling capacitanceC = ε₀εrLT/Sis exported for parallel runs.
Run
node scripts/demo.mjs --out-dir <dir> [--input <bridge.json>]
Default input: scripts/fixtures/input.json. stdout is an
edaskills.report.v1 report; <dir> receives topology.json,
parasitics.csv, bom.csv.
Input shape: { "sch"?: "<kicad_sch text>", "pcb"?: "<kicad_pcb text>", "stackup"?: { "copperMm", "boardMm" } }.
When to use
- Review a KiCad design (or a KiCad export from another tool) without installing KiCad: netlist, BOM completeness, per-net R/L budget.
- Feed the topology into lceda-netlist-topology-export consumers or the parasitics into a SPICE testbench annotation.
- Pre-check a KiCad→LCEDA migration: missing values/refs surface here before the import.
Not for: writing KiCad files (read-only bridge), zone/fill geometry, length tuning within a net's branches (series R is summed, not a distributed model), or DRC.
Dependencies
Demo run
node v24.19.0 · 2026/11/19
- [info] SCH_EXTRACT (sch): 3 symbols, 1 wires, 1 labels
- [info] PCB_EXTRACT (pcb): 3 footprints, 3 segments, 1 vias, 4 nets
- [warning] VALUE_MISSING (C1): C1 has no Value property; BOM line will be incomplete
- [info] NET_PARASITIC (VOUT): VOUT: 20.00 mm, trace 38.40 mOhm, 1 vias (0.91 mOhm, 0.665 nH)
FAQ
Ratings & reviews
Not rated0 ratings
Sign in to rate this skill.
Sign inVersions
- v1.0.0Latest261.0 KB
首发种子版本。