The present invention discloses a method and
system for generating a dual random
processing path with adjustable
surface shape threshold, which belongs to the field of
processing technology. First, a mapping relationship between
surface shape data height and
grayscale value is set, so that the
surface shape height information of the workpiece is mapped to the
grayscale value of the
grayscale image; then, by autonomously setting the expected
processing surface shape threshold, the area to be modified is delineated within the entire workpiece surface shape range, and the area to be modified delineated based on the
target surface shape threshold is extracted to generate a random resident
point cloud; finally, through a
heuristic algorithm, a random processing path is generated in the area to be modified that passes through all the resident points, has a
short distance, is continuous and does not cross. The present invention can delineate the area to be modified by setting the surface shape threshold, and efficiently generate a dual random processing path with random
point cloud and random trajectory, has a strong ability to suppress
intermediate frequency errors, avoids further deterioration of local surface shape low points, significantly improves the modification accuracy and efficiency, and helps to improve the convergence efficiency of surface shape errors of large-aperture optical elements.