Skip to content

Commit 4662c39

Browse files
committed
choc: partial hotswap fix
1 parent 22b9e83 commit 4662c39

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

src/dactyl_keyboard/common.clj

+22-16
Original file line numberDiff line numberDiff line change
@@ -224,21 +224,23 @@
224224
use-choc? (case switch-type :choc true false)
225225
use-hotswap? (get c :configuration-use-hotswap?)
226226
plate-projection? (get c :configuration-plate-projection? false)
227-
alps-fill-in (translate [0 0 (/ plate-thickness 2)] (cube alps-width alps-height plate-thickness))
228-
mx-fill-in (translate [0 0 (/ plate-thickness 2)] (cube keyswitch-width keyswitch-height plate-thickness))
229-
fill-in (if use-alps? alps-fill-in mx-fill-in)
227+
fill-in (translate [0 0 (/ plate-thickness 2)] (cube alps-width alps-height plate-thickness))
230228
holder-thickness 1.65
231-
top-wall (if use-alps?
232-
(->> (cube (+ keyswitch-width 3) 2.7 plate-thickness)
229+
top-wall (case switch-type
230+
:alps (->> (cube (+ keyswitch-width 3) 2.7 plate-thickness)
233231
(translate [0
234232
(+ (/ 2.7 2) (/ alps-height 2))
235233
(/ plate-thickness 2)]))
236-
(->> (cube (+ keyswitch-width 3.3) holder-thickness plate-thickness)
234+
:mx (->> (cube (+ keyswitch-width 3.3) holder-thickness plate-thickness)
237235
(translate [0
238-
(+ (/ holder-thickness 2) (/ (+ keyswitch-height 0.0) 2))
239-
(/ plate-thickness 2)])))
240-
left-wall (if use-alps?
241-
(union (->> (cube 2 (+ keyswitch-height 3) plate-thickness)
236+
(+ (/ holder-thickness 2) (/ keyswitch-height 2))
237+
(/ plate-thickness 2)]))
238+
:choc (->> (cube (+ keyswitch-width 3.3) holder-thickness (* plate-thickness 0.65))
239+
(translate [0
240+
(+ (/ holder-thickness 2) (/ keyswitch-height 2))
241+
(* plate-thickness 0.7)])))
242+
left-wall (case switch-type
243+
:alps (union (->> (cube 2 (+ keyswitch-height 3) plate-thickness)
242244
(translate [(+ (/ 2 2) (/ 15.6 2))
243245
0
244246
(/ plate-thickness 2)]))
@@ -247,10 +249,14 @@
247249
0
248250
(- plate-thickness
249251
(/ alps-notch-height 2))])))
250-
(->> (cube holder-thickness (+ keyswitch-height 3.3) plate-thickness)
251-
(translate [(+ (/ holder-thickness 2) (/ (+ keyswitch-width 0.0) 2))
252+
:mx (->> (cube holder-thickness (+ keyswitch-height 3.3) plate-thickness)
253+
(translate [(+ (/ holder-thickness 2) (/ keyswitch-width 2))
254+
0
255+
(/ plate-thickness 2)]))
256+
:choc (->> (cube holder-thickness (+ keyswitch-height 3.3) (* plate-thickness 0.65))
257+
(translate [(+ (/ holder-thickness 2) (/ keyswitch-width 2))
252258
0
253-
(/ plate-thickness 2)])))
259+
(* plate-thickness 0.7)])))
254260
side-nub (->> (binding [*fn* 30] (cylinder 1 2.75))
255261
(rotate (/ pi 2) [1 0 0])
256262
(translate [(+ (/ keyswitch-width 2)) 0 1])
@@ -283,9 +289,9 @@
283289
(translate (if use-choc? [0 5 0] [-2.54 5.08 0])))
284290
friction-hole (->> (cylinder (if use-choc? 1 (/ 1.7 2)) 10)
285291
(with-fn 8))
286-
friction-hole-right (translate [5 0 0] friction-hole)
287-
friction-hole-left (translate [-5 0 0] friction-hole)
288-
hotswap-base-z-offset (if use-choc? -0.5 -2.6)
292+
friction-hole-right (translate [(if use-choc? 6 5) 0 0] friction-hole)
293+
friction-hole-left (translate [(if use-choc? -6 -5) 0 0] friction-hole)
294+
hotswap-base-z-offset (if use-choc? 0.2 -2.6)
289295
hotswap-base-shape (->> (cube 19 6.2 3.5)
290296
(translate [0 3 hotswap-base-z-offset]))
291297
hotswap-holder (difference swap-holder

0 commit comments

Comments
 (0)