From d4047b78c91625cd9822e91ae147c5c122fe9f6d Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 19 Dec 2022 11:22:00 -0300 Subject: [PATCH] [iBoM][Added] `hide_excluded` to hide excluded *.Fab drawings. --- CHANGELOG.md | 5 ++++- README.md | 2 ++ docs/samples/generic_plot.kibot.yaml | 3 +++ kibot/out_ibom.py | 5 ++++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dace7ee4..8909973b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.5.2] - Unreleased -### Fixed +### Added - New output: - `vrml` export the 3D model in Virtual Reality Modeling Language (#349) +- iBoM: + - `hide_excluded` to hide excluded *.Fab drawings. +### Fixed - PCB_Print: - Images not showing in custom frames. (#352) diff --git a/README.md b/README.md index b5ac1a40..99e5ab30 100644 --- a/README.md +++ b/README.md @@ -2199,6 +2199,8 @@ Notes: Leave it blank for most uses, data will be extracted from the PCB. - `group_fields`: [string=''] Comma separated list of fields that components will be grouped by. Value and Footprint are used when nothing is specified. + - `hide_excluded`: [boolean=false] Hide components in the Fab layer that are marked as excluded by a variant. + Affected by global options. - `hide_pads`: [boolean=false] Hide footprint pads by default. - `hide_silkscreen`: [boolean=false] Hide silkscreen by default. - `highlight_pin1`: [boolean=false] Highlight pin1 by default. diff --git a/docs/samples/generic_plot.kibot.yaml b/docs/samples/generic_plot.kibot.yaml index 6a5d748f..f4d9b833 100644 --- a/docs/samples/generic_plot.kibot.yaml +++ b/docs/samples/generic_plot.kibot.yaml @@ -933,6 +933,9 @@ outputs: # [string=''] Comma separated list of fields that components will be grouped by. # Value and Footprint are used when nothing is specified group_fields: '' + # [boolean=false] Hide components in the Fab layer that are marked as excluded by a variant. + # Affected by global options + hide_excluded: false # [boolean=false] Hide footprint pads by default hide_pads: false # [boolean=false] Hide silkscreen by default diff --git a/kibot/out_ibom.py b/kibot/out_ibom.py index d4191e81..1bde55bb 100644 --- a/kibot/out_ibom.py +++ b/kibot/out_ibom.py @@ -117,6 +117,9 @@ class IBoMOptions(VariantOptions): """ Name of the extra field that indicates do not populate status. Components with this field not empty will be blacklisted. IBoM option, avoid using in conjunction with KiBot variants/filters """ + self.hide_excluded = False + """ Hide components in the Fab layer that are marked as excluded by a variant. + Affected by global options """ super().__init__() self.add_to_doc('variant', WARNING_MIX) self.add_to_doc('dnf_filter', WARNING_MIX) @@ -204,7 +207,7 @@ class IBoMOptions(VariantOptions): self.blacklist += to_remove # Convert attributes into options for k, v in self.get_attrs_gen(): - if not v or k in ['output', 'variant', 'dnf_filter', 'pre_transform']: + if not v or k in ['output', 'variant', 'dnf_filter', 'pre_transform', 'hide_excluded']: continue if k == 'offset_back_rotation' and version < (2, 5, 0, 2): continue