Set SMD attribute in footprint python generators

This commit is contained in:
unknown 2016-02-18 15:29:30 +01:00 committed by jean-pierre charras
parent ca5e66a57f
commit fb17b3fa17
6 changed files with 22 additions and 0 deletions

View File

@ -127,6 +127,9 @@ class FPC_FootprintWizard(HFPW.HelpfulFootprintWizardPlugin):
# right pad side
self.draw.Line(-xstart, posy, -xend, yend)
# set SMD attribute
self.module.SetAttributes(pcbnew.MOD_CMS)
# vertical segment at left of the pad
xstart = xend
yend = posy - (shl_height + linewidth + margin*2)

View File

@ -98,5 +98,7 @@ class BGAWizard(HFPW.HelpfulFootprintWizardPlugin):
self.draw.Value(0, ypos, text_size)
self.draw.Reference(0, -ypos, text_size)
# set SMD attribute
self.module.SetAttributes(pcbnew.MOD_CMS)
BGAWizard().register()

View File

@ -127,4 +127,7 @@ class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
self.draw.Value(0, text_offset, text_size)
self.draw.Reference(0, -text_offset, text_size)
# set SMD attribute
self.module.SetAttributes(pcbnew.MOD_CMS)
QFPWizard().register()

View File

@ -128,6 +128,11 @@ class RowedFootprint(HFPW.HelpfulFootprintWizardPlugin):
self.draw.Value(0, 0, text_size)
self.draw.Reference(-text_px, 0, text_size, orientation_degree=90)
# set the attribute
if self.GetName() == "S-DIP":
self.module.SetAttributes(pcbnew.MOD_DEFAULT)
elif self.GetName() == "SOIC":
self.module.SetAttributes(pcbnew.MOD_CMS)
class SDIPWizard(RowedFootprint):

View File

@ -193,6 +193,9 @@ class TouchSliderWizard(HFPW.HelpfulFootprintWizardPlugin):
ypos += t_size + w_text*2
self.draw.Reference(0, -ypos, t_size)
# set SMD attribute
self.module.SetAttributes(MOD_CMS)
# starting pad
pos = wxPointMM(0,0)
band_width = touch_width/bands

View File

@ -118,6 +118,12 @@ class RowedFootprint(HFPW.HelpfulFootprintWizardPlugin):
self.draw.Value(0, t_posy, text_size)
self.draw.Reference(0, -t_posy, text_size)
# set SMD attribute
if self.GetName() == "ZIP":
self.module.SetAttributes(pcbnew.MOD_DEFAULT)
elif self.GetName() == "ZOIC":
self.module.SetAttributes(pcbnew.MOD_CMS)
def DrawBox(self, sizex, sizey):
# ----------