Spray painting is an important process in the manufacturing of many products, such as automobiles, airplanes, etc. Now the automated trajectory planning of automatic spraying painting equipment is still a challenging problem, especially for free-form parts. Hence, the research of new mathematical methods for automated trajectory planning is very important. Because the current paint deposition rate function is too complicated, the paint accumulation on a surface is proposed. In order to achieve the new spraying operation standards, the paint thickness function for free-form surfaces is also given. A multi-objective constraint optimization problem is formulated. And the parallel-perpendicular case of trajectory planning for a surface with two patches is proposed. A workpiece is used to test the scheme. And the experimental results illustrate the feasibility and availability of the algorithm.