I have found the same problem, the placement reference of the machine seems to have been assigned to the centre instead of the base, so you always get an encroachment on a foundation or it is buried in the ground.
Got a workaround using Area Actions mod. Place a smelter in the ground, then you can use AA to ‘select a building’ and use the copy action to raise it out of the ground. Set Z to 5 and paste with “OK”, then dismantle the original smelter. Once it’s out of the ground you can see that the model is incomplete, there is a lot of space under it and the ports connect to nothing.
It also appears that you cannot connect belts to the ports if you try to snap to the bottom edge of a port. For some reason the snap point is near the top of the ports, so aim there when connecting belts and they will connect properly to the bottom edge.