metric_squares.ngc
1 ;squares 2 3 #1 = 50 (Scale) 4 #2 = 3 (Iterations) 5 #3 = 762 (Feed Rate) 6 #4 = 0.5 7 #5 = [#1*#2*#4] 8 9 G21 10 G64 P0.005 11 M52 P1 ;to enable reverse-run 12 F#<_hal[plasmac.cut-feed-rate]> ; feed rate from cut parameters 13 14 o100 repeat [#2] 15 G0 X[#5-#4*#1] Y[#5-#4*#1] 16 M3 $0 S1 (select plasma torch) 17 G1 Y[#5+#4*#1] 18 G1 X[#5+#4*#1] 19 G1 Y[#5-#4*#1] 20 G1 X[#5-#4*#1] 21 M5 22 #4 = [#4+0.5] 23 o100 endrepeat 24 25 G0 X0 Y0 26 M2