Uniform physical theory of diffraction equivalent edge currents for implementation in general computer codes