← Back to team overview

kicad-developers team mailing list archive

Re: kicad footprint plugins wizard in windows

 

Hi,

Here is the patch vs revision 6132 for adding exposed pad to qfp_wyzard

I added the exposed pad option and changed name from QFP to QFP/QFN.
I used the function PadLineArray because I couldn't find the apis doc...
anyway it should be fine.
I assigned 0 to exposed pad pin number...
please let me know if it is fine or if I should change it to maxpin number +1.

Thank you,
Maurice

On 23/08/2015 17.29, jp charras wrote:
Le 23/08/2015 16:41, easyw a écrit :
Hi JP,

The changes are fully working.
thanks for committing.

PS
I see you added a bar code generator to fp wizard...
Do you think it would possible to add also an option for exposed pad in
qfp/qfn footprint?
thank you
Maurice

Yes, I think this is a good idea.



--- qfp_wizard-old.py	2015-08-29 21:25:33.516578500 +0200
+++ qfp_wizard.py	2015-08-29 21:14:59.912787800 +0200
@@ -24,10 +24,10 @@
 class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):

     def GetName(self):
-        return "QFP"
+        return "QFP/QFN"

     def GetDescription(self):
-        return "QFP Footprint Wizard"
+        return "QFP/QFN Footprint Wizard"

     def GenerateParameterList(self):
         self.AddParam("Pads", "n", self.uNatural, 100)
@@ -41,6 +41,9 @@
         self.AddParam("Pads", "package width", self.uMM, 14)
         self.AddParam("Pads", "package height", self.uMM, 14)

+        self.AddParam("Pads", "epad width", self.uMM, 0.0)
+        self.AddParam("Pads", "epad length", self.uMM, 0.0)
+
     def CheckParameters(self):

         self.CheckParamInt("Pads", "*n", is_multiple_of=4)
@@ -57,6 +60,9 @@
         pad_length = self.parameters["Pads"]["pad length"]
         pad_width = self.parameters["Pads"]["pad width"]

+        epad_length = self.parameters["Pads"]["epad length"]
+        epad_width = self.parameters["Pads"]["epad width"]
+
         v_pitch = pads["vertical pitch"]
         h_pitch = pads["horizontal pitch"]

@@ -99,6 +105,17 @@
         array.SetFirstPadInArray(3*pads_per_row + 1)
         array.AddPadsToModule(self.draw)

+        #epad
+        if epad_length!=0 and epad_width!=0:
+            e_pad = PA.PadMaker(self.module).SMDPad(
+            epad_width, epad_length, shape=pcbnew.PAD_SHAPE_RECT)
+            epadPos = pcbnew.wxPoint (0, 0)
+            array = PA.PadLineArray(e_pad, 1, 1, False,
+                                    epadPos)
+            array.SetFirstPadInArray(0)
+            array.AddPadsToModule(self.draw)
+
+
         lim_x = pads["package width"] / 2
         lim_y = pads["package height"] / 2
         inner = (row_len / 2) + pad_pitch

Follow ups

References