/******************************************************* The following //comment lines identify ngcgui inputs: example option: //ngcgui: --precision 6 info message (appears on ngcgui tab page): //ngcgui: info: gcmc drill example (inch units) variables with defaults: //ngcgui: nx=4 //ngcgui: ny=3 //ngcgui: xstart=1 //ngcgui: ystart=1 //ngcgui: xspacing=0.5 //ngcgui: yspacing=1.0 //ngcgui: retract=0.1 //ngcgui: increment=0.5 //ngcgui: repeat=1 //ngcgui: fr=10,feedrate variable with comment text: //ngcgui: zdepth=0 , z(neg typ) *******************************************************/ feedrate(fr); x=xstart; y=ystart; sign = 1; for (i = 0; i < nx ; i++) { for (j = 0; j < ny; j++) { drill([x, y, zdepth], retract, increment, repeat); y = y + sign * yspacing; } y = y - sign * yspacing; sign = -1 *sign; x = x + xspacing; }