bennymeg / Fabrication-Toolkit

An JLC PCB Fabrication Plugin for KiCad
Apache License 2.0
280 stars 49 forks source link

Footprints without pads fix #133 #138

Closed dzid26 closed 4 months ago

dzid26 commented 4 months ago

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:

wjslager commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

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 https://github.com/bennymeg/Fabrication-Toolkit/pull/166

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