# CNC Milling | G06.2 Code | Nurbs Interpolation

## Nurbs Interpolation Introduction

Many computer-aided design (CAD) systems used to design metal dies for automobiles and airplanes utilize non-uniform rational B-spline (NURBS ( G06.2 ) ) to express a sculptured surface or curve for the metal dies.

This function enables NURBS (G06.2) curve expression to be directly specified to the CNC. This eliminates the need for approximating the NURBS curve with minute line segments. This offers the following advantages:

1. No error due to approximation of a NURBS curve by small line segments
2. Short part program
3. No break between blocks when small blocks are executed at high speed
4. No need for high-speed transfer from the host computer to the CNC

When this function is used, a computer-aided machining (CAM) system creates a NURBS curve according to the NURBS expression output from the CAD system, after compensating for the length of the tool holder, tool diameter, and other tool elements. The NURBS curve is programmed in the NC format by using these three defining parameters: control point, weight, and knot.

NURBS interpolation can be performed for up to five axes (including two rotation axes). Therefore, NURBS interpolation can be performed for the basic three axes (X, Y, and Z) and two rotation axes at the same time. This enables five-axis machining to produce very smooth finished surfaces and so finds applications such as machining of smooth workpiece side faces.

## G06.2 Code Format

G06.2 [P ] K X Y Z [α ] [β ][R ] [F ];

### Parameters

G06.2 : Start NURBS interpolation mode
P_ : Rank of NURBS curve
X_ Y_ Z_ : Control point
α β_ : Control point (rotary axes)
R_ : Weight
K_ : Knot
F_ : Feedrate

### How it Looks in Program

G06.2 [P ] K X Y Z [α ] [β ][R ] [F ];
K X Y Z [α ] [β ][R ];
K X Y Z [α ] [β ][R ];
K X Y Z [α ] [β ][R ];
:
K X Y Z [α ] [β ][R ];
K ;
:
K ;
G01 . . .

## G06.2 Code Examples

### G06.2 CNC Program Example - 1

G90;

G06.2 K0. X0. Z0.;
K0. X300. Z100.;
K0. X700. Z100.;
K0. X1300. Z-100.;
K0.5 X1700. Z-100.;
K0.5 X2000. Z0.;
K1.0;
K1.0;
K1.0;
K1.0;
G01 Y0.5;
G06.2 K0. X2000. Z0.;
K0. X1700. Z-100.;
K0. X1300. Z-100.;
K0. X700. Z100.;
K0.5 X300. Z100.;
K0.5 X0. Z0.;
K1.0;
K1.0;
K1.0;
K1.0;
G01 Y0.5;
G06.2 …

G01 …