From 4cbb7a3405ce9bdc70e72a190007009a73bad290 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 13 Sep 2022 11:32:27 -0300 Subject: [PATCH] [Fixed] 2D PCB processing didn't show in 3D targets - I.e. solder paste not removed in the 3D render. Related to #270 --- CHANGELOG.md | 2 ++ kibot/out_base_3d.py | 4 ++-- tests/yaml_samples/pcb_variant_1.kibot.yaml | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e15beb1c..c0724df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Problems to compress netlists. (#287) +- 2D PCB processing didn't show in 3D targets (i.e. solder paste not removed in + the 3D render). (See #270) ### Changed - Diff: when comparing a file now the links says Current/FILE instead of None diff --git a/kibot/out_base_3d.py b/kibot/out_base_3d.py index 8e2b44ed..e40b4a8e 100644 --- a/kibot/out_base_3d.py +++ b/kibot/out_base_3d.py @@ -142,10 +142,10 @@ class Base3DOptions(VariantOptions): self.undo_3d_models_rename(GS.board) return ret return GS.pcb_file - self.filter_pcb_components(GS.board, do_3D=True, do_2D=False) + self.filter_pcb_components(GS.board, do_3D=True, do_2D=True) self.download_models() fname = self.save_tmp_board() - self.unfilter_pcb_components(GS.board, do_3D=True, do_2D=False) + self.unfilter_pcb_components(GS.board, do_3D=True, do_2D=True) return fname def get_targets(self, out_dir): diff --git a/tests/yaml_samples/pcb_variant_1.kibot.yaml b/tests/yaml_samples/pcb_variant_1.kibot.yaml index fae1c013..d6fcda87 100644 --- a/tests/yaml_samples/pcb_variant_1.kibot.yaml +++ b/tests/yaml_samples/pcb_variant_1.kibot.yaml @@ -7,6 +7,8 @@ global: # remove_adhesive_for_dnp: false # cross_footprints_for_dnp: false hide_excluded: true + pcb_finish: ENIG + solder_mask_color: blue variants: - name: 'production' @@ -48,6 +50,14 @@ outputs: variant: test title: 'Hello %V' + - name: '3d_default' + comment: "3D view w/variant" + type: render_3d + options: + variant: default + ray_tracing: true + #show_solderpaste: false + - name: 'diff_pcb' comment: "PCB difference with variant" type: diff