A proton therapy project HUST-PTF (HUST Proton Therapy Facility) based on a 250 MeV isochronous superconducting cyclotron was under development in Huazhong University of Science and Technology (HUST). In this paper we reported the main design considerations of the beam line in HUST-PTF project. As well as two prototype magnets (one quadrupole and one dipole) were designed. Two-dimensional contour optimization and pole-end chamfer iteration were used to minimize the systematic harmonic errors. Finally, Both the field uniformity and harmonic errors achieved the precision requirement and were presented in the paper in detail.