Update python for the pad wxSize switch

This commit is contained in:
Marek Roszko
2022-01-04 23:28:06 -05:00
parent 6d2fd17a39
commit cc5003a919
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -47,11 +47,11 @@ class PadMaker(object):
@param rot_degree: the pad rotation, in degrees
"""
pad = pcbnew.PAD(self.module)
pad.SetSize(pcbnew.wxSize(Hsize, Vsize))
pad.SetSize(pcbnew.VECTOR2I(Hsize, Vsize))
pad.SetShape(shape)
pad.SetAttribute(pcbnew.PAD_ATTRIB_PTH)
pad.SetLayerSet(pad.PTHMask())
pad.SetDrillSize(pcbnew.wxSize(drill, drill))
pad.SetDrillSize(pcbnew.VECTOR2I(drill, drill))
pad.SetOrientation(rot_degree*10) # rotation is in 0.1 degrees
return pad
@@ -72,11 +72,11 @@ class PadMaker(object):
@param drill: the drill diameter (equals the NPTH diameter)
"""
pad = pcbnew.PAD(self.module)
pad.SetSize(pcbnew.wxSize(drill, drill))
pad.SetSize(pcbnew.VECTOR2I(drill, drill))
pad.SetShape(pcbnew.PAD_SHAPE_CIRCLE)
pad.SetAttribute(pcbnew.PAD_ATTRIB_HOLE_NOT_PLATED)
pad.SetLayerSet(pad.UnplatedHoleMask())
pad.SetDrillSize(pcbnew.wxSize(drill, drill))
pad.SetDrillSize(pcbnew.VECTOR2I(drill, drill))
return pad
def SMDPad(self, Vsize, Hsize, shape=pcbnew.PAD_SHAPE_RECT, rot_degree=0):
@@ -89,7 +89,7 @@ class PadMaker(object):
@param rot_degree: the pad rotation, in degrees
"""
pad = pcbnew.PAD(self.module)
pad.SetSize(pcbnew.wxSize(Hsize, Vsize))
pad.SetSize(pcbnew.VECTOR2I(Hsize, Vsize))
pad.SetShape(shape)
pad.SetAttribute(pcbnew.PAD_ATTRIB_SMD)
pad.SetLayerSet(pad.SMDMask())