Resolve board via nets by net code, not pad-net token.
_via_from_node used _pad_net first, so (net 1) stayed as '1' instead of GND.
This commit is contained in:
@@ -274,7 +274,7 @@ def _via_from_node(
|
||||
if local:
|
||||
rx, ry = _rotate(vx, vy, frot)
|
||||
vx, vy = fx + rx, fy + ry
|
||||
net = _pad_net(node) or _net_name(node, nets)
|
||||
net = _net_name(node, nets)
|
||||
return LayoutVia(x=vx, y=vy, net=net, drill=drill)
|
||||
|
||||
|
||||
@@ -361,7 +361,9 @@ def parse_kicad_pcb(path: str | Path) -> LayoutGraph:
|
||||
if _is_footprint_via(pad):
|
||||
drill_el = _kid(pad, "drill")
|
||||
drill = _fnum(drill_el[1]) if drill_el and len(drill_el) > 1 else None
|
||||
vias.append(LayoutVia(x=ax, y=ay, net=_pad_net(pad), drill=drill))
|
||||
vias.append(LayoutVia(
|
||||
x=ax, y=ay, net=_net_name(pad, nets) or _pad_net(pad), drill=drill,
|
||||
))
|
||||
continue
|
||||
if _is_npth_pad(pad):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user