Footprint wizards: fix some issues due to C++ code change.

Some constants were renamed, breaking some wizards.
This commit is contained in:
jean-pierre charras 2020-09-02 15:45:20 +02:00
parent c0afeed13d
commit eb16fec7ec
8 changed files with 14 additions and 14 deletions

View File

@ -133,7 +133,7 @@ class FPC_FootprintWizard(FootprintWizardBase.FootprintWizard):
self.draw.Line(-xstart, posy, -xend, yend)
# set SMD attribute
self.module.SetAttributes(pcbnew.MOD_CMS)
self.module.SetAttributes(pcbnew.MOD_SMD)
# vertical segment at left of the pad
xstart = xend
@ -162,18 +162,18 @@ class FPC_FootprintWizard(FootprintWizardBase.FootprintWizard):
# right pad side
self.draw.Line(-xstart, posy, -xend, yend)
# Courtyard
self.draw.SetLayer(pcbnew.F_CrtYd)
max_x = max_x + linewidth + margin
min_y = min_y - linewidth - margin
max_y = max_y + linewidth + margin
max_y = max_y + linewidth + margin
# round size to nearest 0.1mm, rectangle will thus land on a 0.05mm grid
max_x = pcbnew.PutOnGridMM(max_x, 0.05)
max_y = pcbnew.PutOnGridMM(max_y, 0.05)
min_y = pcbnew.PutOnGridMM(min_y, 0.05)
# set courtyard line thickness to the one defined in KLC
self.draw.SetLineThickness(pcbnew.FromMM(0.05))
self.draw.Line( -max_x, min_y, max_x, min_y )

View File

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

View File

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

View File

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

View File

@ -150,7 +150,7 @@ class QRCodeWizard(FootprintWizardBase.FootprintWizard):
self.module.Value().SetPos0(pos)
self.module.Value().SetTextHeight(self.textHeight)
self.module.Value().SetTextWidth(self.textWidth)
self.module.Value().SetThickness(self.textThickness)
self.module.Value().SetTextThickness(self.textThickness)
# Add Reference field
pos = pcbnew.wxPoint(0, textPosition)

View File

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

View File

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

View File

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