From 9057a46a209a0ce14b304537f17a2a787092483b Mon Sep 17 00:00:00 2001 From: Graham Keeth Date: Wed, 12 Aug 2020 20:49:55 +0000 Subject: [PATCH] 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 --- pcbnew/python/plugins/circular_pad_array_wizard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/python/plugins/circular_pad_array_wizard.py b/pcbnew/python/plugins/circular_pad_array_wizard.py index fc7e96f8ba..bdb3435fbc 100644 --- a/pcbnew/python/plugins/circular_pad_array_wizard.py +++ b/pcbnew/python/plugins/circular_pad_array_wizard.py @@ -38,7 +38,7 @@ class circular_pad_array_wizard(FootprintWizardBase.FootprintWizard): self.AddParam("Pads", "drill", self.uMM, 0.8) self.AddParam("Pads", "angle", self.uDegrees, 0, designator='a') 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 angle offset", self.uDegrees, 0, designator='o') @@ -94,6 +94,10 @@ class circular_pad_array_wizard(FootprintWizardBase.FootprintWizard): padRotationEnable= padRotation["pad rotation"], 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.AddPadsToModule(self.draw)