Skip to content

Commit

Permalink
Fix: Exclude SMD pads on non copper layer
Browse files Browse the repository at this point in the history
  • Loading branch information
NilujePerchut committed Jul 24, 2020
1 parent 948ad53 commit 32b85a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion teardrops/td.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ def __GetAllPads(board, filters=[]):
if pad.GetAttribute() == PAD_ATTRIB_SMD:
# Cannot use GetLayer here because it returns the non-flipped
# layer. Need to get the real layer from the layer set
layer = pad.GetLayerSet().CuStack()[0]
cu_stack = pad.GetLayerSet().CuStack()
if len(cu_stack) == 0:
# The pad is not on a Copper layer
continue
layer = cu_stack[0]
else:
layer = -1
pads.append((pos, drill, 0, layer))
Expand Down

0 comments on commit 32b85a4

Please sign in to comment.