This is a model of a TO 220 transistor. All dimensions were taken from the data sheet. It's 1:1 scale but I would recommend printing it in a larger scale. I decreased the diameter of the heat sink hole by 0,1 mm to make it look better. You must use supports for printing the legs.
Print at your own risk.