INTI-CMNB / KiBot

KiCad automation utility
GNU Affero General Public License v3.0
574 stars 68 forks source link

[FEATURE] Standalone CSV PCB assembly statistics #730

Closed nguyen-v closed 2 days ago

nguyen-v commented 3 days ago

Is your feature request related to a problem? Please describe. In my assembly documents, I like to add a table with more details on the assembly:

Describe the solution you'd like image

Currently, there is no way to easily get this information, there is the hide_stats_info in BOM but doesn't have all of the information. Ideally the columns would be:

And the rows:

Would be ideal if the column names could be parametrized too.

Then, the CSV file could be included with the Include Table preflight

Describe alternatives you've considered Currently I fill in the table manually

set-soft commented 2 days ago

Hi @nguyen-v ! The above patch adds the necessary stuff to use report output to achieve it. The method is working here

nguyen-v commented 2 days ago

Hi @set-soft, it raises the error: Missing report template when trying to generate the output, I think the report file is missing

set-soft commented 2 days ago

True, the above commit contains the template

nguyen-v commented 2 days ago

Thanks, however the results given by the report and KiCost don't seem to coincide. It seems like it is not filtering the same components (in my case, the fiducial markers and net ties seem to be counted (they are set as exclude from BoM), but THT component like the XT60 are not counted)

nguyen-v commented 2 days ago

Thanks, however the results given by the report and KiCost don't seem to coincide. It seems like it is not filtering the same components (in my case, the fiducial markers and net ties seem to be counted (they are set as exclude from BoM), but THT component like the XT60 are not counted)

Sorry, it seems my THT component was set as exclude from position files, which meant that its attribute was 0x0005 (= 0x001 (THT) & 0x0004 (exclude from position files). Still, I think that Exclude from BoM (attribute 0x0008) should be checked when counting components, or have an option to enable ignoring components that are not in the BoM. Also, how hard would it be to also count the number of unique components for a 'Unique Components' column? This is useful for estimating assembly costs