예제 #1
0
파일: tige.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.fillcircle((0., 0.), 8.5, depth=8.7)
#cnc.circle((0., 0.), 90., depth=material_height+0.1, offset='inside', tab=True)

# cnc.rectangle(start, end, depth, start_depth=0.0, offset=None, tab=False):

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)
예제 #2
0
파일: circle.py 프로젝트: atmelino/CNCMaker
#!/usr/bin/python

"""
A circle.
"""

# dirty!
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 = 1.0 # cnc.tool_width / 2
cnc.tab_width = 5.000
cnc.tab_height = cnc.tool_width

material_height = 10.000 # mm
recess_depth = material_height - 7.5

cnc.circle((25, 25), 20.0, depth=material_height, tab=True)

cnc.fillcircle((70, 25), 20.0, depth=material_height)

cnc.fillcircle((70, 25), 20.0, depth=material_height, depth_first=False)

예제 #3
0
파일: plateau.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.fillcircle((0., 0.), 8.5, depth=8.7)
cnc.circle((0., 0.), 90., depth=material_height+0.1, offset='inside', tab=True)



예제 #4
0
import cnc

cnc.tool_width = 3.175
cnc.step_over = cnc.tool_width / 2
cnc.step_down = 1.0
cnc.safe_height = 5.00

cnc.init()

# start with a drill to depth at 0,0
# bad plan - this made a fair bit of smoke
#cnc.drill((0, 0), abs(depths[0][1]))

for r, each_depth in depths[1:]:
    cnc.circle((0,0), r, abs(each_depth))


print "; finishing pass"
f_radii = list(cnc.frange(0, diameter / 2.0, mill_diam / 4.0))
print ";", f_radii
f_depths = []
for r in f_radii:
    each_depth = (r ** 2) / (4 * a_const) - depth
    f_depths.append((r, each_depth))
    print ";     %d\t%0.2f" % (r, each_depth)
print ";", f_depths

for r, each_depth in f_depths[1:]:
    print ";", r, each_depth
    cnc.circle((0,0), r, abs(each_depth), start_depth=abs(each_depth)-0.1)