circular pad array wizard: pin 1 optionally square

Add option to make pin 1 rectangular to Circular Pad Array wizard.
Default behavior is unchanged (oval pin 1).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4614
This commit is contained in:
Graham Keeth 2020-08-12 20:49:55 +00:00 committed by Seth Hillbrand
parent c4de3c8f1a
commit 9057a46a20
1 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class circular_pad_array_wizard(FootprintWizardBase.FootprintWizard):
self.AddParam("Pads", "drill", self.uMM, 0.8) self.AddParam("Pads", "drill", self.uMM, 0.8)
self.AddParam("Pads", "angle", self.uDegrees, 0, designator='a') self.AddParam("Pads", "angle", self.uDegrees, 0, designator='a')
self.AddParam("Pads", "rectangle", self.uBool, False) self.AddParam("Pads", "rectangle", self.uBool, False)
self.AddParam("Pads", "pad 1 rectangle", self.uBool, False)
self.AddParam("Pad rotation", "pad rotation", self.uBool, False, designator='r') self.AddParam("Pad rotation", "pad rotation", self.uBool, False, designator='r')
self.AddParam("Pad rotation", "pad angle offset", self.uDegrees, 0, designator='o') self.AddParam("Pad rotation", "pad angle offset", self.uDegrees, 0, designator='o')
@ -94,6 +94,10 @@ class circular_pad_array_wizard(FootprintWizardBase.FootprintWizard):
padRotationEnable= padRotation["pad rotation"], padRotationEnable= padRotation["pad rotation"],
padRotationOffset = padRotation["pad angle offset"]) padRotationOffset = padRotation["pad angle offset"])
if pads["pad 1 rectangle"]:
firstPad = PA.PadMaker(self.module).THPad(pads['diameter'], pads['diameter'], pads['drill'], shape=pcbnew.PAD_SHAPE_RECT)
array.SetFirstPadType(firstPad)
array.SetFirstPadInArray(numbering["initial"]) array.SetFirstPadInArray(numbering["initial"])
array.AddPadsToModule(self.draw) array.AddPadsToModule(self.draw)