2 # Copyright 2020 by Bdale Garbee <bdale@gag.com>. GPLv3
4 # cut required holes in a Hammond 1551K box to mount TeleBT v4.0b and later
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.2500 # 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 = 0.886 # switch distance from center line
27 Y_Switch = 0.220 # switch centerline above PCB top surface (adjusted)
28 X_Switch_slot = 0.300 # width of switch slot
29 Y_Switch_slot = 0.160 # height of switch slot
31 X_USB = -1.143 # USB distance from center line
32 Y_USB = -0.049 # USB centerline below PCB bottom surface
34 X_USB_slot = 0.350 # width of the USB slot (account for plastic melting
35 Y_USB_slot = 0.150 # height of the USB slot around end mill)
37 Y_SMA = -0.025 # SMA centerline below PCB bottom surface
38 D_SMA = 0.281 # diameter of SMA hole (doc says 0.256)
40 Y_Box_Bottom = 0.079 # thickness of box bottom wall
41 Y_Standoff = 0.157 # height of standoff nubs in box
42 Y_PCB = 0.063 # PCB thickness
46 print "G01 Z",-Zdepth," F",Speed
55 print "G00 X0 Y5 Z0.25"
58 print "(TeleBT box using 1/16 mill, box base to back, origin back/left/top edges)"
68 X_Pos = (BoxWidth / 2)
69 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_SMA)
70 CutLineRadius = (D_SMA / 2) - (CutterOD / 2)
72 print "G00 X",(X_Pos + CutLineRadius),"Y",Y_Pos
73 print "G01 Z",-Zdepth," F",Speed
74 print "G02 X%6.4f" % (X_Pos - CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % -CutLineRadius,"J0 F",Speed
75 print "G02 X%6.4f" % (X_Pos + CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % CutLineRadius,"J0 F",Speed
79 print "(power switch slot)"
81 X_Start = (BoxWidth / 2) + X_Switch + (X_Switch_slot / 2) - (CutterOD / 2)
82 X_End = (BoxWidth / 2) + X_Switch - (X_Switch_slot / 2) + (CutterOD / 2)
83 Y_Start = -(Y_Box_Bottom + Y_Standoff + Y_Switch) + (Y_Switch_slot / 2) - (CutterOD / 2)
84 Y_End = -(Y_Box_Bottom + Y_Standoff + Y_Switch) - (Y_Switch_slot / 2) + (CutterOD / 2)
87 print "G00 X",X_Start,"Y",Y_Start
88 print "G01 Z",-Zdepth," F",Speed
89 print "G01 X",X_End," Y",Y_Start," F",Speed
90 print "G01 X",X_End," Y",Y_End," F",Speed
91 print "G01 X",X_Start," Y",Y_End," F",Speed
92 print "G01 X",X_Start," Y",Y_Start," F",Speed
94 print "( second pass)"
95 print "G00 X",X_Start,"Y",Y_Start
96 print "G01 Z",-Zdepth," F",Speed
97 print "G01 X",X_End," Y",Y_Start," F",Speed
98 print "G01 X",X_End," Y",Y_End," F",Speed
99 print "G01 X",X_Start," Y",Y_End," F",Speed
100 print "G01 X",X_Start," Y",Y_Start," F",Speed
108 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
109 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_USB)
110 CutLineRadius = (Y_USB_slot / 2) - (CutterOD / 2)
112 print "G00 X",X_Pos,"Y",(Y_Pos - CutLineRadius)
113 print "G01 Z",-Zdepth," F",Speed
114 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos + CutLineRadius),"I0 J%6.4f" % CutLineRadius," F",Speed
116 print "( top and second end)"
117 X_Pos = (BoxWidth / 2) + X_USB - ((X_USB_slot - Y_USB_slot)/2)
118 print "G01 X",X_Pos," F",Speed
119 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos - CutLineRadius),"I0 J%6.4f" % -CutLineRadius," F",Speed
122 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
123 print "G01 X",X_Pos," F",Speed
127 print "( second pass - first end)"
128 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
129 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_USB)
130 CutLineRadius = (Y_USB_slot / 2) - (CutterOD / 2)
132 print "G00 X",X_Pos,"Y",(Y_Pos - CutLineRadius)
133 print "G01 Z",-Zdepth," F",Speed
134 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos + CutLineRadius),"I0 J%6.4f" % CutLineRadius," F",Speed
136 print "( second pass - top and second end)"
137 X_Pos = (BoxWidth / 2) + X_USB - ((X_USB_slot - Y_USB_slot)/2)
138 print "G01 X",X_Pos," F",Speed
139 print "G03 X%6.4f" % X_Pos, "Y%6.4f" % (Y_Pos - CutLineRadius),"I0 J%6.4f" % -CutLineRadius," F",Speed
141 print "( second pass - bottom)"
142 X_Pos = (BoxWidth / 2) + X_USB + ((X_USB_slot - Y_USB_slot)/2)
143 print "G01 X",X_Pos," F",Speed