Bouni / kicad-jlcpcb-tools

Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.
MIT License
1.08k stars 102 forks source link

Panel support #480

Closed Bouni closed 3 weeks ago

Bouni commented 4 weeks ago

This should fix #440

Bouni commented 3 weeks ago

For kit kit are there multiple parts with the same refdes?

Exactly, KiKit takes a board an multiplies it so that it can be manufactured as a panel. That means on a 2x2 panel we have 4x C1 for example.

The problem is the line after the read_pos_parts:

https://github.com/Bouni/kicad-jlcpcb-tools/blob/main/fabrication.py#L262

board.FindFootprintByReference gives a random position for a given ref, that way we end up with jus one part in the POS / BOM file.

Here you can see the problem very good: https://github.com/Bouni/kicad-jlcpcb-tools/issues/440#issuecomment-2150909254

I did it the other way, iterating over all parts I get from the board and look that up in the store.

I hope that makes sense 😅

chmorgan commented 3 weeks ago

If you could put that info into the commit message imo that would help the next person follow the change.

This is what I had suspected the change was. That we were iterating over all parts, grouping and matching by refdes for the component info.

On Mon, Jun 10, 2024 at 2:55 AM bouni @.***> wrote:

For kit kit are there multiple parts with the same refdes?

Exactly, KiKit takes a board an multiplies it so that it can be manufactured as a panel. That means on a 2x2 panel we have 4x C1 for example.

The problem is the line after the read_pos_parts:

https://github.com/Bouni/kicad-jlcpcb-tools/blob/main/fabrication.py#L262

board.FindFootprintByReference gives a random position for a given ref, that way we end up with jus one part in the POS / BOM file.

I did it the other way, iterating over all parts I get from the board and look that up in the store.

I hope that makes sense 😅

— Reply to this email directly, view it on GitHub https://github.com/Bouni/kicad-jlcpcb-tools/pull/480#issuecomment-2157470920, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJH4AEUAX7567YDLELMDMDZGVEVNAVCNFSM6AAAAABI6VTKWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXGQ3TAOJSGA . You are receiving this because your review was requested.Message ID: @.***>