Skip to content

Commit

Permalink
[Globals][Added] Option to always report "paste pads"
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Mar 5, 2024
1 parent d661880 commit 27b3824
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docs/source/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~
Expand All @@ -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
--------------------
Expand Down
1 change: 1 addition & 0 deletions docs/source/configuration/sup_globals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
For KiCad 5 and 6 use the design rules settings, stored in the project.
- ``allow_microvias`` :index:`: <pair: global options; allow_microvias>` [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:`: <pair: global options; always_warn_about_paste_pads>` [boolean=false] Used to detect the use of pads just for paste.
- ``cache_3d_resistors`` :index:`: <pair: global options; cache_3d_resistors>` [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:`: <pair: global options; castellated_pads>` [boolean=false] Has the PCB castellated pads?
Expand Down
2 changes: 2 additions & 0 deletions kibot/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ def __init__(self):
""" 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`.
Expand Down
1 change: 1 addition & 0 deletions kibot/gs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kibot/out_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def remove_paste_and_glue(self, board, comps_hash):
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)
Expand Down
3 changes: 3 additions & 0 deletions tests/yaml_samples/wrong_paste.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
kibot:
version: 1

globals:
always_warn_about_paste_pads: true

variants:
- name: 'default'
comment: 'Default variant'
Expand Down

0 comments on commit 27b3824

Please sign in to comment.