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

Panel support #480

Merged
merged 3 commits into from
Jun 13, 2024
Merged

Panel support #480

merged 3 commits into from
Jun 13, 2024

Conversation

Bouni
Copy link
Owner

@Bouni Bouni commented Jun 7, 2024

This should fix #440

@Bouni Bouni added the enhancement New feature or request label Jun 7, 2024
@Bouni Bouni requested a review from chmorgan June 7, 2024 13:28
Copy link
Collaborator

@chmorgan chmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only comment I'd make is that the commit subject and body for the first commit doesn't help with understanding the change. For kit kit are there multiple parts with the same refdes? In the fixed case clearly it's iterating over all footprints via self.board.Footprints() vs. what might not be all footprints(?) using read_pos_parts()?

@Bouni
Copy link
Owner Author

Bouni commented Jun 10, 2024

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: #440 (comment)

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
Copy link
Collaborator

chmorgan commented Jun 10, 2024 via email

KiKit Panels have the same ref, C1 for example on all boards of a panel.
In order to get all of them in the POS / BOM files we now iterate over all parts
of the board, matching them with a ref from the database.
@Bouni Bouni merged commit 5d497a5 into main Jun 13, 2024
2 checks passed
Bouni pushed a commit that referenced this pull request Jun 14, 2024
Bouni pushed a commit that referenced this pull request Jun 19, 2024
gonzalop pushed a commit to gonzalop/kicad-jlcpcb-tools that referenced this pull request Jul 28, 2024
@Bouni Bouni deleted the panel-support branch September 30, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kikit panel CPL file all over the place
2 participants