2 # Copyright 2017 by Bdale Garbee <bdale@gag.com>. GPLv3
4 # cut the required holes in a Hammond 1551NTBU box to mount TeleDongle
6 # we assume the box starts out standing on edge, with the bottom of the box
7 # to the "rear" (away from the front of the mill) against a reference plane,
8 # and the left edge of the box also up against a reference block. The box
9 # is then flipped 180 degrees putting the right edge of the box against the
10 # reference plane to drill the cable hole.
12 # the Z reference plane is top surface of the box, X is the left edge of box
16 Zfree = 0.1000 # height in Z to clear all obstructions
17 Speed = 10 # cutting speed
18 Zdepth = 0.125 # how deep we need to cut to go cleanly through the
19 # box wall, where the wall is 0.079 thick
21 CutterSize = 0.0625 # 1/16" end mill
22 RunOut = 0.0000 # how much larger slots are than desired
23 CutterOD = CutterSize + RunOut
27 D_SMA = 0.281 # diameter of SMA hole (doc says 0.256)
29 Box_Bottom = 0.472 # how tall the bottom of the box is
31 D_Cable = 0.180 # cable diameter, as measured
32 Y_Cable = Box_Bottom - D_Cable/2 # centerline of hole for cable
33 Y_fudge = 0.025 # fudge factor to ensure top of cable hole open
35 Y_Box_Bottom = 0.079 # thickness of box bottom wall
36 Y_Standoff = 0.157 # height of standoff nubs in box
37 Y_PCB = 0.063 # PCB thickness
41 print "G01 Z",-Zdepth," F",Speed
50 print "G00 X0 Y5 Z0.25"
54 print "(TeleDongle Box using 1/16 end mill)"
63 X_Pos = (BoxWidth / 2)
64 #Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_PCB + Y_SMA)
65 # above should be correct, but puts the hole too high!
66 Y_Pos = -(Y_Box_Bottom + Y_Standoff + Y_PCB)
67 CutLineRadius = (D_SMA / 2) - (CutterOD / 2)
69 print "G00 X",(X_Pos + CutLineRadius),"Y",Y_Pos
70 print "G01 Z",-Zdepth," F",Speed
71 print "G02 X%6.4f" % (X_Pos - CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % -CutLineRadius,"J0 F",Speed
72 print "G02 X%6.4f" % (X_Pos + CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % CutLineRadius,"J0 F",Speed
74 print "(pausing for box flip)"
84 X_Pos = (BoxWidth / 2)
86 CutLineRadius = (D_Cable / 2) - (CutterOD / 2)
88 print "G00 X",(X_Pos - CutLineRadius),"Y",Y_Pos
89 print "G01 Z",-Zdepth," F",Speed
90 print "G02 X%6.4f" % (X_Pos + CutLineRadius),"Y%6.4f" % Y_Pos,"I%6.4f" % CutLineRadius,"J0 F",Speed
91 print "G01 X%6.4f" % (X_Pos + CutLineRadius),"Y%6.4f" % -(Box_Bottom - (CutterOD / 2) + Y_fudge),"F",Speed
92 print "G01 X%6.4f" % (X_Pos - CutLineRadius),"Y%6.4f" % -(Box_Bottom - (CutterOD / 2) + Y_fudge),"F",Speed
93 print "G01 X%6.4f" % (X_Pos - CutLineRadius),"Y%6.4f" % Y_Pos,"F",Speed