According to the problems of low efficiency of rough machining,rapid tool wear and great change of cutting power during processing which were often observed in cutting aviatic titanium alloy structure part,the research of NC code optimization was done based on the secondary development of VERICUT software.The problem of conventional NC code compiling method was illustrated.The algorithm of identifying optimized location and the computational method of NC code optimization under different conditions were given.Test results show that the processing efficiency improves significantly,tool wear decreases and the cutting power changes steadily.The proposed optimization method provides a new thought for titanium alloy structure part safe and efficient rough machining.