From c87a37ea3c413c068b1f5e8ae4502771966260ed Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 29 May 2023 09:52:04 -0300 Subject: [PATCH] [Compress][Gerber][Fixed] Problems with inner layers - When using legacy protel extensions Fixes #446 --- CHANGELOG.md | 3 +++ kibot/layer.py | 4 +++- tests/yaml_samples/gerber_inner_protel_1.kibot.yaml | 9 +++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fbed851..3480e1bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Copy files: - PCB not loaded if the only action was to copy the 3D models - Problems for STEP models when copying models +- Gerber: + - Problems trying to compress gerbers for a board with inner layers when + using legacy file extensions (#446) ## [1.6.2] - 2023-04-24 ### Added diff --git a/kibot/layer.py b/kibot/layer.py index 5d4e5db9..f123af7b 100644 --- a/kibot/layer.py +++ b/kibot/layer.py @@ -22,6 +22,7 @@ LAYER_ORDER = ['F.Cu', 'F.Mask', 'F.SilkS', 'F.Paste', 'F.Adhes', 'F.CrtYd', 'F. 'In20.Cu', 'In21.Cu', 'In22.Cu', 'In23.Cu', 'In24.Cu', 'In25.Cu', 'In26.Cu', 'In27.Cu', 'In28.Cu', 'In29.Cu', 'In30.Cu', 'B.Cu', 'B.Mask', 'B.SilkS', 'B.Paste', 'B.Adhes', 'B.CrtYd', 'B.Fab'] LAYER_PRIORITY = {} +DEFAULT_INNER_LAYER_NAMES = set() def create_print_priority(board): @@ -305,7 +306,7 @@ class Layer(Optionable): # 1) Internal list if self.layer in Layer.DEFAULT_LAYER_NAMES: self._id = Layer.DEFAULT_LAYER_NAMES[self.layer] - self._is_inner = False + self._is_inner = self.layer in DEFAULT_INNER_LAYER_NAMES else: id = Layer._pcb_layers.get(self.layer) if id is not None: @@ -347,6 +348,7 @@ class Layer(Optionable): # Add all the Inner layers for i in range(1, 30): name = 'In'+str(i)+'.Cu' + DEFAULT_INNER_LAYER_NAMES.add(name) Layer.DEFAULT_LAYER_NAMES[name] = pcbnew.In1_Cu+i-1 Layer.DEFAULT_LAYER_DESC[name] = 'Inner layer '+str(i) if GS.ki6: diff --git a/tests/yaml_samples/gerber_inner_protel_1.kibot.yaml b/tests/yaml_samples/gerber_inner_protel_1.kibot.yaml index 7e6392dc..6a85f9fa 100644 --- a/tests/yaml_samples/gerber_inner_protel_1.kibot.yaml +++ b/tests/yaml_samples/gerber_inner_protel_1.kibot.yaml @@ -30,3 +30,12 @@ outputs: output: '%f_%i.%x' layers: all + + - name: result + comment: Test tarball compress + type: compress + options: + format: TAR + compression: deflated + files: + - from_output: gerbers