-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoepfer.lisp
70 lines (60 loc) · 1.72 KB
/
doepfer.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
(in-package :gcode)
(defparameter *doepfer-depth* 1.5
(defparameter *doepfer-rail-depth* 3)
(defun doepfer-frontplate-frame (n &key drill)
(unless drill
(setf drill (min 1 (1- n))))
(format t "drill: ~A~%" drill)
(with-named-pass ("doepfer-outline")
(with-tool (*alu-tool*)
(rectangle-outline-xy :x 0 :y 0
:width (- (* n 5.08) 0.08)
:height 128.5
:depth *doepfer-depth*)))
(with-named-pass ("doepfer-drills")
(let ((i drill))
(with-tool (*alu-tool*)
(drill :x (+ (* i 5.08)
(/ 5.08 2))
:y 3
:diameter 3.2
:depth *doepfer-depth*)
(drill :x (+ (* i 5.08)
(/ 5.08 2))
:y 125.5
:diameter 3.2
:depth *doepfer-depth*))))
(with-named-pass ("pcb-drills")
(with-tool (*alu-tool*)
))
)
(defun doepfer-frontplate-rail (n)
(let ((rail-height 5))
(with-named-pass ("doepfer-outline")
(with-tool (*alu-tool*)
(rectangle-outline-xy :x 0 :y 0
:width (+ 7.5 (- (* n 5.08) 0.08) 7.5)
:height rail-height
:depth *doepfer-rail-depth*)))
(with-named-pass ("doepfer-drills")
(dotimes (i n)
(with-tool (*alu-tool*)
(drill :x (+ 7.5 (* i 5.08))
:y (/ rail-height 2)
:diameter 3.2
:depth *doepfer-rail-depth*))))
(with-named-pass ("pcb-drills")
(with-tool (*alu-tool*)
))
))
(defun doepfer-test-rail (n)
(with-program ("doepfer-test")
(with-tool (*alu-tool*)
(goto :x 0 :y 0 :z *fly-height*)
(doepfer-frontplate-rail n))))
(defun doepfer-test-panel (n)
(with-program ("doepfer-test")
(with-tool (*alu-tool*)
(with-transform ((translation-matrix 20 3))
(goto :x 0 :y 0 :z *fly-height*)
(doepfer-frontplate-frame n)))))