qfn_wizard.py fixes.

This commit is contained in:
jean-pierre charras 2019-04-18 08:54:44 +02:00
parent 6e8979d8d8
commit 554e2a4bce
1 changed files with 7 additions and 7 deletions

View File

@ -37,7 +37,7 @@ class QFNWizard(FootprintWizardBase.FootprintWizard):
self.AddParam("Pads", "pitch", self.uMM, 0.4, designator='e')
self.AddParam("Pads", "width", self.uMM, 0.2, designator='X1')
self.AddParam("Pads", "length", self.uMM, 0.75, designator='Y1')
self.AddParam("Pads", "fillet", self.uMM, 0.3)
self.AddParam("Pads", "offset", self.uMM, 0.0)
self.AddParam("Pads", "oval", self.uBool, True)
self.AddParam("EPad", "epad", self.uBool, True)
@ -82,8 +82,8 @@ class QFNWizard(FootprintWizardBase.FootprintWizard):
pad_pitch = self.pads["pitch"]
pad_length = self.pads["length"]
# Fillet allows to define how much of the pad is outside of the package
pad_fillet = self.pads["fillet"]
# offset allows to define how much of the pad is outside of the package
pad_offset = self.pads["offset"]
pad_width = self.pads["width"]
v_pitch = self.package["height"]
@ -95,12 +95,12 @@ class QFNWizard(FootprintWizardBase.FootprintWizard):
pad_shape = pcbnew.PAD_SHAPE_OVAL if self.pads["oval"] else pcbnew.PAD_SHAPE_RECT
h_pad = PA.PadMaker(self.module).SMDPad( pad_length + pad_fillet, pad_width,
h_pad = PA.PadMaker(self.module).SMDPad( pad_length, pad_width,
shape=pad_shape, rot_degree=90.0)
v_pad = PA.PadMaker(self.module).SMDPad( pad_length + pad_fillet, pad_width, shape=pad_shape)
v_pad = PA.PadMaker(self.module).SMDPad( pad_length, pad_width, shape=pad_shape)
h_pitch = h_pitch / 2 - pad_length + (pad_length+pad_fillet)/2
v_pitch = v_pitch / 2 - pad_length + (pad_length+pad_fillet)/2
h_pitch = h_pitch / 2 - pad_length + pad_offset + pad_length/2
v_pitch = v_pitch / 2 - pad_length +pad_offset + pad_length/2
#left row
pin1Pos = pcbnew.wxPoint(-h_pitch, 0)