Skip to content

Fix decimal pincounts in custom names

As mentioned at https://github.com/pointhi/kicad-footprint-generator/pull/604#issuecomment-700885439, I broke custom names that used the pincount. This fixes that. At least, the test_hidden_deleted_pins.yaml footprints still generate with the correct names and soic.yaml runs cleanly and gives, I believe, correct outputs. The footprints all look fine to me.

I check for deleted or hidden pins and, if so, use a custom name format which retains a digit for the pincount. A second pincount can be used, but is an empty string if not needed. And it goes nowhere for a custom name format that doesn't know about the second pincount. This way, I don't need any fixed format and the second pincount is more like a free-form text field I can populate if needed.

As I wrote the above, I realized I didn't check for all instances of pincount in the script so I pushed another couple of commits. The first corrects the EP name and also uses the number of pins present in the package in the description. The last corrects the name of footprints with hidden or deleted pins to match the IPC 7351 convention as shown on page 2 of http://ohm.bu.edu/~pbohn/__Engineering_Reference/pcb_layout/pcbmatrix/IPC-7x51%20&%20PCBM%20Land%20Pattern%20Naming%20Convention.pdf. I proposed adopting their terminology and then I didn't even get it right in the script! If you don't like it or don't want to change since only a few footprints have been merged I put it in a separate commit. But it seems right and we can now easily re-generate any footprints with hidden or deleted pins.

Edited by Bob Cousins

Merge request reports