Some fixes in python footprint wizards

This commit is contained in:
jean-pierre charras 2020-11-14 13:38:44 +01:00
parent 28991ddf58
commit 103dbb9fbd
8 changed files with 10 additions and 10 deletions

View File

@ -133,7 +133,7 @@ class FPC_FootprintWizard(FootprintWizardBase.FootprintWizard):
self.draw.Line(-xstart, posy, -xend, yend) self.draw.Line(-xstart, posy, -xend, yend)
# set SMD attribute # set SMD attribute
self.module.SetAttributes(pcbnew.MOD_SMD) self.module.SetAttributes(pcbnew.PAD_ATTRIB_SMD)
# vertical segment at left of the pad # vertical segment at left of the pad
xstart = xend xstart = xend

View File

@ -164,6 +164,6 @@ class BGAWizard(FootprintWizardBase.FootprintWizard):
self.draw.Reference(0, -ypos, text_size) self.draw.Reference(0, -ypos, text_size)
# set SMD attribute # set SMD attribute
self.module.SetAttributes(pcbnew.MOD_SMD) self.module.SetAttributes(pcbnew.PAD_ATTRIB_SMD)
BGAWizard().register() BGAWizard().register()

View File

@ -227,7 +227,7 @@ class QFNWizard(FootprintWizardBase.FootprintWizard):
self.draw.Reference(0, -text_offset, text_size) self.draw.Reference(0, -text_offset, text_size)
# set SMD attribute # set SMD attribute
self.module.SetAttributes(pcbnew.MOD_SMD) self.module.SetAttributes(pcbnew.PAD_ATTRIB_SMD)
QFNWizard().register() QFNWizard().register()

View File

@ -166,6 +166,6 @@ class QFPWizard(FootprintWizardBase.FootprintWizard):
self.draw.Reference(0, -text_offset, text_size) self.draw.Reference(0, -text_offset, text_size)
# set SMD attribute # set SMD attribute
self.module.SetAttributes(pcbnew.MOD_SMD) self.module.SetAttributes(pcbnew.PAD_ATTRIB_SMD)
QFPWizard().register() QFPWizard().register()

View File

@ -132,9 +132,9 @@ class RowedFootprint(FootprintWizardBase.FootprintWizard):
# set the attribute # set the attribute
if self.GetName() == "S-DIP": if self.GetName() == "S-DIP":
self.module.SetAttributes(pcbnew.MOD_THROUGH_HOLE) self.module.SetAttributes(pcbnew.PAD_ATTRIB_PTH)
elif self.GetName() == "SOIC": elif self.GetName() == "SOIC":
self.module.SetAttributes(pcbnew.MOD_SMD) self.module.SetAttributes(pcbnew.PAD_ATTRIB_SMD)
class SDIPWizard(RowedFootprint): class SDIPWizard(RowedFootprint):

View File

@ -189,7 +189,7 @@ class TouchSliderWizard(FootprintWizardBase.FootprintWizard):
self.draw.Reference(0, -ypos, t_size) self.draw.Reference(0, -ypos, t_size)
# set SMD attribute # set SMD attribute
self.module.SetAttributes(MOD_SMD) self.module.SetAttributes(PAD_ATTRIB_SMD)
# starting pad # starting pad
band_width = touch_width/bands band_width = touch_width/bands

View File

@ -113,9 +113,9 @@ class RowedFootprint(FootprintWizardBase.FootprintWizard):
# set SMD attribute # set SMD attribute
if self.GetName() == "ZIP": if self.GetName() == "ZIP":
self.module.SetAttributes(pcbnew.MOD_THROUGH_HOLE) self.module.SetAttributes(pcbnew.PAD_ATTRIB_PTH)
elif self.GetName() == "ZOIC": elif self.GetName() == "ZOIC":
self.module.SetAttributes(pcbnew.MOD_SMD) self.module.SetAttributes(pcbnew.PAD_ATTRIB_SMD)
def DrawBox(self, sizex, sizey): def DrawBox(self, sizex, sizey):

View File

@ -146,7 +146,7 @@ static PCB_TARGET* Cast_to_PCB_TARGET( BOARD_ITEM* );
elif ct=="PCB_GROUP": elif ct=="PCB_GROUP":
return Cast_to_PCB_GROUP(self) return Cast_to_PCB_GROUP(self)
elif ct=="PAD": elif ct=="PAD":
return Cast_to_D_PAD(self) return Cast_to_PAD(self)
elif ct=="MTEXT": elif ct=="MTEXT":
return Cast_to_FP_TEXT(self) return Cast_to_FP_TEXT(self)
elif ct=="VIA": elif ct=="VIA":