summaryrefslogtreecommitdiff
path: root/gerbonara/cad/kicad/footprints.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-09-22 13:30:11 +0200
committerjaseg <git@jaseg.de>2023-09-22 13:30:11 +0200
commitd2143bdf4df2204701a1dc116572fdf7d12baf05 (patch)
treea27a0bd005fa9897d7149010aa0c87b85d5f17b0 /gerbonara/cad/kicad/footprints.py
parent5f1350d4f4e1c190bf0b2db12b8183519b2d3413 (diff)
downloadgerbonara-d2143bdf4df2204701a1dc116572fdf7d12baf05.tar.gz
gerbonara-d2143bdf4df2204701a1dc116572fdf7d12baf05.tar.bz2
gerbonara-d2143bdf4df2204701a1dc116572fdf7d12baf05.zip
Trace connectivity WIP
Diffstat (limited to 'gerbonara/cad/kicad/footprints.py')
-rw-r--r--gerbonara/cad/kicad/footprints.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/gerbonara/cad/kicad/footprints.py b/gerbonara/cad/kicad/footprints.py
index 90050ef..7bdeec6 100644
--- a/gerbonara/cad/kicad/footprints.py
+++ b/gerbonara/cad/kicad/footprints.py
@@ -431,33 +431,6 @@ class Pad:
""" Find traces and vias of the same net as this pad. """
return self.footprint.board.find_traces(self.net.name, include_vias=include_vias)
- def find_connected_traces(self, consider_candidates=5):
- board = self.footprint.board
-
- found = set()
- search_frontier = [(self.at, 0, self.layer_mask)]
- while search_frontier:
- coord, size, layers = search_frontier.pop()
- x, y = coord.x, coord.y
-
- for cand, attr, cand_size in self.footprint.board.query_trace_index((x, x, y, y), layers,
- n=consider_candidates):
- if cand in found:
- continue
-
- cand_coord = getattr(cand, attr)
- cand_x, cand_y = cand_coord.x, cand_coord.y
- if math.dist((x, y), (cand_x, cand_y)) <= size/2 + cand_size/2:
- found.add(cand)
- yield cand
-
- if hasattr(cand, 'at'): # via or pad
- search_frontier.append((cand.at, getattr(cand, 'size', 0), cand.layer_mask))
- else:
- mask = cand.layer_mask
- search_frontier.append((cand.start, cand.width, mask))
- search_frontier.append((cand.end, cand.width, mask))
-
def render(self, variables=None, margin=None, cache=None):
#if self.type in (Atom.connect, Atom.np_thru_hole):
# return