Abstract.To solve the problem of high intensity, long time-consuming and low efficiency by on-line programming in robot for free-form surface grinding and polishing, in addition, it isn't programmed by on-line programming in robot for more complex surface. A method of robotic machining trajectory automatic generation for complex surface grinding and polishing is presented, the NonUniform Rational B-splines(NURBS) curve fitting and adaptive sampling algorithm are taken as core of the method, which could realize trajectory planning of robot with off-line programming, Finally, the result of the computer simulations show that the method is simple, effective, practical and reliable. Meanwhile, which could not only generate grinding and polishing trajectory for arbitrary complex surface, but also can improve the quality, precision and efficiency of machining.