Optimization method of text machining contour combined with double-headed snake algorithm
In the CNC machining process of text,the text contour discretization gets the machining trajectory composed of many micro-line segments,which generates redundant G01 commands and reduces the machining performance and efficiency.To optimize the redundant G01 commands,the text graphics converted into a large number of micro-line segments are re-fitted and optimized before generating the process trajectory.By analyzing the discrete features of the text,based on the proposed double-headed snake algorithm,the point cloud data formed by the discrete micro-line segments of the text is fitted into a text graphic consisting of straight line segments and circular arcs according to the idea of process planning,and the resultant sequential path planning is directly created into the process planning so that the fitted path planning and the process planning reach complete unity.Our experimental results show the tool machining trajectory generated by the double-headed snake algorithm to re-fit each closed contour of the text,compared with the existing CAD/CAM with the contour accuracy and machining quality unchanged,markedly reduces the code length while improves the surface smoothness.