Toric code distances from terraced polytopes