Aiming at the uniformity optimization of spraying with irregular plane boundary constraints, a control method of spraying trajectory with boundary constraints based on the requirement of film thickness accuracy was proposed. Based on the established static spraying model considering the spray height and inclination Angle of the spray gun as variables, the film thickness distribution model of the spray gun along the arc trajectory was established by integrating method, and the optimization model of the coating uniformity between two adjacent arc spraying trajectories was further established. By optimizing the coating uniformity between different curvature radii and spraying trajectories, the law of influence of the curvature radii of adjacent trajectories on the film thickness error was obtained, and the regulation and generation algorithm of the curvature radii of spraying trajectories meeting the requirements of film thickness accuracy was further given to achieve the regulation of coating uniformity.The experimental results show that the proposed method can improve the standard deviation of film thickness by 13.5% compared with the method before boundary constraint spraying control, which can meet the requirements of film thickness accuracy, and the spraying time can be reduced by 32.0% compared with the spraying method without boundary constraint.