Show Action on finding cards and inject PCB geometry into AI context.

Layout and AI findings always get action (fallback recommendation). The card
renders that sentence in the body. PCB review context now includes vias under
the footprint, copper thickness, nearby widths, courtyard, and keepout polygons.
This commit is contained in:
2026-09-20 09:13:51 +02:00
parent f63c1c3411
commit facbaa2305
12 changed files with 359 additions and 28 deletions
+17
View File
@@ -76,6 +76,23 @@ def test_kicad_sch_is_rejected_as_pcb(tmp_path: Path):
parse_kicad_pcb(p)
def test_parse_keepout_zone_polygon(tmp_path: Path):
p = tmp_path / "keepout.kicad_pcb"
p.write_text("""(kicad_pcb (version 20240108) (generator pcbnew)
(zone (net 0) (net_name "") (layer "F.Cu") (name "ANT_KEEPOUT")
(keepout (tracks not_allowed) (vias not_allowed) (copperpour not_allowed))
(polygon (pts (xy 0 0) (xy 10 0) (xy 10 8) (xy 0 8)))
)
)
""")
g = parse_kicad_pcb(p)
assert len(g.zones) == 1
z = g.zones[0]
assert z.keepout is True
assert z.name == "ANT_KEEPOUT"
assert len(z.outlines[0]) == 4
def test_empty_board_parses(tmp_path: Path):
p = tmp_path / "empty.kicad_pcb"
p.write_text("(kicad_pcb (version 20240108) (generator pcbnew))\n")