def vert_bitbeam_holes(pos, length): # holes are just 3.175 for now, but might need to be wider cnc.comment("drilling holes") for i in range(length): hole_pos = (pos[0] + beam_width / 2, pos[1] + beam_width / 2 + i * beam_width) cnc.drill(hole_pos, material_height)
def vert_bitbeam(pos, length): opp_corner = (pos[0] + beam_width, pos[1] + beam_width * length) cnc.comment("milling down to bitbeam height/width") cnc.fillrectangle( pos, opp_corner, material_height - beam_width, offset="outside") # holes are just 3.175 for now, but might need to be wider cnc.comment("drilling holes") for i in range(length): hole_pos = (pos[0] + beam_width / 2, pos[1] + beam_width / 2 + i * beam_width) cnc.drill(hole_pos, material_height) cnc.comment("milling outside profile") cnc.rectangle( pos, opp_corner, material_height, start_depth=material_height - beam_width, offset="outside")
if '-t1' in sys.argv: vert_bitbeam((5, 5), 5) ### 2nd (optional) pass/file - cut out guide for 3rd pass if '-2' in sys.argv: # guide / registration holes along bottom and side to line up guide # drill into spoilboard, line up with 3.175 endmills or M3 bolts cnc.drill((5, 5), depth=material_height + 3.000) cnc.drill((80, 5), depth=material_height + 3.000) # 'dogbone' slots to hold beams tightly in place for step 3 for pos, slot_length in beam_positions: cnc.comment("Milling dogbone slot at (%.02f, %.02f)" % pos) opp_corner = (pos[0] + beam_width, pos[1] + beam_width * length) cnc.dogbone_rect(pos, opp_corner, material_height, sides=('top', 'bottom')) if '-t2' in sys.argv: length = 5 pos = (5, 5) cnc.comment("Milling dogbone slot at (%.02f, %.02f)" % pos) opp_corner = (pos[0] + beam_width, pos[1] + beam_width * length) cnc.dogbone_rect(pos, opp_corner, material_height, sides=('top', 'bottom'))
# I think my "runout" was actually due to not bolting the rotary tool # in hard enough... runout = 0.0 # mm cnc.tool_width = 3.175 + runout cnc.step_over = cnc.tool_width / 2 cnc.step_down = cnc.tool_width / 2 # make tabs fairly chunky cnc.tab_width = 5.000 cnc.tab_height = cnc.tool_width material_height = 10.000 # mm recess_depth = material_height - 7.5 cnc.comment("milling bottom block") cnc.rectangle((5,5), (30, 15), depth=material_height, offset="outside", tab=True) cnc.comment("milling central recess") cnc.fillrectangle((10, 30), (25, 95), depth=recess_depth, offset="inside") cnc.comment("milling central slot") cnc.rectangle((14.75, 35), (20.25, 90), start_depth=recess_depth, depth=material_height, offset="inside") cnc.comment("front slope") # mill slightly outside the edges, so that we don't get rounded corners cnc.fillrectangle((2.5, 105), (32.5, 110), depth=2.5, offset="inside") cnc.fillrectangle((2.5, 110), (32.5, 115), depth=5.0, offset="inside") cnc.fillrectangle((2.5, 115), (32.5, 120), depth=7.5, offset="inside") cnc.comment("cut out around hold down")