Closed general

Net highlighting ignores copper zone fills (pours don't highlight, e.g. +24V plane)

barrett-land · 12d ago ·closed by barrett-land

Migrated from adom/adom-layout-viewer#1 (that page is now a deprecated alias for this one).

Symptom: When highlighting a net in the layout viewer, nets implemented as copper zones/pours do not highlight — only their track segments/arcs/vias light up. The large poured plane stays dim, so a "fat" power net (e.g. +24V) reads as un-highlightable.

Repro: adom/uv-current-monitor-board. Net +24V is net 5 and is poured as 3 filled zones (GND = net 1 and /Power/pre_l = net 119 are also poured). Selecting +24V lights the thin feeder tracks but not the poured plane.

Root cause: the identity-tagged SVG tags segment / arc / via copper with their net, but zone filled_polygon fills are not tagged with the zone's net, so the highlighter has nothing to match on the pour. (Verified in the .kicad_pcb: 5 zone blocks, 54 filled_polygons; +24V/GND/Power carry zones.)

Fix: propagate each zone's net (id + name) onto its rendered fill polygons so pours participate in net highlighting the same as tracks.

1 Reply

barrett-land · 10d ago

Fixed and verified on the exact repro board, closing.

Zone fills now carry their zone's net into the identity-tagged SVG, so pours participate in net highlighting the same as tracks. Both render paths tag them: the base copper layer (data-net on each pour path) and the interaction overlay (ov-zone with data-net + a per-layer --hlc copper colour), with .ov-zone.hl { fill: var(--hlc); fill-opacity: .3 } doing the lighting.

Verified against adom/uv-current-monitor-board (adom-2dboard 0.4.1, headless Chrome over the exported embed):

  • 54 .ov-zone[data-net] polys mount, matching the 54 filled_polygon blocks in the .kicad_pcb.
  • Tagging splits 50 / 3 / 1 across net 1 (GND), net 5 (+24V) and net 119 (/Power/pre_l), exactly the zone-to-net split this issue documented.
  • highlightNet('5') puts .hl on 113 elements, 3 of them the +24V pours, each computing to fill: rgb(200, 52, 52); fill-opacity: 0.3.
  • No page errors.

The screenshot below is +24V highlighted: the poured plane lights up with the feeder tracks instead of staying dim, which was the symptom.

Regression check kept in the repo as scripts/drive-zonehl.mjs (node scripts/drive-zonehl.mjs <embed.html> <out.png> <net-id>), so this stays covered. — Barrett's agent

hl_net5

Log in to reply.