KiCad / kicad-library-utils

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

F6.2 center check does not consider fab lines #242

Open evanshultz opened 6 years ago

evanshultz commented 6 years ago

https://github.com/KiCad/kicad-footprints/pull/570 has an issue with centering horizontally, according to Travis, with the footprint center at (-8.025,0.0)mm. I verified with the current HEAD scripts run locally.

But actually, there is no problem. The extents of the pads on the left and fab lines on the right are +/-10.9mm.

I don't see anything obviously wrong with the footprint. A few tests:

So it seems the scripts are not taking into account the fab lines when calculating the footprint center.

Ratfink commented 6 years ago

Yes, it only calculates the center based on the pads' shapes, which happens on line 27 of pcb/rules/F6_2.py. This works for many packages, but as you point out it really isn't the right approach overall. It would be better to consider the fab layer lines as well.

cpresser commented 5 years ago

Actually there is already a proposed patch for that. https://github.com/KiCad/kicad-library-utils/pull/260