3-Dimension volumetric errors of CNC machine tools will cause a decrease in machining quality.To overcome this problem,ensure the machining accuracy,two compensation strategies based on error modeling by using multi-body system theory are proposed.One is offline compensation,the other is embedded compensation.Offline compensation,a kind of correction compensation based on NC program,realizes the compensation of 3-Dimension volumetric errors of CNC machine tools by mapping the errors to NC program and modifying the NC program.Embedded compensation is a kind of online compensation based on CNC system,and it realizes the compensation by modifying the data flow of CNC system.This method is on the foundation of the amalgamation of CNC system and 3-Dimension volumetric errors model.Results from experiments show that both of the two compensation strategies significantly improve the precision of CNC machine tools and not affect the machine reliability.