Grouped-by-value BOM generators don't sort references correctly within a group
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| KiCad |
Low
|
Jeff Young |
Bug Description
The BOM files generated by the python scripts does not sort the references correctly.
For example, the following references:
R1, R2, R3, R4, R10, R11, R12, R20
will be sorted as:
R1, R10, R11, R12, R2, R20, R3, R4
"bom_csv_
Changed in kicad: | |
status: | New → Fix Committed |
Aleksandr Sh (dsa-t) wrote : | #3 |
Here is what I found (I have custom field "Link" on some components):
bom_csv_
bom_csv_
Example output:
"Item",
"","","C1","10V 100uF",
"","","
"","","
"","","
"","","
"","","
"","","
"","","
"","","
"","","
"","","C11","10uF 25V","Device:
"","","C12","10uF 25V","Device:
"","","C13","10uF 25V","Device:
"","","C14","10uF 25V","Device:
bom_csv_
Example output:
"Ref","
"C1, ","1","10V 100uF",
"C3, C7, C8, C6, C5, C4, C2, ","7","
"C10, C9, ","2","
"C11, C12, C13, C14, ","4","10uF 25V","C"
"C15, C24, ","2","
"C19, C18, ","2","
"C21, C20, ","2","10uF 10V","C"
"C22, ","1","
"C23, ","1","
"C25, C26, C16, C17, ","4","
bom_html_
bom_html_
bom_sorted_
bom_with_
bom2csv.xsl does not sort, but outputs custom fields
bom2grouped_csv.xsl outputs custom fields but sorts like this:
D1 D12 D13 D2 D23 D24 D34 D35 D45 D46 D47 D48 D49 D50 D62 D63 D64 D65 D66 D67 D79 D80 D81 D86 D87 D88
And the header format is incorrect:
Reference, Quantity, Value, Footprint, Datasheet, Link
(The leading whitespaces are unneccessary)
Changed in kicad: | |
status: | Fix Committed → Confirmed |
Jeff Young (jeyjey) wrote : | #4 |
@Alexsandr, thanks for the summary.
The exact format requirements (such as which custom fields are output) is going to vary by user. This is why we moved the BOM generators to Python and XSLT. The ones that ship with the product are examples more than anything else.
Things like whether or not custom fields are output (or /which/ custom fields are output) are going to vary by user (which is why the BOM generators are in Python and XSLT). Think of the ones that are shipped more as examples.
That being said, the two grouped_by_value scripts would certainly be better examples if they sorted the references within the group correctly.
summary: |
- BOM does not sorting correctly + Grouped-by-value BOM generators don't sort references correctly within a + group |
tags: | added: starter |
Nick Østergaard (nickoe) wrote : | #5 |
@Alexander, what version are you on?
Aleksandr Sh (dsa-t) wrote : | #6 |
Application: kicad
Version: (5.0.0-
Libraries:
wxWidgets 3.0.3
libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.3 (wchar_t,wx containers,
Boost: 1.60.0
Curl: 7.54.1
Compiler: GCC 7.1.0 with C++ ABI 1011
Build settings:
USE_
USE_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_SPICE=ON
Aleksandr Sh (dsa-t) wrote : | #7 |
Command line:
"C:\Program Files\Saxonica\
Aleksandr Sh (dsa-t) wrote : | #8 |
xsltproc -o "%O.csv" "-path-" "%I"
Gives the same results
Changed in kicad: | |
importance: | Undecided → Low |
Martin Thomas (mtlaunchpad) wrote : | #9 |
I had written a patch to sort the references
Martin Thomas (mtlaunchpad) wrote : | #10 |
I forgot to mention that we adapt the BOM creation with PCB new. It fits better to our manufacturer needs.
Maybe you consider it as handy and integrate it to the master branch. I created a git patch and also put the according files into the zip file.
The BOM gui form need an additional radio button or something else to chose between the both lists. Currently I coded it hard on list 1 (see line 135 in build_BOM_
So you can create a list as usal but sorted references or almost the same list but distinguished by the side, were the part is placed.
Wayne Stambaugh (stambaughw) wrote : | #11 |
@Martin, the zip file you provided has a bunch of patches. We only need the one that fixes you problem. I cannot tell which patch is correct and I don't have time to sift through all of them. Please attach only the patches required to resolve the issue.
Martin Thomas (mtlaunchpad) wrote : | #12 |
OK I changed the patch accordingly.
Martin Thomas (mtlaunchpad) wrote : | #13 |
I filed a new bug as this patch does not fit here.
https:/
description: | updated |
information type: | Public → Public Security |
information type: | Public Security → Private Security |
information type: | Private Security → Public Security |
information type: | Public Security → Public |
KiCad Janitor (kicad-janitor) wrote : | #14 |
Fixed in revision a96ebe8facb243f
https:/
Changed in kicad: | |
status: | Confirmed → Fix Committed |
assignee: | nobody → Jeff Young (jeyjey) |
Please either submit a patch or create a merge request on launchpad
against your branch so I can see the changes without having to merge to
my local repo and then figure out what you've changed. Thanks.
On 6/12/2015 9:22 PM, Launchpad Bug Tracker wrote:
> ** Branch linked: lp:~ricardocrudo/kicad/fix1464805
>