2 # Copyright 2013 by Bdale Garbee <bdale@gag.com>. GPLv3
4 # cut the required holes in a Hammond 1551K box to mount TeleBT
6 # we assume the box is standing on edge, with the bottom of the box to the
7 # "rear" (away from the front of the mill) against a reference plane, and
8 # the left edge of the box also up against a reference block.
10 # the Z reference plane is top surface of the box, X is the left edge of box
14 Zfree = 0.1000 # height in Z to clear all obstructions
15 Speed = 10 # cutting speed
16 Zdepth = 0.125 # how deep we need to cut to go cleanly through the
17 # box wall, where the wall is 0.079 thick
19 CutterSize = 0.0625 # 1/16" end mill
20 RunOut = 0.0000 # how much larger slots are than desired
21 CutterOD = CutterSize + RunOut
23 BoxWidth = 3.150 # measured one at 3.145, Hammond says 3.150, matters
24 # because most dimensions are relative to center line!
26 X_Switch = -1.060 # switch distance from center line
27 Y_Switch = 0.185 # switch centerline above PCB top surface
28 D_Switch = 0.270 # diameter of switch hole (250 mils plus clearance)
30 X_USB = 0.935 # USB distance from center line
31 Y_USB = -0.049 # USB centerline below PCB bottom surface
33 #X_USB_slot = 0.325 # width of the USB slot
34 #Y_USB_slot = 0.125 # height of the USB slot
35 X_USB_slot = 0.350 # width of the USB slot (account for plastic melting
36 Y_USB_slot = 0.150 # height of the USB slot around end mill)
38 Y_SMA = -0.025 # SMA centerline below PCB bottom surface
39 D_SMA = 0.281 # diameter of SMA hole (doc says 0.256)
41 Y_Box_Bottom = 0.079 # thickness of box bottom wall
42 Y_Standoff = 0.157 # height of standoff nubs in box
43 Y_PCB = 0.063 # PCB thickness
47 print "G01 Z",-Zdepth," F",Speed
56 print "G00 X0 Y5 Z0.25"
65 # cut power switch hole
68 print "(power switch hole)"
70 X_Pos = (BoxWidth / 2) + X_Switch
71 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_PCB + Y_Switch)
72 CutLineRadius = (D_Switch / 2) - (CutterOD / 2)
74 print "G00 X",(X_Pos + CutLineRadius),"Y",Y_Pos
75 print "G01 Z",-Zdepth," F",Speed
76 print "G02 X%6.4f" % (X_Pos - CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % -CutLineRadius,"J0 F",Speed
77 print "G02 X%6.4f" % (X_Pos + CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % CutLineRadius,"J0 F",Speed
83 X_Pos = (BoxWidth / 2)
84 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_SMA)
85 CutLineRadius = (D_SMA / 2) - (CutterOD / 2)
87 print "G00 X",(X_Pos + CutLineRadius),"Y",Y_Pos
88 print "G01 Z",-Zdepth," F",Speed
89 print "G02 X%6.4f" % (X_Pos - CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % -CutLineRadius,"J0 F",Speed
90 print "G02 X%6.4f" % (X_Pos + CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % CutLineRadius,"J0 F",Speed
97 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
98 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_USB)
99 CutLineRadius = (Y_USB_slot / 2) - (CutterOD / 2)
101 print "G00 X",X_Pos,"Y",(Y_Pos - CutLineRadius)
102 print "G01 Z",-Zdepth," F",Speed
103 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos + CutLineRadius),"I0 J%6.4f" % CutLineRadius," F",Speed
105 print "(top and second end)"
106 X_Pos = (BoxWidth / 2) + X_USB - ((X_USB_slot - Y_USB_slot)/2)
107 print "G01 X",X_Pos," F",Speed
108 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos - CutLineRadius),"I0 J%6.4f" % -CutLineRadius," F",Speed
111 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
112 print "G01 X",X_Pos," F",Speed
116 print "(second pass - first end)"
117 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
118 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_USB)
119 CutLineRadius = (Y_USB_slot / 2) - (CutterOD / 2)
121 print "G00 X",X_Pos,"Y",(Y_Pos - CutLineRadius)
122 print "G01 Z",-Zdepth," F",Speed
123 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos + CutLineRadius),"I0 J%6.4f" % CutLineRadius," F",Speed
125 print "(second pass - top and second end)"
126 X_Pos = (BoxWidth / 2) + X_USB - ((X_USB_slot - Y_USB_slot)/2)
127 print "G01 X",X_Pos," F",Speed
128 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos - CutLineRadius),"I0 J%6.4f" % -CutLineRadius," F",Speed
130 print "(second pass - bottom)"
131 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
132 print "G01 X",X_Pos," F",Speed