From cd447710aedd213ec206665bbdb8d8e600965606 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 16 Nov 2023 12:35:17 -0300 Subject: [PATCH] [Templates][JLCPCB] Added DNF filter for the position Used to exclude KiKit panel components See #516 --- CHANGELOG.md | 2 ++ docs/source/configuration/imports.rst | 2 ++ kibot/resources/config_templates/JLCPCB.kibot.yaml | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5adedd05..6c306a09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Internal templates: - 3DRender_top, 3DRender_top_straight, 3DRender_bottom and 3DRender_bottom_straight: to generate simple and quick 3D renders. + - _KIBOT_POS_DNF_FILTER option to JLCPCB. It now excludes components added + by KiKit to create panels and can be customized. - Filters: - New `_rot_footprint_jlcpcb` internal filter to fix the JLCPCB bottom rotations. diff --git a/docs/source/configuration/imports.rst b/docs/source/configuration/imports.rst index 1af64e41..ac290a60 100644 --- a/docs/source/configuration/imports.rst +++ b/docs/source/configuration/imports.rst @@ -329,6 +329,8 @@ The JLCPCB case is a little bit more complex and also supports: - **_KIBOT_POS_ENABLED**: Generate position files (default: true) - **_KIBOT_BOM_ENABLED**: Generate BoM (default: true) - **_KIBOT_POS_ONLY_SMD**: Use only SMD components for the position files (default: true) +- **_KIBOT_POS_DNF_FILTER**: Filter used to exclude components from the position file (default: _remove_extra). It currently + excludes components used by KiKit to create panels. MacroFab_XYRS: diff --git a/kibot/resources/config_templates/JLCPCB.kibot.yaml b/kibot/resources/config_templates/JLCPCB.kibot.yaml index 38a5cbff..aedb1112 100644 --- a/kibot/resources/config_templates/JLCPCB.kibot.yaml +++ b/kibot/resources/config_templates/JLCPCB.kibot.yaml @@ -12,6 +12,15 @@ filters: - column: _field_lcsc_part regex: '^C\d+' + # Used to remove extra stuff added by KiKit for the panel + # If you need to keep them just specify a different filter matching only the thing you want + - name: _remove_extra + comment: 'Remove KiKit auxiliary stuff' + type: generic + exclude_any: + - column: References + regex: "^KiKit_" + groups: - name: _JLCPCB_fab@_KIBOT_IMPORT_ID@ outputs: @@ -73,6 +82,7 @@ outputs: run_by_default: @_KIBOT_POS_ENABLED@ options: pre_transform: @_KIBOT_POS_PRE_TRANSFORM@ + dnf_filter: @_KIBOT_POS_DNF_FILTER@ output: '%f_cpl_jlc.%x' format: CSV units: millimeters @@ -141,6 +151,7 @@ definitions: _KIBOT_MANF_DIR: '@_KIBOT_IMPORT_DIR@' _KIBOT_MANF_DIR_COMP: '@_KIBOT_IMPORT_DIR@' _KIBOT_POS_PRE_TRANSFORM: _rot_footprint_jlcpcb + _KIBOT_POS_DNF_FILTER: _remove_extra _KIBOT_POS_ENABLED: true _KIBOT_BOM_ENABLED: true _KIBOT_GERBER_LAYERS: |