# MACRO cut_surf_path
# this is a macro to cut a path on a 3d surface.
# It will position over the XY point defined by Xstart,Ystart
# Rapid in Z to the Rap Level
# Feed in Z to the Finish depth
# Cuts the path
# retracts to the retract level.
#
ASSIGN: Surfstartpt
ASSIGN: Dist_3d= SQR((Xstart-Xlast)^2+(Ystart-Ylast)^2+(Zstart-Zlast)^2);
ASSIGN: Zfeed= 602; Tfeed= 604;
MAPWORD: letter="F"  map="F#"
MACRO: end_surf         Repeats= (Path>1)*(1-(Dist_3d<Pick_dist));
MACRO: rapid_start	Repeats= (Path<2)+ (Path>1)*(1-(Dist_3d<Pick_dist));
MACRO: feed_start	Repeats= (Path>1)*(Dist_3d<Pick_dist);
MACRO: unclamp_baxis
MACRO: coolant_on
FORCEWORD: F
ASSIGN: Feed= 604; Zfeed= 601; Tfeed= 604;
CUTSURF:
ASSIGN: Surfendpt
MAPWORD: letter="F"  map="F"
ASSIGN: Xlast= Xend; Ylast= Yend; Zlast= Zend; At_home= 0;
ASSIGN: Path= Path+1;
MACRO: end_surf		Repeats= (Path>Cpath_count);
#OUTPUT: G49
