#
# MACRO zigzag_surf
#
# 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);
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);
CUTSURF:
ASSIGN: Surfendpt
ASSIGN: Xlast= Xend; Ylast= Yend; Zlast= Zend;
ASSIGN: Path= Path+1;
MACRO: end_surf		Repeats= (Path>Cpath_count);
