Algorithm for the Fast Calculation of Magnetic Fields Generated by Arc-Shaped Conductors with Rectangular Cross Section