From 45cb1096689a822fdff261f6d4a0f26d55616353 Mon Sep 17 00:00:00 2001 From: miceuz Date: Wed, 28 Sep 2022 17:20:10 +0300 Subject: [PATCH] Return back KiCad 6 code with conditionals for v7 compatibility --- plugins/process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/process.py b/plugins/process.py index 321983b..1e59510 100644 --- a/plugins/process.py +++ b/plugins/process.py @@ -27,6 +27,8 @@ class ProcessManager: plot_options.SetScale(1) plot_options.SetMirror(False) plot_options.SetUseGerberAttributes(True) + if hasattr(plot_options, "SetExcludeEdgeLayer"): + plot_options.SetExcludeEdgeLayer(True) plot_options.SetUseGerberProtelExtensions(False) plot_options.SetUseAuxOrigin(True) plot_options.SetSubtractMaskFromSilk(False) @@ -106,7 +108,7 @@ class ProcessManager: 'Designator': "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id), 'Mid X': (footprint.GetPosition()[0] - self.board.GetDesignSettings().GetAuxOrigin()[0]) / 1000000.0, 'Mid Y': (footprint.GetPosition()[1] - self.board.GetDesignSettings().GetAuxOrigin()[1]) * -1.0 / 1000000.0, - 'Rotation': footprint.GetOrientation().AsDegrees(), + 'Rotation': footprint.GetOrientation().AsDegrees() if hasattr(footprint.GetOrientation(), 'AsDegrees') else footprint.GetOrientation() / 10.0, 'Layer': layer, })