This study optimizes the machining trajectory through path planning algorithms such as line segment approximation,spline curve method,Voronoi diagram,and Delaunay triangle method to meet the high-precision machining requirements of complex surfaces.Intelligent optimization algorithms such as genetic algorithm,ant colony algorithm,and particle swarm optimization algorithm are used to optimize the machining path.A comprehensive error compensation technology suitable for complex curved surface parts machining is proposed to address the geometric,thermal,and dynamic errors in the machining process of CNC machine tools.