FIX: corrected syntax in foot_gen script, and stopped leaving one footprint unprocessed.
This commit is contained in:
@@ -95,7 +95,7 @@ for d in brd_drawings:
|
|||||||
|
|
||||||
# Keep only required foots
|
# Keep only required foots
|
||||||
saved = []
|
saved = []
|
||||||
while len(pcb.Footprints()) > 1:
|
while len(pcb.Footprints()) > 0:
|
||||||
foot = pcb.Footprints().pop()
|
foot = pcb.Footprints().pop()
|
||||||
if foot.GetReference() in new_foots.keys():
|
if foot.GetReference() in new_foots.keys():
|
||||||
saved.append(foot)
|
saved.append(foot)
|
||||||
@@ -323,7 +323,7 @@ for [foot, pad_map] in sorted_foots:
|
|||||||
elif shape_type == pcbnew.PAD_SHAPE_CUSTOM:
|
elif shape_type == pcbnew.PAD_SHAPE_CUSTOM:
|
||||||
pad_shape = Pad.SHAPE_CUSTOM
|
pad_shape = Pad.SHAPE_CUSTOM
|
||||||
for d in foot.GraphicalItems():
|
for d in foot.GraphicalItems():
|
||||||
if type(d) is pcbnew.FP_TEXT and "User.Drawings" in d.GetLayerName():
|
if type(d) is pcbnew.PCB_TEXT and "User.Drawings" in d.GetLayerName():
|
||||||
txt_sp = d.GetText().split(':',1)
|
txt_sp = d.GetText().split(':',1)
|
||||||
if pad_number != txt_sp[0]:
|
if pad_number != txt_sp[0]:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user