This, amazingly, passes DRC. Note trace TxD inside two corners of the clearance area for pin 5. Also, the corner of pin 4 is similarly clipped by a trace. That’s just wrong. This exposes bare copper. See the 3D view:
What’s going on here? I’ve never seen this happen before. Autorouting placed those traces. They pass DRC. KiCAD is happy. But wrongly so.
But on your subject of copper/pad clearances I have no idea without sitting in front of your machine.
The nightlies use radiuses to determine clearances nowadays, but yours is a 4.0.6 stable, so this shouldn’t be of concern.
As you can see there is jitter between the actual copper pad placement and the soldermask… if they had used ‘0’ there, the soldermask would sit OVER copper pads in places.
That’s why it’s usually a positive value.
The smaller, the better the fab needs to be (=less jitter) for your pads to be fully exposed.
As for the track/pad clearance at the corners… have you tested to do a track manually and how it behaves then?
Does it let you get as close as the autorouter?
Maybe DRC checks for those violations based on radius and the autorouter does it’s work based on radiuses also, but the manual placement works on the simpler edgy case (for the stables, the nightlies can do radius as I said) and your confusion stems from that?
I had always thought the DRC checked for clearance violations based on radiuses, not just in KiCAD but also in other layout programs I have used. I don’t know where I got the idea but the observations here in this thread seem to confirm it. That square-cornered box is a very helpful guide, and you’ll never go wrong while keeping traces outside the box, but the acceptable routing area is a little more generous than shown by the box.
Their blog talks about 3 mil minimum clearance, so I’d say that they are able to place it +/- 3 mil, while still being able to guarantee that your pads are 100% free.
Economic fabs (esp. Chinese) will give you 4 mil (0.1 mm), while the better ones are able to guarantee 2 mil (0.05 mm).
0.707 x 0.2 mm is ~0.142 mm, not 0.154 mm
If you then take the 3 mil (=0.077 mm) registration tolerance into account you wind up at a soldermask clearance of 0.065 mm that you should not exceed, if you want to make 100% sure that no copper track is exposed.
I use 0.05 mm soldermask clearance, 0.1 mm soldermask minimum width and 0.2 mm track clearance for these kind of boards.