It turns out that complying with the KLC-tolerance of 0.005 mm (that’s 5 microns…) tolerance for Courtyard clearance is a bit of a pain when drawing footprints manually.
It would be much better to automate this - that’s probably been recognized and done already by many people - but here’s a quick hack I came up with: https://gist.github.com/aewallin/a9b3d785c13584c0bac84e6099a8f5ed
Now, wouldn’t it be great if the footprint-editor could take python-plugins that do useful things with these kind of simple scripts? There would be a button that says “add courtyard” and it would add a KLC-compliant box around the drawn geometry.
Tolerance might be the wrong word. The end point must be exactly at a 0.01 grid point. For this to happen the clearance must have a bit of wiggle room. (full range 0.01mm meaning +/-0.005mm from nominal.)
In reality this is quite easily done with the help of the grid and the move exactly tool.