Reading it again, I certainly see the ambiguity — I meant to say “doesn’t work for me” in the sense of “it doesn’t do” (specifically, given the way my designs are done, that approach cannot produce a “correct” BOM).
The thing is, I may have the same part (say, some 0.1uF decoupling cap) at several places, with different footprints (e.g., the native C_0603_xxxxmetric and another one with a custom, more compact footprint, as per IPC-7351 for high-density of components). Then, there would be two different lines in the BOM, both having the same actual part number.
So, really, the only way (at least for me, given the way my libraries and projects are built/organized) that I can get a correct BOM is to do a group by Manufacturer Part Number (well, or by Digikey part number).
As far as I can tell, the bom_csv_group_by_value
plugin correctly groups by the combination (value,footprint) … Which: (1) does not work (is not useful) for me; and (2) is incorrect in the sense of not doing what it advertises — the plugin says that it groups by value, but it doesn’t: it actually groups by the combination (value,footprint).
It is indeed pretty obvious from the code (thanks @der.ule for pointing it out, and for the modified script!):
result = True
if self.getValue() != other.getValue():
result = False
#elif self.getPartName() != other.getPartName():
# result = False
#elif self.getFootprint() != other.getFootprint():
# result = False*
I should more precisely say: it looks like the script (without the commented lines, which I assume are the modifications by der.ule) actually groups by the combination (value,partnumber,footprint) … I guess part number is either a field that I don’t use, or it always has a value that is strictly a function of the field Value
, or the field footprint
?)
And yes, I have to admint: hate Python as much as one wants, a quick look at that script makes it very obvious what’s going on and how to modify it :‒)
Man, I feel like “the new guy” at the AA meetings (at least the way they show them in TV or the movies … it’s not like I know what those meetings look like in real-life, right? :‒) ) …
Me: Hi KiCAD forum… my name is Carlos, and I am pathologically Python-phobic …
All: HI CARLOS!!!
;‒)
Cheers!