工具機發展已數十年。在自動化當道的今日,CNC工具機普遍運用G-Code作為刀具路徑產生的表示方法,藉由G-Code描述,工具機得以在每次中斷插補得到刀具所要前進的三軸距離。一般常用的G-Code多為直線及圓弧插補,優點是用的廣且技術單純,缺點為資料筆數過多,造成記憶體消耗,且G-Code兩兩加減速不連續導致加工時間增長。目前已知有工具機廠商將NURBS曲線運用於插補器上,可以做到1.減化資料點數,2.縮減加工時間,以解決上述問題。 本論文主要著力在於使用另一種改良型的插補器(interpolator),運用空間圓弧的堆砌(arc spline)去擬合(approximation)曲線,以利用圓弧G2連續的特性。之後並模擬一工具機上新增一三維圓弧插補的NC指令(以下簡稱3DArc),以便下達切削及移動工具機的動作,使所擬合出的曲線更易實現於工具機上。以期達到如NURBS插補器的加速效果及切削任何方向空間圓弧。 The control of CNC machine tools developed by G-Code and M-Code produce cutting route. According to the description of G-Code, three axes of a CNC machine tools can be moved within a desired small distance in each interpolation interrupt. In this thesis, the G-Code commands, like G01 (linear interpolation) and G02 (circular interpolation), are changed to 3D circular interpolation to reduce huge data amount and memory waste. Furthermore, the discontinuity between two G-Codes will be reduced and manufacturing time will be shortened. The purpose of the developed 3D circular interpolation compete NURBS interpolation in performance in manufacture industry. Besides, the 3D circular arcs approximation has been developed to combine 3D circular interpolation to fit curves and can promise G1 and near G2 continuity between two 3D circular arcs. All that we do is to approximate a curve by 3D circular arcs and simulate the CNC machine core, thus we can cut any curve or circular arc in any plane.