In my two-layer pcb design I have an LM317 with a TO220 package. I took the generic TO220 package from the default "linear" Eagle library which does not have a polygon copper pad under the body of the part. However, since the body is connected internally to pin 2 (middle pin) which is the regulator output, the current design would short output to ground (top layer, red).
But I am not really sure where to put the polygon under the part body. If I manually put it to the top layer of the board itself, this does not seem like a robust solution because on the next board I will have to remember again in order not to short supply voltage.
On the other hand, if I put the polygon on the pad layer (green) of the package of the part, it is going to be on the bottom pcb side as well where I probably want to place other traces (like for the design below, blue).
And finally if I put the polygon on the top layer of the package, I won't be able to place the part on the bottom side of the board, if I ever wanted to (or at least the polygon will be on the wrong side then). Edit: I was wrongly assuming that the top layer would stay the top layer when the part is mirrored (placed on the bottom of the board). On the contrary, it is going to become the bottom layer (quite logical...). So placing the pad on the top layer inside the package (like it is the default for SMD parts) is my solution.
So what is the right way of placing the poylgon under the regulator body?