From f53d1f50989949aab42ff43af4e0c6560a3a1c09 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 5 Mar 2024 08:44:51 +0000 Subject: [PATCH 1/3] Handle multiple weights - so inner and outer are added correctly --- SparkFunKiCadPanelizer/panelizer/panelizer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SparkFunKiCadPanelizer/panelizer/panelizer.py b/SparkFunKiCadPanelizer/panelizer/panelizer.py index 3022ad6..1b2ac51 100644 --- a/SparkFunKiCadPanelizer/panelizer/panelizer.py +++ b/SparkFunKiCadPanelizer/panelizer/panelizer.py @@ -579,7 +579,10 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None): if "material" in line or "Material" in line or "MATERIAL" in line: material = line if "weight" in line or "Weight" in line or "WEIGHT" in line or "oz" in line or "Oz" in line or "OZ" in line: - copperWeight = line + if copperWeight is None: + copperWeight = line + else: + copperWeight += "\n" + line for extra in possibleExtras: if extra in line: if orderingExtras is None: From 4fe52a1749ab520ab6f1f5e85f329822d32848ea Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 5 Mar 2024 08:45:03 +0000 Subject: [PATCH 2/3] v1.1.3 --- SparkFunKiCadPanelizer/resource/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SparkFunKiCadPanelizer/resource/_version.py b/SparkFunKiCadPanelizer/resource/_version.py index 5da0b9a..f74f503 100644 --- a/SparkFunKiCadPanelizer/resource/_version.py +++ b/SparkFunKiCadPanelizer/resource/_version.py @@ -1 +1 @@ -__version__ = "1.1.2" \ No newline at end of file +__version__ = "1.1.3" \ No newline at end of file From 8d9fefbbce4cafe70dc6c684332c25c2842f1b9b Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 5 Mar 2024 09:05:43 +0000 Subject: [PATCH 3/3] Add stackup to possibleExtras --- SparkFunKiCadPanelizer/panelizer/panelizer.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/SparkFunKiCadPanelizer/panelizer/panelizer.py b/SparkFunKiCadPanelizer/panelizer/panelizer.py index 1b2ac51..74c7ece 100644 --- a/SparkFunKiCadPanelizer/panelizer/panelizer.py +++ b/SparkFunKiCadPanelizer/panelizer/panelizer.py @@ -126,7 +126,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None): # 'Extra' ordering instructions # Any PCB_TEXT containing any of these keywords will be copied into the ordering instructions - possibleExtras = ['clean', 'Clean', 'CLEAN'] + possibleExtras = ['clean', 'Clean', 'CLEAN', 'stackup', 'Stackup', 'STACKUP'] # Permutations for Ordering Instructions possibleOrderingInstructions = [ @@ -428,7 +428,7 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None): sparkxLogoSeen = False solderMask = None silkscreen = None - numLayers = "Layers: {}".format(board.GetCopperLayerCount()) + copperLayers = "Layers: {}".format(board.GetCopperLayerCount()) # Should we trust the instructions or the tracks?! controlledImpedance = None finish = None thickness = None @@ -568,8 +568,8 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None): if "mask" in line or "Mask" in line or "MASK" in line: solderMask = line if "layers" in line or "Layers" in line or "LAYERS" in line: - if numLayers is None: # Should we trust the instructions or the tracks?! - numLayers = line + if copperLayers is None: # Should we trust the instructions or the tracks?! + copperLayers = line if "impedance" in line or "Impedance" in line or "IMPEDANCE" in line: controlledImpedance = line if "finish" in line or "Finish" in line or "FINISH" in line: @@ -1191,9 +1191,9 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None): if silkscreen is None: silkscreen = "Silkscreen: White (Default)" report += silkscreen + "\n" - if numLayers is None: - numLayers = "Layers: 2 (Default)" - report += numLayers + "\n" + if copperLayers is None: + copperLayers = "Layers: 2 (Default)" + report += copperLayers + "\n" if finish is None: finish = "Finish: HASL Lead-free (Default)" report += finish + "\n" @@ -1236,12 +1236,12 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None): 'Warning', wx.OK | wx.ICON_WARNING) silkscreen = "Silkscreen: White (Default)" oi.write(silkscreen + "\n") - if numLayers is None: + if copperLayers is None: if wx.GetApp() is not None and orderingInstructionsSeen: resp = wx.MessageBox("Number of layers not found!", 'Warning', wx.OK | wx.ICON_WARNING) - numLayers = "Layers: 2 (Default)" - oi.write(numLayers + "\n") + copperLayers = "Layers: 2 (Default)" + oi.write(copperLayers + "\n") if finish is None: if wx.GetApp() is not None and orderingInstructionsSeen: resp = wx.MessageBox("PCB finish not found!",