def rough(k, tool_radius, tool_angle, front_angle, back_angle, clearance): # make a closed area from the kurve a = make_area_for_roughing(k) # adjust the shape to add clearance for front angle and back angle # to do # offset it by the tool radius area.offset(a, tool_radius) # move it to take into account where the driven point is # to do # do some clever things with intersecting rectangular area with this one to make some tool path # for now do some sample tool path to indicate the kind of thing this will do when it's finished rapid(20, 20) rapid(2, 8) feed(-30, 8) rapid(-29, 9) rapid(2, 9) rapid(2, 6) feed(-30, 6) rapid(-29, 7) rapid(2, 7) rapid(2, 4) feed(-30, 4) rapid(-29, 5) rapid(2, 5) # rapid away maybe rapid(20, 20)
import area a = area.new() area.add_point(a, 0, 10, 10, 0, 0) area.add_point(a, 0, 30, 10, 0, 0) area.add_point(a, 0, 30, 30, 0, 0) area.add_point(a, 0, 10, 30, 0, 0) area.add_point(a, 0, 10, 10, 0, 0) area.offset(a, 3) for curve in range(0, area.num_curves(a)): for vertex in range(0, area.num_vertices(a, curve)): sp, x, y, cx, cy = area.get_vertex(a, curve, vertex) print sp, x, y, cx, cy