A method for machining huge workpiece is proposed using coordinate transformation theory. The mathematical model of positioning is derived with nonlinear least square method and solved by iterative algorithm which is given by tangent plane iterative method. Then, initially generated tool paths are modified and optimized. The experiment demonstrates that this method for machining ultra-large-scale workpiece is feasible and correct. The proposed automatic positioning algorithm and tool path optimization method can be used to machine huge workpiece to improve accuracy and reduce cost.