;; find the center of the circle ;; move to the point indicated by the position (x,y,z,yaw,pitch,roll,_,_) sub move_to(var float[8] position) cloc point here(point) loc_cdata_set(point,position) loc_re_check(point) move(point) finish() end sub main float[8] position cloc[11] circle ;; points around the edge of the circle float centerx, centery ;; the center values trigger_type trig const tool_length = 150 cloc tool_data = cloc{0,tool_length,0,0,0,0,0,0,0} tool_set(tool_data) speed(10) ready() ;; find the center of the circle and print print("center ", centerx, " ", centery, "\n") ;; trace around circle with radius 63.5 for i = 0 to 10 here(circle[i]) point[0] = centerx + 63.5 * cos(360* i / 10) point[1] = centery + 63.5 * sin(360 * i / 10) loc_cdata_set(circle[i],point) loc_re_check(circle[i]) print(circle[i],"\n") end for cpath(&circle[0],0,10,trig) end main