現今CAD軟體的使用大都是以參數曲線(Bezier曲線、B-spline曲線及NURBS曲線)來做為設計的依據,使用上有平順及易於控制的優點,但傳統五軸NC加工,仍是將平滑的刀具移動路徑軌跡及刀軸方位的變化轉換成以有限個短直線及刀軸角度變化的線性切削指令(G01)來近似曲線,因此產生的NC程式指令相當龐大,增加控制器讀取程式的負擔及切削進給率的不穩定,造成加工品質不佳問題。 本文發展一個後處理程式能產出CNC五軸NURBS切削指令格式的加工程式以便進行五軸曲面加工。本文後處理程式之建構採用兩種方法來產生NURBS CNC切削指令。方法一是先將一系列由CAD/CAM系統提供的離散的刀具路徑點資料(包含刀尖點座標及刀軸的三個方向餘弦)轉換成一個近似的雙B-spline參數曲線方程式,此方程式係用控制點(Control points)及其基底函數(Basis functions)表達;後處理程式接著再將雙B-spline參數曲線方程式轉換輸出成Siemens 840D 控制器格式的NURBS CNC加工程式指令,能直接進行CNC五軸加工。後處理程式的方法二則是針對已知加工曲面之參數方程式者,由加工曲面方程式資料,後處理程式可直接轉換以等參數(iso-parameter)切削之刀具路徑曲線方程式,接著再將其內插成雙B-spline參數曲線方程式,因此此一方法可省略傳統由CAD/CAM系統規劃計算的刀具路徑資料輸入。本文使用Matlab來建構後處理程式,並以若干曲面加工的實例來驗證本後處理程式產出CNC五軸NURBS切削指令的正確性及實機執行加工程式測試,結果顯示本文方法確實可行。
In this paper, we develop a postprocessor that generates the CNC program formatted in 5-axis NURBS cutting commands for surface machining. There are two methods to generate 5-axis NURBS NC cutting commands. In method one, to begin with the postprocessor transforms a series of discrete cutter location points of the tool path provided by general CAD/CAM system, including the tool tip coordinates and three direction cosines of the tool-axis, into an approximated dual B-spline curve equations expressed with several control points and their corresponding blending functions respectively. Based on the dual B-spline curve equations, the postprocessor then outputs the NC program of 5-axis NURBS NC commands in accordance with the NURBS format of the Siemens 840D CNC controller in order to perform the NC machining directly. The method two to generate an NC program is aimed at what has a known parametric surface equation whose surface will be machined. Based on the parametric surface equation, the postprocessor can interpolate each planned iso-parametric tool path curve equation into one dual B-spline curve equations. Therefore, the latter method can omit the procedure of tool path generation in CAD/CAM system. In present study, we use Matlab to develop a postprocessor for dealing a series of discrete cutter location data and generating CNC 5-axis NURBS cutting commands for general surface machining. For verification, several surface machining experiments using present postprocessor for generating 5-axis NURBS NC commands and NC machining on a 5-axis CNC machine tool with Siemens-840D controller have been performed. The results show the proposed postprocessor for generating 5-axis NURBS cutting commands is doable.