本研究目的為發展五軸CNC工具機之工件防碰撞偵測技術,由於五軸工具機包含兩個額外旋轉軸,進行加工多軸同動情況下較難預測機台移動位置,在此加工環境下若輸入錯誤的指令,機台與工件很容易發生碰撞,導致加工精度不良或機台的損壞,故提出一套碰撞偵測演算法。 本文利用CSG(Constructive Solid Geometry)實體幾何模型建構機台,工件的檔案格式為三角網格STL(Stereolithography),STL檔案通常含有龐大的點資料,為了改善資料過多的問題,提出合併三角網格與階段式碰撞偵測方法。 本文碰撞偵測分為二個階段(粗估、精估),粗估是利用球包覆法包覆工件與機台刀具的部份,達到機台與工件相距很遠時,不須做複雜的干涉判斷,精估主要目的是將工件包覆球有發生干涉的部分,再進一步利用分離軸定理兩物體是否真的發生干涉,最後以程式Visual C++搭配OpenGL實現五軸加工模擬並驗證。 本文使用兩階段碰撞演算法模擬五軸工具機刀具與工件、夾具發生干涉,工件與夾具三角網格總和140個情況下,加入粗碰撞改善後,碰撞偵測時間改善17.4(%),未碰撞時間改善為8.21(%)。
The main purpose of this study is to develop collision detection technology for five axis CNC machine tools . As five axis CNC machine tools have two extra rotational axis, it is hard to predict the location of machine tool when the axis operate simultaneously. Therefore, it is easy for the machine tool to collide if the user enters the wrong command, resulting in reduced processing accuracy or breakdown of machine tools. A collision detection algorithm is proposed. In this research, Constructive Solid Geometry (CSG) is used to construct the model of the machine tool while the data format of the workpiece is Stereo Lithography (STL). STL file is composed of triangular mesh, which usually contains huge amount of point data. In order to improve this issue, a method that combines triangle mesh and multi-stage collision detection is proposed in this research. The collision detection method is divided into two stages (rough detection stage and precise detection stage). rough detection uses bounding sphere method, in which no complex calculation is required even when the distance between the machine tool and the workpiece is far. Precise detection uses separated axis theorem to double confirm collision between two objects when first stage detection occurred. The research uses Visual C++ with OpenGL to simulate and verify five axis processing. This research uses two-step collision detection algorithm to simulate collision between the cutter of five-axis machine tool and the workpiece, and the fixture. After 17.4% while non-collision detection reduced by 8.21% with the mesh number of workpiece and fixture adding up to 140.