-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcasings.lisp
252 lines (199 loc) · 7.44 KB
/
casings.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
(in-package :gcode)
(defun hammond-29830-psla ()
(with-program ("hammond-29830")
(with-tool ((make-instance 'tool
:diameter 2
:number 6
:feed-xy 600
:feed-z 240
:depth 3))
(spindle-on)
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(with-named-pass ("outline")
(goto-abs :x 0 :y 0)
(rectangle-inline 95 120 :depth 10)
(goto-abs :x 2 :y 2)
(rectangle-inline (- 95 4) (- 120 4) :depth 10))
(with-named-pass ("fix")
(goto-abs :x 0 :y 0)
(goto-abs :y 119.2 :x 0)
(with-tool-down (3)
(mill-abs :y 119.2 :x 95))
(with-tool-down (6)
(mill-abs :y 119.2 :x 0))
(with-tool-down (10)
(mill-abs :y 119.2 :x 95))
(goto-abs :y (- 120 9) :x 95)
(with-tool-down (3)
(mill-abs :y (- 120 9) :x 86))
(with-tool-down (6)
(mill-abs :y (- 120 9) :x 95))
(goto-abs :y (- 120 9) :x 0)
(with-tool-down (3)
(mill-abs :y (- 120 9) :x 9))
(with-tool-down (6)
(mill-abs :y (- 120 9) :x 0))
(goto-abs :x 0 :y 0)
(rectangle-inline (- 95 4) (- 120 4) :depth 1)
)
(with-named-pass ("inner-rectangles")
(goto-abs :y 0 :x 0)
(rectangle-mill 9 9 :depth 6)
(goto-abs :y (- 120 9) :x 0)
(rectangle-mill 9 9 :depth 6)
(goto-abs :y (- 120 9) :x (- 95 9))
(rectangle-mill 9 9 :depth 6)
(goto-abs :y 0 :x (- 95 9))
(rectangle-mill 9 9 :depth 6))
(with-named-pass ("drills")
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(drill :y 4.5 :x 4.5 :diameter 3 :depth 16)
(drill :y (- 120 4.5) :x 4.5 :diameter 3 :depth 16)
(drill :y (- 120 4.5) :x (- 95 4.5) :diameter 3 :depth 16)
(drill :y 4.5 :x (- 95 4.5) :diameter 3 :depth 16)))))
;; X, Y coordnates test brett
;; 42.9, 20.6 -> 2, 2
;; mini command woehr
;; http://www.industriegehaeuse.woehrgmbh.de/assets/pdf/GH02AL002-010-030_060-110_150.pdf
;; distance between drills: 109.5, 84.2
;; outer dimensions: 119.0, 93.5, 34.0
(defun woehr-gehauese-090 ()
(with-tool (*mdf-tool-2mm*)
(spindle-on)
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(with-named-pass ("outline")
(with-tool (*mdf-tool-2mm*)
(goto-abs :x 0 :y 0)
(rectangle-inline 93.5 119 :depth 2)
(goto-abs :x 0.7 :y 0.7)
(rectangle-inline (- 93.5 1.4) (- 119 1.4) :depth 2)))
(with-named-pass ("drills")
(with-tool (*mdf-tool-2mm*)
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(drill :y 5 :x 4.65 :diameter 3.5 :depth 12.5)
(drill :y 5 :x (- 93.5 4.65) :diameter 3.5 :depth 12.5)
(drill :y (- 119 5) :x (- 93.5 4.65) :diameter 3.5 :depth 12.5)
(drill :y (- 119 5) :x 4.65 :diameter 3.5 :depth 12.5)
))))
(defun woehr-gehauese-090-rueckwaerts-drills ()
(with-tool (*mdf-tool-2mm*)
(spindle-on)
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(with-named-pass ("drills")
(with-tool (*mdf-tool-2mm*)
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(with-transform ((translation-matrix -4.65 -5))
(drill :y 5 :x 4.65 :diameter 7 :depth 11)
(drill :y 5 :x (- 93.5 4.65) :diameter 7 :depth 11)
(drill :y (- 119 5) :x (- 93.5 4.65) :diameter 7 :depth 11)
(drill :y (- 119 5) :x 4.65 :diameter 7 :depth 11)
)))))
(defun woehr-gehauese-090-rueckwaerts-drills2 ()
(with-tool (*mdf-tool-2mm*)
(spindle-on)
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(with-named-pass ("drills")
(with-tool (*mdf-tool-2mm*)
(goto-abs :x 0 :y 0)
(goto-abs :z *fly-height*)
(drill :y 5 :x 4.65 :diameter 7 :depth 11)
(drill :y 5 :x (- 93.5 4.65) :diameter 7 :depth 11)
(drill :y (- 119 5) :x (- 93.5 4.65) :diameter 7 :depth 11)
(drill :y (- 119 5) :x 4.65 :diameter 7 :depth 11)
))))
(defun woehr-090-program ()
(with-program ("woehr")
(woehr-gehauese-090)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090))))
(defun woehr-090-platte ()
(with-program ("woehr")
(with-named-pass ("mill")
(with-tool (*mdf-tool-2mm*)
(woehr-gehauese-090)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090))
(with-transform ((translation-matrix 105 0))
(woehr-gehauese-090)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090)))
(with-transform ((translation-matrix 210 0))
(woehr-gehauese-090)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090)))
(with-transform ((translation-matrix 315 0))
(woehr-gehauese-090)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090)))))))
(defun woehr-090-platte-rueckwaerts ()
(with-program ("woehr")
(with-named-pass ("mill")
(with-tool (*mdf-tool-2mm*)
(woehr-gehauese-090-rueckwaerts-drills)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills))
(with-transform ((translation-matrix 105 0))
(woehr-gehauese-090-rueckwaerts-drills)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills)))
(with-transform ((translation-matrix 210 0))
(woehr-gehauese-090-rueckwaerts-drills)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills)))
(with-transform ((translation-matrix 315 0))
(woehr-gehauese-090-rueckwaerts-drills)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills)))))))
(defun woehr-090-platte-rueckwaerts2 ()
(with-program ("woehr")
(with-named-pass ("mill")
(with-tool (*mdf-tool-2mm*)
(with-transform ((translation-matrix -7 0))
(woehr-gehauese-090-rueckwaerts-drills2)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills2))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills2))
(with-transform ((translation-matrix 105 0))
(woehr-gehauese-090-rueckwaerts-drills2)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills2))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills2)))
(with-transform ((translation-matrix 210 0))
(woehr-gehauese-090-rueckwaerts-drills2)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills2))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills2)))
(with-transform ((translation-matrix 315 0))
(woehr-gehauese-090-rueckwaerts-drills2)
(with-transform ((translation-matrix 0 122))
(woehr-gehauese-090-rueckwaerts-drills2))
(with-transform ((translation-matrix 0 244))
(woehr-gehauese-090-rueckwaerts-drills2))))))))