KiCad / kicad-library-utils

Some scripts for helping with library development
GNU General Public License v3.0
127 stars 95 forks source link

F6.2 check does not correctly handle custom pads #231

Open Ratfink opened 6 years ago

Ratfink commented 6 years ago

We currently handle testing F6.2 by testing if the center of the bounding box of the pads' areas is within a small delta of the origin. This isn't a perfect way to test this rule, but it works well for many types of footprint. However, it recently came to my attention in https://github.com/KiCad/kicad-footprints/pull/461 that the F6.2 checking script doesn't yet know how to handle custom pad shapes, looking only at the pad's anchor and ignoring the primitives.

This should be fixed by adding support for custom pad shapes in KicadMod.overpadsBounds. Several rules use this method, so they would all benefit from this change. I'll try to work on this soon.

Ratfink commented 6 years ago

Most of the implementation for this is done since #232 was merged, though arcs are still unsupported in KicadMod.overpadsBounds. No footprints currently in the library use arcs (or any custom pad primitives other than polygons), so this isn't urgent, but there is still work to be done here.

Also, although the scripts support loading custom pad primitives now, they are not yet able to export them.

evanshultz commented 6 years ago

Quick update: There are custom pad shapes now in the footprint library and their quantity will be growing.