针对目前激光标刻系统中最短路径算法生成时间长、路径效果达不到最优的特点,提出了一种全新模式最短路径算法。首先根据图形平面分布特点,将分布位置接近的图形集中到一个区域,使所有图形划分到多个区域;其次对各个区域内图形进行路径优化,这样可以减少算法优化规模,提高算法效率;然后采取最优方式对各区域排列顺序进行调整,要求各区域内之间的总体距离最短;最后所有图形根据调整后的排列顺序依次输出,得到优化路径。实验结果证明,相比原有算法,本文算法在生成时间上提升近97%,路径效果提升近5%,在算法生成时间和路径效果上具有明显优势,更适合应用于激光标刻系统。
Aiming at the problems of the long generating time of the shortest path algorithm in laser marking system and the unsatisfactory path effect, this paper presents a new model of the shortest path algorithm. First,according to graphic plane distribution characteristics,the graphs which distribute close- ly join into the same area,making all graphs into multiple areas. And then, the graphs in each area are connected by local optimization,which can reduce the size of algorithm and improve the efficiency. Sec- ondly,all the areas are connected by the best way,requiring the shortest total distance between adjuacent areas. Finally,the graphis inside each area are output according to the order of adjustment to obtain the optimal path. The new algorithm can achieve higher operational efficiency and better path effect. Experi- mental results show that compared with the original algorithm,tbe new one can save nearly 97% genera- tion time,and increase nearly 5 % in path effect.