From 27b3824cefd0b3e60a4f7475d4c12298790e8add Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 5 Mar 2024 10:47:43 -0300 Subject: [PATCH] [Globals][Added] Option to always report "paste pads" --- docs/source/Changelog.rst | 10 ++++++++++ docs/source/configuration/sup_globals.rst | 1 + kibot/globals.py | 2 ++ kibot/gs.py | 1 + kibot/out_base.py | 2 +- tests/yaml_samples/wrong_paste.kibot.yaml | 3 +++ 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/source/Changelog.rst b/docs/source/Changelog.rst index 883b3e0c..fa1da468 100644 --- a/docs/source/Changelog.rst +++ b/docs/source/Changelog.rst @@ -20,6 +20,10 @@ Changed ~~~~~~~ - KiRi: continue even on corrupted schematics (#583) +- Variants: avoid W045 on nameless pads. Assuming they are on purpose + and not real pads. (See #584) +- BoardView: Skip footprints with no pads (not just REF**) + (whitequark/kicad-boardview#14) Fixed ~~~~~ @@ -28,6 +32,12 @@ Fixed schematic. (#578) - Filters: \_none filter not always honored (i.e. exclude in BoM) (#580) +- PCB Parity: components excluded from the board reported anyways + (#585) +- BoardView: X axis mirroring issues (whitequark/kicad-boardview#11) +- Present: problems when using gerbers already generated +- Diff: problems when using things like “origin/main” and add_link_id + (#589) [1.6.4] - 2024-02-02 -------------------- diff --git a/docs/source/configuration/sup_globals.rst b/docs/source/configuration/sup_globals.rst index e16a1475..b1d47219 100644 --- a/docs/source/configuration/sup_globals.rst +++ b/docs/source/configuration/sup_globals.rst @@ -23,6 +23,7 @@ For KiCad 5 and 6 use the design rules settings, stored in the project. - ``allow_microvias`` :index:`: ` [boolean=true] Allow the use of micro vias. This value is only used for KiCad 7+. For KiCad 5 and 6 use the design rules settings, stored in the project. + - ``always_warn_about_paste_pads`` :index:`: ` [boolean=false] Used to detect the use of pads just for paste. - ``cache_3d_resistors`` :index:`: ` [boolean=false] Use a cache for the generated 3D models of colored resistors. Will save time, but you could need to remove the cache if you need to regenerate them. - ``castellated_pads`` :index:`: ` [boolean=false] Has the PCB castellated pads? diff --git a/kibot/globals.py b/kibot/globals.py index 1f910ca8..26295fe2 100644 --- a/kibot/globals.py +++ b/kibot/globals.py @@ -235,6 +235,8 @@ class Globals(FiltersOptions): """ When applying filters and variants remove the adhesive (glue) for components that won't be included """ self.remove_solder_mask_for_dnp = False """ When applying filters and variants remove the solder mask apertures for components that won't be included """ + self.always_warn_about_paste_pads = False + """ Used to detect the use of pads just for paste """ self.restore_project = False """ Restore the KiCad project after execution. Note that this option will undo operations like `set_text_variables`. diff --git a/kibot/gs.py b/kibot/gs.py index 181c69da..945b08d3 100644 --- a/kibot/gs.py +++ b/kibot/gs.py @@ -133,6 +133,7 @@ class GS(object): def_global_output = '%f-%i%I%v.%x' # The class that controls the global options class_for_global_opts = None + global_always_warn_about_paste_pads = None global_cache_3d_resistors = None global_castellated_pads = None global_colored_tht_resistors = None diff --git a/kibot/out_base.py b/kibot/out_base.py index 56f20950..d674e635 100644 --- a/kibot/out_base.py +++ b/kibot/out_base.py @@ -433,7 +433,7 @@ class VariantOptions(BaseOptions): pad_layers.addLayer(fmask if is_front else bmask) pad_name = p.GetName() # Some footprints has solder paste "pads" they don't have a name - if pad_name: + if pad_name or GS.global_always_warn_about_paste_pads: logger.warning(f"{W_WRONGPASTE}Pad with solder paste, but no copper or solder mask aperture " f" in {ref} ({pad_name})") p.SetLayerSet(pad_layers) diff --git a/tests/yaml_samples/wrong_paste.kibot.yaml b/tests/yaml_samples/wrong_paste.kibot.yaml index d93e8abe..ac83d3f9 100644 --- a/tests/yaml_samples/wrong_paste.kibot.yaml +++ b/tests/yaml_samples/wrong_paste.kibot.yaml @@ -2,6 +2,9 @@ kibot: version: 1 +globals: + always_warn_about_paste_pads: true + variants: - name: 'default' comment: 'Default variant'