Skip to content

Commit

Permalink
Fix footprint pads type #37
Browse files Browse the repository at this point in the history
  • Loading branch information
TousstNicolas committed Nov 19, 2023
1 parent 7b82f1a commit 927bf1a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions JLC2KiCadLib/footprint/footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ def __init__(
else:
handlers.get(model)(args[1:], kicad_mod, footprint_info)

if any(
isinstance(child, Pad) and child.type == Pad.TYPE_THT
for child in kicad_mod.getAllChilds()
):
kicad_mod.setAttribute("through_hole")
else:
kicad_mod.setAttribute("smd")

kicad_mod.insert(Translation(-mil2mm(translation[0]), -mil2mm(translation[1])))

# Translate the footprint max and min values to the origin
Expand Down

0 comments on commit 927bf1a

Please sign in to comment.