Skip to content

[HOW] do i convice the BOM output to disable the filtering of the mounting equipment #836

@harm363

Description

@harm363

What do you want to achieve?
I have lots of projects that use mountinghole symbols to add metal spacers to the PCB. But those spacers do not end up in the BoM.
At first it was because of the _Mechanical filter. but now it is weird.
I have checked that de DNP and exclude from BoM attributes are unchecked.

the symbol name is:

Image

i assume i have disabled the _Mechanical filter by defining my own filter like this:

filters:
  - name: "remove_mousebites"
    comment: "removes mousebites from files"
    type: generic
    exclude_any:
      - column: 'references'
        regex: 'KiKit'
      - column: 'references'
        regex: 'tp'
      - column: 'references'
        regex: 'pinhole'
      - column: 'references'
        regex: 'arrow'
        
outputs:
  - name: bom
    type: bom
    #dir: 'fabrication/'
    options:
      format: CSV
      output: 'bom.csv'
      csv:
        #hide_header: true
        hide_pcb_info: true
        hide_stats_info: true
      columns: 
        - field: 'Value'
        - field: 'References'
        - field: 'Footprint'
        - field: 'Partnumber' 
        - field: 'Quantity Per PCB'
        - field: 'Description'
      #normalize_value: true
      #group_fields: ['Value','References','Footprint']
      #exclude_marked_in_sch: true
      exclude_marked_in_pcb: true
      exclude_filter: "remove_mousebites"

the remove_mousebites filter was needed in previous version because all of the kikit mousebites ended up in the BOM (weird but workable). but somehow the mountinghole symbols still get filtered out. I suspect the default filters are disabled because powersymbols are included in my BoM (not all though, an different project has GND symbols in the BoM, this project does not), again weird but workable for me.

running verbose output gave me:

