Hi folks,
Per paulvdh’s suggestion, I tried ridiculous values just to see what happens. I used 21 mils for outer layer copper & 100 mils for soldermask.
As before, in Kicad the connector still sits slightly below the surface of the soldermask, and in Freecad it’s flush. See screenshots.
This confirms what paulvdh said: when placing the 3D model on the board, Kicad adjusts for the thickness of the outer layer of copper, but ignores the soldermask thickness.
I’m not sure exactly what the reference point is, but the component’s height relative to it must be controlled completely by the height setting in the footprint properties dialog (Z axis in my case). In other words, regardless of copper & soldermask thicknesses in the board setup menu, if your Z-axis setting happens to put the component, say, 1 mil below the soldermask, that’s where it will stay. Even if you change the copper or soldermask thicknesses, the 3D viewer will still show that you’re 1 mil below the soldermask.
Take-away #1: Kicad makes it difficult to precisely position a component vertically relative to the top of the board. You can play with the numbers in the footprint properties dialog box until it looks flush to the eye, but there isn’t, for example, a “height above soldermask” field that you can numerically set to zero.
Thankfully, this usually isn’t a big deal, and if it is, a host of other tolerances & thicknesses become important, as johannespfister noted. So this isn’t a complaint, it’s just noting Kicad’s behavior.
Take-away #2: soldermask thickness is ignored when exporting a step file. In my example using extreme dimensions, the overall board thickness that showed up in Freecad (from Kicad’s step file export) matches the stackup thickness without soldermask. For me that was 90.6 mils. So if you’re exporting a step file, just know that the soldermask thicknesses aren’t included. This is probably a don’t-care 99% of the time, too.
Lastly, it’s worth mentioning that in the 3D Viewer, Kicad didn’t plot the full (ridiculous!) thickness of the soldermask, which was 100 mils. It did display the soldermask, it just didn’t display it as being crazy thick. Perhaps Kicad applies a sanity check of some sort.
Thanks!
Steve