SchrodingersGat / KiBoM

Configurable BoM generation tool for KiCad EDA (http://kicad.org/)
MIT License
352 stars 95 forks source link

No grouping side effect #132

Open set-soft opened 3 years ago

set-soft commented 3 years ago

I'm not sure about the following behavior:

https://github.com/SchrodingersGat/KiBoM/blob/06a14866d8166cfa71ae8ac1a48bda0c160fb380/kibom/component.py#L120-L121

This disables the grouping mechanism, this is OK. But the side effect is that multi-part components will be repeated (as many times as sub-parts). I this the code should be:

if len(self.prefs.groups) == 0: 
    return self.getRef() == other.getRef()

So we don't get the same ref multiple times.