We describe an improvement on the magnetic scalar potential approach to design an electromagnet, which incorporates the need to wind the coil as a helix. Any magnetic field that can be described by a magnetic scalar potential is produced with high fidelity within a Target region; all fields are confined within a larger Return. The helical winding only affects the field in the Return.