add a serial number block to top silk
[hw/quantimotor] / drill_top.py
1 #! /usr/bin/python
2 # Copyright 2017 by Bdale Garbee <bdale@gag.com>.  GPLv3+
3
4 # drill holes in top of ammo box for TeleFireOne
5
6 # Z reference plane is top surface of stock
7 # X/Y origin is center of BNC connector hole
8
9 import math
10
11 StockDepth = 0.250      # >= thickness of steel top on the ammo box
12
13 CutterOD = 0.125        # 1/8" end mill 
14
15 Zfree = 0.250           # height in Z to clear all obstructions
16 Zspot = 0.050           # how deep to spot drill
17
18 Speed = 10              # cutting speed
19 PSpeed = 5              # plunge speed
20
21 def spot():
22         print "G01 Z",-Zspot," F",PSpeed
23         print "G00 Z",Zfree
24         print
25
26 def retract():
27         print "G00 Z",Zfree
28
29 print
30 print "(%s ammo box top, %s spot drill)" % (StockDepth, CutterOD)
31 print
32
33 print "G17 G20 G90"
34 retract()
35 print "M3 S5000"
36 print
37
38 # spot drill all holes for box top
39
40 print "(J8)"
41 print "G00 X0 Y0"
42 spot()
43
44 print "(D2)"
45 print "G00 X0.065 Y1.400"
46 spot()
47
48 print "(D1)"
49 print "G00 X0.065 Y0.925"
50 spot()
51
52 print "(D5)"
53 print "G00 X0.065 Y-0.450"
54 spot()
55
56 print "(D6)"
57 print "G00 X0.065 Y-0.925"
58 spot()
59
60 print "(D7)"
61 print "G00 X0.065 Y-1.400"
62 spot()
63
64 print "(H1)"
65 print "G00 X-1.893 Y-1.142"
66 spot()
67
68 print "(H2)"
69 print "G00 X-1.893 Y1.142"
70 spot()
71
72 print "(H3)"
73 print "G00 X-0.180 Y-1.142"
74 spot()
75
76 print "(H4)"
77 print "G00 X-0.180 Y1.142"
78 spot()
79
80 print "(SW1)"
81 print "G00 X-1.102 Y2.165"
82 spot()
83
84 print "(SW2)"
85 print "G00 X-1.102 Y-2.165"
86 spot()
87
88 print "M5 M2"
89 print "%"
90