示例#1
0
文件: bitbeam.py 项目: Ldiz/3Dscan
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)
示例#2
0
文件: test_cnc.py 项目: Ldiz/3Dscan
def test_drill():
    command_list_reset()
    cnc.drill((5,5), 3)
    print command_list
    assert command_list == [
        'G0 Z5.000', 'G0 X5.000 Y5.000', 'G0 Z0',
        'G1 Z-1.000', 'G1 Z-2.000', 'G1 Z-3.000',
        'G1 Z0', 'G0 Z5.000']
示例#3
0
文件: test_cnc.py 项目: Ldiz/3Dscan
def test_peck_drill():
    """Drilling more than step_down * 5 should trigger a peck."""
    command_list_reset()
    cnc.drill((5,5), 6)
    print command_list
    assert command_list == [
        'G0 Z5.000', 'G0 X5.000 Y5.000', 'G0 Z0', 
        'G1 Z-1.000', 'G1 Z-2.000', 'G1 Z-3.000', 'G1 Z-4.000', 
        'G1 Z-5.000', 'G1 Z-0.000', 'G1 Z-6.000', 
        'G1 Z0', 'G0 Z5.000']
示例#4
0
文件: bitbeam.py 项目: Ldiz/3Dscan
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")
示例#5
0
文件: foot.py 项目: Ldiz/3Dscan
#!/usr/bin/python2

import sys
sys.path.insert(0, '..')

import cnc
cnc.init()

cnc.tool_width = 3.175
cnc.step_over = cnc.tool_width / 2
cnc.step_down = cnc.tool_width / 2
cnc.tab_width = 2
cnc.tab_height = 0.5

material_height = 10.000 # mm

#cnc.circle((0., 0.), 10.5, depth=material_height+0.2, offset='inside', tab=False)

C=40.
#cnc.rectangle((-C/2.,-C/2.), (C/2.,C/2.), depth=material_height+0.2, start_depth=0.0, offset='outside', tab=False)
cnc.drill((6.,6),3.*material_height+0.2)
cnc.drill((C-6.,C-6),3.*material_height+0.2)
cnc.drill((6.,C-6),3.*material_height+0.2)
cnc.drill((C-6.,6),3.*material_height+0.2)
示例#6
0
文件: bitbeam.py 项目: Ldiz/3Dscan
        offset="outside")

if '-1' in sys.argv:
    for pos, length in beam_positions:
        vert_bitbeam(pos, length)

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)
示例#7
0
cnc.init()

row = 0  
col = 0 

distance = 15  


x_offset = 0
#y_offset = 30 
y_offset = 0 


#while col < 16:
#	cnc.drill( (col*distance,0) ,2)
#	time.sleep(3)
#	col = col + 1
#

col = 0 
row = 0 
while row < 11:
	while col < 16:
		cnc.drill( (col*distance + x_offset , row*distance+y_offset), 2)
		time.sleep(3)
		col = col + 1
	col = 0 
	row = row + 1