Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple BOM export dialog to schematic/board editors #499

Merged
merged 6 commits into from Aug 22, 2019

Conversation

@ubruhin
Copy link
Member

ubruhin commented Aug 13, 2019

Although the library does not yet really support part handling (with MPN etc.), it's still possible (and useful) to generate simple BOMs just by iterating over all devices on a board. And if needed, MPNs can be added to the components (in schematics) by using attributes.

grafik

The CSV output then looks like that:

Quantity;Designators;Value;Device;Package;MPN
4;C1, C2, C3, C4;LGW2E471MELZ40 470μF/250V;Elko 22/10mm;Elko 22/10mm;LGW2E471MELZ40
2;C10, C11;MKS4F044706B00KSSD 4.7μF/250V;MKS4F044706B00KSSD;Capacitor 11x21x31.5 PCM 27.5 Red;MKS4F044706B00KSSD
1;C12;2.2nF;C-0603;C-0603;
3;C13, C14, C22;1μF;C-0603;C-0603;
1;C15;2.2μF 100V;C-1210;C-1210;
1;C16;56pF;C-0603;C-0603;
5;C17, C18, C7, C8, C9;220nF;C-0603;C-0603;
6;C19, C23, C28, C31, C32, C33;100nF;C-0603;C-0603;
1;C20;10μF;C-0805;C-0805;
2;C21, C5;10nF;C-0603;C-0603;
2;C24, C25;47nF 250V;C-1812;C-1812;
1;C26;22μF 25V;C-1210;C-1210;
1;C27;3.3nF;C-0603;C-0603;
1;C29;dnm;C-0805;C-0805;
2;C30, C6;2.2μF 25V;C-0805;C-0805;
1;D1;MBR40250G;MBR40250G;TO220-2;MBR40250G
@ubruhin ubruhin added the enhancement label Aug 13, 2019
@ubruhin ubruhin added this to the 0.1.3 milestone Aug 13, 2019
@ubruhin ubruhin self-assigned this Aug 13, 2019
@dbrgn

This comment has been minimized.

Copy link
Member

dbrgn commented Aug 14, 2019

Cool!

Does this list all attributes or only "MPN"? I often add a "Digikey" key with the order number to the attributes, would be nice if such fields could be included in the BOM too.

@ubruhin

This comment has been minimized.

Copy link
Member Author

ubruhin commented Aug 14, 2019

Does this list all attributes or only "MPN"?

Currently only "MPN".

I often add a "Digikey" key with the order number to the attributes, would be nice if such fields could be included in the BOM too.

Good point, I'll check if I can make the columns configurable.

@EdizonTN

This comment has been minimized.

Copy link

EdizonTN commented Aug 19, 2019

Hi,
don't forgot for implement/solve technology parts, which does not needs listed in BOM.
For example, logo, fiducial marks, ESD mark, Sheet Frames.....

@dbrgn

This comment has been minimized.

Copy link
Member

dbrgn commented Aug 19, 2019

Maybe something like this in the symbol property? (Ugly Mockup)

image

@EdizonTN

This comment has been minimized.

Copy link

EdizonTN commented Aug 19, 2019

Maybe something like this in the symbol property? (Ugly Mockup)

Yeah! This is enough for simple BOM.

For future we need little bit more complicated BOM setup and field mapping (MPN, Datasheet, Some user attributes,.. ) depends on PCB variant, or assembly variant (one PCB/schema with more combination of assembled/not assembled devices ..... maybe implemented as new feature ;-) )...
Only for inspiration: https://www.youtube.com/watch?v=c3Worv_hLi8

@ubruhin ubruhin force-pushed the bom-generator branch from d898acc to 3a56e23 Aug 20, 2019
@ubruhin

This comment has been minimized.

Copy link
Member Author

ubruhin commented Aug 20, 2019

Good point, I'll check if I can make the columns configurable.

Done - instead of hardcoding the "MPN" column, arbitrary attributes can now be added as columns:

grafik

In addition, I added commands to the CLI to export BOMs so this can now be automated too.

don't forgot for implement/solve technology parts, which does not needs listed in BOM.
For example, logo, fiducial marks, ESD mark, Sheet Frames.....

Components which are marked as "Schematic only" in the library aren't included in the BOM since those can't be placed on a board anyway. This should already catch most of the no-BOM components. Everything more than this would introduce a file format change, and I think it makes more sense to wait until we have a clear concept for handling MPNs, datasheets, assembly variants etc.

Of course this is only a very simple BOM export, but since this implementation doesn't affect the file format, it's a good first step until we implement a much more feature-rich BOM handling 😉

@ubruhin ubruhin force-pushed the bom-generator branch from 3a56e23 to b5fb822 Aug 20, 2019
@ubruhin ubruhin force-pushed the bom-generator branch from b5fb822 to 6b180bb Aug 22, 2019
@ubruhin ubruhin merged commit 4df88fb into master Aug 22, 2019
11 checks passed
11 checks passed
LibrePCB Build #20190822.3 succeeded
Details
LibrePCB (Doxygen) Doxygen succeeded
Details
LibrePCB (Linux Ubuntu_1404_GCC) Linux Ubuntu_1404_GCC succeeded
Details
LibrePCB (Linux Ubuntu_1604_GCC) Linux Ubuntu_1604_GCC succeeded
Details
LibrePCB (Linux Ubuntu_1604_Qt_5_12_3_GCC) Linux Ubuntu_1604_Qt_5_12_3_GCC succeeded
Details
LibrePCB (Linux Ubuntu_1804_Clang) Linux Ubuntu_1804_Clang succeeded
Details
LibrePCB (Linux Ubuntu_1904_GCC9) Linux Ubuntu_1904_GCC9 succeeded
Details
LibrePCB (Stylecheck) Stylecheck succeeded
Details
LibrePCB (macOS) macOS succeeded
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@ubruhin ubruhin deleted the bom-generator branch Aug 22, 2019
ubruhin added a commit that referenced this pull request Nov 17, 2019
Add simple BOM export dialog to schematic/board editors
(cherry picked from commit 4df88fb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.