From 411914dffb88262f89e00052c31099a02f5add2e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 Oct 2020 20:48:13 +0200 Subject: [PATCH] Fix python footprint wizards after recent changes in code --- pcbnew/python/plugins/FootprintWizardBase.py | 6 +++--- pcbnew/python/plugins/PadArray.py | 4 ++-- pcbnew/python/plugins/qrcode_footprint_wizard.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/python/plugins/FootprintWizardBase.py b/pcbnew/python/plugins/FootprintWizardBase.py index 965ac9ff5d..94fab7051b 100644 --- a/pcbnew/python/plugins/FootprintWizardBase.py +++ b/pcbnew/python/plugins/FootprintWizardBase.py @@ -481,7 +481,7 @@ class FootprintWizardDrawingAids: """! Draw a line from (x1, y1) to (x2, y2) """ - outline = pcbnew.EDGE_MODULE(self.module) + outline = pcbnew.FP_SHAPE(self.module) outline.SetWidth(self.GetLineThickness()) outline.SetLayer(self.GetLayer()) outline.SetShape(pcbnew.S_SEGMENT) @@ -503,7 +503,7 @@ class FootprintWizardDrawingAids: DC line thickness """ - circle = pcbnew.EDGE_MODULE(self.module) + circle = pcbnew.FP_SHAPE(self.module) start = self.TransformPoint(x, y) if filled: @@ -533,7 +533,7 @@ class FootprintWizardDrawingAids: @param sy: the y co-ordinate of the arc start point @param a: the arc's central angle (in deci-degrees) """ - circle = pcbnew.EDGE_MODULE(self.module) + circle = pcbnew.FP_SHAPE(self.module) circle.SetWidth(self.dc['lineThickness']) center = self.TransformPoint(cx, cy) diff --git a/pcbnew/python/plugins/PadArray.py b/pcbnew/python/plugins/PadArray.py index 9ecd983893..33d7a0efbb 100644 --- a/pcbnew/python/plugins/PadArray.py +++ b/pcbnew/python/plugins/PadArray.py @@ -49,8 +49,8 @@ class PadMaker(object): pad = pcbnew.D_PAD(self.module) pad.SetSize(pcbnew.wxSize(Hsize, Vsize)) pad.SetShape(shape) - pad.SetAttribute(pcbnew.PAD_ATTRIB_STANDARD) - pad.SetLayerSet(pad.StandardMask()) + pad.SetAttribute(pcbnew.PAD_ATTRIB_PTH) + pad.SetLayerSet(pad.PTHMask()) pad.SetDrillSize(pcbnew.wxSize(drill, drill)) pad.SetOrientation(rot_degree*10) # rotation is in 0.1 degrees diff --git a/pcbnew/python/plugins/qrcode_footprint_wizard.py b/pcbnew/python/plugins/qrcode_footprint_wizard.py index ed7f896c8e..dcb0e103d3 100644 --- a/pcbnew/python/plugins/qrcode_footprint_wizard.py +++ b/pcbnew/python/plugins/qrcode_footprint_wizard.py @@ -67,7 +67,7 @@ class QRCodeWizard(FootprintWizardBase.FootprintWizard): def drawPixelSquareArea( self, layer, size, xposition, yposition): # creates a FP_SHAPE of polygon type. The polygon is a square - polygon = pcbnew.EDGE_MODULE(self.module) + polygon = pcbnew.FP_SHAPE(self.module) polygon.SetShape(pcbnew.S_POLYGON) polygon.SetWidth( 0 ) polygon.SetLayer(layer)