Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions kicad_sch_api/core/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,13 @@ def _add_wire_to_net(self, wire: Wire, pins: Set[PinConnection], wire_points: Li
wire_points: Points along the wire
"""
# Check if any of these pins are already in a net
existing_nets = set()
# Use list instead of set since Net objects are mutable (not hashable)
existing_nets = []
for pin in pins:
if pin in self._pin_to_net:
existing_nets.add(self._pin_to_net[pin])
net = self._pin_to_net[pin]
if net not in existing_nets:
existing_nets.append(net)

if existing_nets:
# Merge all existing nets into the first one
Expand Down