;Facing o sub o call # = #1 # = #2 # = #3 # = #4 # = #5 # = #6 # = #7 # = #8 # = #9 o10 if [#NE 0] (MSG,Angled facing isn't supported yet) o10 return [-2] ; indicate failure to epilog o10 endif o100 if [# NE #<_current_tool>] (MSG,ERROR : Set tool before use macro) o100 return [-2] ; indicate failure to epilog o100 endif G7 ; diameter mode G18 ; XZ Plane G21 ; Metric Units G90 ; Absolute Distance # = [#<_x> * 2] (starting X) # = #<_z> (starting Z) G96 D# S# ; Constant Surface Speed Mode M3 ; Start Spindle G95 F# ; Feed-Per-Rev Mode G4P1 ; Wait to reach speed o110 if [#] M8 o110 endif (DEBUG,facing finish rad-# start rad-# start length-# finish length-#) o200 while [# GT #+ #] #=[#-#] G1 Z# G1 X# G0 Z[#+#] G0 X# G0 Z# o200 endwhile G1 Z# G1 X# G0 Z[#+#] G0 X[#+#] G0 Z#; For touch-off M5 M9 o call ; restore g20/21, g90/g91, feedrate cuter-comp and other using now global _backup_var o endsub M2 %