Renaming diodes and scripting their position relative to their key

This commit is contained in:
Thomas Schwery 2018-03-25 21:41:22 +02:00
parent f436fdf243
commit 19598de988
3 changed files with 13395 additions and 12233 deletions

View file

@ -0,0 +1,18 @@
import pcbnew
board = pcbnew.GetBoard()
mods = board.GetModules()
for i in mods:
ref = i.GetReference()
if not ref.startswith('D'):
continue
k_ref = "K" + ref[1:]
k = board.FindModuleByReference(k_ref)
print k_ref, k
k_center = k.GetCenter()
d_center = pcbnew.wxPoint(k_center.x - 3808700, k_center.y - 6200000)
i.SetPosition(d_center)
i.SetOrientation(2700)
print k_ref, ref, d_center

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff