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

Footprints without pads fix #133 #138

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

dzid26
Copy link
Contributor

@dzid26 dzid26 commented Mar 7, 2024

Graphics can be stored as footprints - usually with Unspecified footprint type. This triggered footprint position calculation based on pads bounding box centroid (intended for weird footprints imported from other programs, not for graphics). Graphics don't have pads which was causing Index out of range error.

Changes:

  • skipping footprint without pads - fixes Index out of range #133
  • small refactor (put all skipping conditions in skip_footprint var)
  • added extra comments (because I was getting confused about my own code).

Copy link
Owner

@bennymeg bennymeg left a comment

Choose a reason for hiding this comment

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

Thanks!

@bennymeg bennymeg merged commit 88ae87b into bennymeg:master Mar 12, 2024
@wjslager
Copy link

wjslager commented Jul 2, 2024

Could this be made an user selectable option?

I have a footprint without pads that I needs to be exported to the BOM and positions file.

@dzid26
Copy link
Contributor Author

dzid26 commented Jul 2, 2024

Could this be made an user selectable option?

I have a footprint without pads that I needs to be exported to the BOM and positions file.

Can you show your footprint?

@wjslager
Copy link

wjslager commented Jul 3, 2024

So the thing is, I have made a symbol for the BeagleBone Black, a board with two 2x23 headers which connect to two 2x23 pin headers soldered by JLCPCB.

As one symbol can only have one footprint, I realised I needed two footprints to generate both the positions and designators with LCSC part numbers. To fix this I have a placeholder footprint without any pads that generates the positions and have the LCSC number, while the main footprint linked to the symbol has all the pads but no LCSC number.

I did this back in Kicad 5 and done several PCBA runs with it. Since then I've moved to Kicad 7 and updated the plugin and my placeholder footprints do not export anymore, due to them having 0 pads.

I know the 'correct' way would probably be to split the symbol in two separate symbols, but as it is quite a complex symbol and PCB I rather not do that in fear of making a mistake and wasting time redoing and expensive PCBA order.

@dzid26
Copy link
Contributor Author

dzid26 commented Jul 3, 2024

It's hard for me to imagine what is exactly the problem, but I think you are hacking a way to indicate to JLC that you need two headers to be placed which can't be done using one footprint.

I guess or footprint.GetPadCount() == 0 condition could be removed as it is possible to enable `Exclude from position files for anything that is not intended for placing.

` image

I added a PR #166

In the meantime, if you need a workaround, you could add a tiny pad in the dummy footprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index out of range
3 participants