- '' (bom) [bom]
DEBUG:Output destination: /tmp/kibot_build/fabrication (kibot - kiplot.py:557)
DEBUG:1 (kibot - v5_sch.py:1752)
DEBUG:1 (kibot - v5_sch.py:1752)
DEBUG:Reading KiCad config from `/root/.config/kicad/9.0/kicad_common.json` (kibot - config.py:458)
DEBUG:Using KICAD9_SYMBOL_DIR="/usr/share/kicad/symbols" (guessed) (kibot - config.py:433)
DEBUG:Using KICAD9_TEMPLATE_DIR="/usr/share/kicad/template" (guessed) (kibot - config.py:433)
DEBUG:Using KICAD_USER_TEMPLATE_DIR="/root/.local/share/kicad/9.0/template" (guessed) (kibot - config.py:433)
DEBUG:Using KICAD9_FOOTPRINT_DIR="/usr/share/kicad/footprints" (guessed) (kibot - config.py:433)
DEBUG:Using KICAD9_3RD_PARTY="/root/.local/share/kicad/9.0/3rdparty" (guessed) (kibot - config.py:433)
DEBUG:Exporting KIPRJMOD="/tmp/kibot_build/source/source" (kibot - config.py:479)
DEBUG:Also exporting KICAD6_SYMBOL_DIR="/usr/share/kicad/symbols" (kibot - config.py:487)
DEBUG:Also exporting KICAD7_SYMBOL_DIR="/usr/share/kicad/symbols" (kibot - config.py:487)
DEBUG:Also exporting KICAD8_SYMBOL_DIR="/usr/share/kicad/symbols" (kibot - config.py:487)
DEBUG:Also exporting KICAD6_TEMPLATE_DIR="/usr/share/kicad/template" (kibot - config.py:487)
DEBUG:Also exporting KICAD7_TEMPLATE_DIR="/usr/share/kicad/template" (kibot - config.py:487)
DEBUG:Also exporting KICAD8_TEMPLATE_DIR="/usr/share/kicad/template" (kibot - config.py:487)
DEBUG:Also exporting KICAD6_FOOTPRINT_DIR="/usr/share/kicad/footprints" (kibot - config.py:487)
DEBUG:Also exporting KICAD7_FOOTPRINT_DIR="/usr/share/kicad/footprints" (kibot - config.py:487)
DEBUG:Also exporting KICAD8_FOOTPRINT_DIR="/usr/share/kicad/footprints" (kibot - config.py:487)
DEBUG:Also exporting KICAD6_3RD_PARTY="/root/.local/share/kicad/9.0/3rdparty" (kibot - config.py:487)
DEBUG:Also exporting KICAD7_3RD_PARTY="/root/.local/share/kicad/9.0/3rdparty" (kibot - config.py:487)
DEBUG:Also exporting KICAD8_3RD_PARTY="/root/.local/share/kicad/9.0/3rdparty" (kibot - config.py:487)
DEBUG:No 3D aliases (/root/.config/kicad/9.0/3d/3Dresolver.cfg) (kibot - config.py:627)
DEBUG:Adding exclude_from_bom field to J5 () (kibot - kiplot.py:388)
DEBUG:Adding Config field to H3 (+DEFAULT,+PMT,+SIPM) (kibot - kiplot.py:388)
DEBUG:Adding Config field to H2 (+DEFAULT,+PMT,+SIPM) (kibot - kiplot.py:388)
DEBUG:Adding Config field to H1 (+DEFAULT,+PMT,+SIPM) (kibot - kiplot.py:388)
DEBUG:Filters reset (kibot - fil_base.py:196)
DEBUG:Transfer "Exclude from bill of materials" from schematic (kibot - out_bom.py:1016)
DEBUG:Transfer "Exclude from bill of materials" from PCB (kibot - out_bom.py:1022)
DEBUG:Applying filter `remove_mousebites` to exclude (kibot - fil_base.py:187)
DEBUG:Applying filter `_kibom_dnf_config` to fitted (kibot - fil_base.py:214)
DEBUG:Applying filter `_kibom_dnc_config` to fixed (kibot - fil_base.py:224)
DEBUG:Applying KiBoM style variants `default` (kibot - var_kibom.py:91)
DEBUG:Creating internal filter: {'type': 'expand_text_vars', 'comment': 'Internal default text variables expander', 'name': '_expand_text_vars'} (kibot - fil_base.py:333)
DEBUG:Applying transform filter `_expand_text_vars` (kibot - fil_base.py:173)
DEBUG:Decimal point `.` (kibot - units.py:198)
WARNING:(W020) Malformed value: `0.1uF, 2kV` (no match in C40) (kibot - units.py:239)
WARNING:(W133) Avoid adding extra information in the component value, use separated fields (22uF, 10V) (kibot - units.py:175)
DEBUG:Using auxiliary origin: x=0 y=0 (kibot - bom.py:498)
DEBUG:Saving BOM File: /tmp/kibot_build/fabrication/bom.csv (kibot - bom.py:588)
DEBUG:CSV Output -> /tmp/kibot_build/fabrication/bom.csv (kibot - bom_writer.py:52)

I thought that maybe a leftover config field in the affected components was the problem so I removed them but kibot is placing them back?

DEBUG:Adding Config field to H3 (+DEFAULT,+PMT,+SIPM) (kibot - kiplot.py:388)
DEBUG:Adding Config field to H2 (+DEFAULT,+PMT,+SIPM) (kibot - kiplot.py:388)
DEBUG:Adding Config field to H1 (+DEFAULT,+PMT,+SIPM) (kibot - kiplot.py:388)

So why are my symbols still removed from the BoM?
Avoiding mounting* symbols is not an option since we have a lot of old projects that use them and we want to control what ends up in the BoM from the schematic.

How does the BoM generation workt anyway? in the kicad 8 projects the BoM seemed to be generated from the board files (judging by all the panel specific footprints that were included). but now it is build from the schematic (which i prefer so you won't hear me complain). knowing and understanding how it works would help me avoid conflicts.

Environment (please complete the following information):
Where are you running KiBot:
I run KiBot in the latest kibot docker release.

I hope I have provided enough informtation for you to see what I did wrong, if not don't hesitate to ask.

Metadata

Metadata

Assignees

Labels

needs more infoFurther information is requestedquestionThis is just a question, not a problem

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions