#
# MACRO cut_polar_cord
#    macro for cutting a path ising Polar Coordinate Interpolation.
#
ASSIGN: Geometry_input=1;
CIRCLE_SWITCHES: center type= B  quadrant  force_full max radius= 999.9999
STD_BLK: LINEAR:         gcode= 1  feed          std blk= N*G*X*Y*Z*F
STD_BLK: FEED:           gcode= 1  feed          std blk= N*G*X*Y*Z*F
STD_BLK: CIRCLE_CW:      gcode= 3  feed          std blk= N*G*X*Y*I*J*K*F
STD_BLK: CIRCLE_CCW:     gcode= 2  feed          std blk= N*G*X*Y*I*J*K*F
STD_BLK: DCOMP_ON:       gcode= 1  feed          std blk= N*G*g*X*Y*F
STD_BLK: DCOMP_OFF:      gcode= 1  feed          std blk= N*G*g*X*Y
MAPWORD: letter=Y      map="C"  invert
MAPWORD: letter=X      map="X"  dia
MAPWORD: letter=Z      map="Y"
ASSIGN: RotaryAxisOff
OUTPUT: C0
OUTPUT: G12.1
ASSIGN: Feed= Tfeed;
ASSIGN: Xcenter= Polar_depth; Ycenter= 0.0; Zcenter= 0.0;
ASSIGN: Xnormal= 1.0; Ynormal= 0.0; Znormal= 0.0;
POLARTRANSFORM: Xvector=0; Yvector= 1.0; Zvector= 0.0;
ASSIGN: Pathstartpt
ASSIGN: X=Xstart; Y=Ystart; Z= Polar_depth;
ASSIGN: Setcoordinates
CUTPATH:
ASSIGN: Pathendpt
OUTPUT: C0
OUTPUT: G13.1
POLARTRANSFORM: off
ASSIGN: Pathendpt
ASSIGN: X=Xend; Y=Yend; Z= Zend;
ASSIGN: Setcoordinates
ASSIGN: RotaryAxisOn
MAPWORD: letter=Y      map="X" dia normal
MAPWORD: letter=X      map="Z"
MAPWORD: letter=Z      map="Y"
CIRCLE_SWITCHES: center type= B  quadrant  max radius= 0.000001
