(cw traverse: p1,p2,p3,p4) (ccw traverse: p1,p4,p3,p2) (info: ohex: outside hexagon, cw/ccw dir, radius compensation) o sub # = #1 (=1) # = #2 (=2000) # = #3 (=10) # = #4 (=2 2conv | 3climb) # = #5 (distance across flats) # = #6 # = #7 # = #8 (=0.2) # = #9 (=0) # = #10 (=1) # = #11 (=0) # = #12 (=0) # = #13 (=0) # = #14 (=0) # = #15 (=1) # = #16 (=0) # = #17 (=0) o if [# EQ 0] # = 1.0 (debug, scale was 0, setting #) o endif o call [#][#][#][#] # = [#5410 +.001] o if [[# NE 2] AND [# NE 3]] (debug, ohex: direction must be 2 or 3 - EXITING) (print, ohex: direction must be 2 or 3 - EXITING) (AXIS,notify, ohex: direction must be 2 or 3 - EXITING) m2 o endif # = [#/2] #

= [#/cos[30]] # = [#

* cos[60]] # = [#

* sin[60]] (p1 -> p2 -> is cw) (apply scale,rotate, then offset to all input points) # = #

# = 0 o call [#][#][#][#][#][#] # = #<_move:x> # = #<_move:y> # = # # = [0 - #] o call [#][#][#][#][#][#] # = #<_move:x> # = #<_move:y> # = [0 - #] # = [0 - #] o call [#][#][#][#][#][#] # = #<_move:x> # = #<_move:y> # = [0 - #

] # = 0 o call [#][#][#][#][#][#] # = #<_move:x> # = #<_move:y> # = [0 -# ] # = # o call [#][#][#][#][#][#] # = #<_move:x> # = #<_move:y> # = # # = # o call [#][#][#][#][#][#] # = #<_move:x> # = #<_move:y> # = [#/2] # = [0 - #] # = [0 - #] (get lengths and angles for connecting lines) o call [#][#][#][#] # = #<_line:phi> o call [#][#][#][#] # = #<_line:len> # = #<_line:phi> # = #<_line:cos> # = #<_line:sin> o call [#][#][#][#] # = #<_line:phi> o call [#][#][#][#] # = #<_line:len> # = #<_line:phi> # = #<_line:cos> # = #<_line:sin> # = # (starting line for cw) # = # (starting line for ccw) g40 (cutter radius compensation off) f # s # m3 (spindle cw) o if [# GT 0] o call [#] o endif g0 z# # = # # = 1 o while [# GT #] # = [# + #] o if [# LT #] # = # o endif o if [# GT 100] (debug, ohex: too many passes - EXITING) (print, ohex: too many passes - EXITING) (AXIS,notify, ohex: too many passes - EXITING) m2 o endif o if [#

EQ 3] o if [# EQ 1] # = [# + # * sin[#] - # * cos[#]] # = [# - # * cos[#] - # * sin[#]] # = [0 + # * cos[#]] (r vector) # = [0 + # * sin[#]] g0 x # y # (preentry 1) / g42 (cutter radius comp right of path) g2 x # y # i # j # (arc entry) # = # # = # g1 z # (plunge) o endif x # y # z# x # y # x # y # x # y # x # y # x # y # # = [# + 1] o else (dir EQ 2 CW) o if [# EQ 1] # = [# - # * sin[#] - # * cos[#]] # = [# + # * cos[#] - # * sin[#]] # = [0 + # * cos[#]] (r vector) # = [0 + # * sin[#]] g0 x # y # / g41 (cutter radius comp left of path) g3 x # y # i # j # (arc entry) # = # # = # g1 z # (plunge) o endif x # y # z# x # y # x # y # x # y # x # y # x # y # # = [# + 1] o endif o endwhile g1 x # y # g0 z # g40 o endsub