Aspherical surfaces, with their varying curvature, minimize aberrations and enhance clarity, making them essential in optics, aerospace, medical devices, and telecommunications. However, manufacturing these surfaces is challenging because of systematic errors in CNC equipment, tool wear, measurement inaccuracies, and environmental disturbances. These issues necessitate precise error compensation to achieve the desired surface shape. Traditional methods for spherical optics are inadequate for aspherical components, making accurate surface shape error detection and compensation crucial. This study integrates advanced metrology with optimized material removal functions in the grinding and polishing processes. By combining numerical control technology, computer technology, and data analysis, we developed CAM software (version 1) tailored for aspherical surfaces. This software uses a compensation correction algorithm to process error data and generate NC programs for machining. Our approach automates and digitizes the grinding and polishing process, improving efficiency and surface accuracy. This advancement enables high-precision mass production of rotationally symmetrical aspherical optical components, addressing existing manufacturing challenges and enhancing optical system performance.