|
224 | 224 | use-choc? (case switch-type :choc true false)
|
225 | 225 | use-hotswap? (get c :configuration-use-hotswap?)
|
226 | 226 | 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)) |
230 | 228 | 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) |
233 | 231 | (translate [0
|
234 | 232 | (+ (/ 2.7 2) (/ alps-height 2))
|
235 | 233 | (/ plate-thickness 2)]))
|
236 |
| - (->> (cube (+ keyswitch-width 3.3) holder-thickness plate-thickness) |
| 234 | + :mx (->> (cube (+ keyswitch-width 3.3) holder-thickness plate-thickness) |
237 | 235 | (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) |
242 | 244 | (translate [(+ (/ 2 2) (/ 15.6 2))
|
243 | 245 | 0
|
244 | 246 | (/ plate-thickness 2)]))
|
|
247 | 249 | 0
|
248 | 250 | (- plate-thickness
|
249 | 251 | (/ 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)) |
252 | 258 | 0
|
253 |
| - (/ plate-thickness 2)]))) |
| 259 | + (* plate-thickness 0.7)]))) |
254 | 260 | side-nub (->> (binding [*fn* 30] (cylinder 1 2.75))
|
255 | 261 | (rotate (/ pi 2) [1 0 0])
|
256 | 262 | (translate [(+ (/ keyswitch-width 2)) 0 1])
|
|
283 | 289 | (translate (if use-choc? [0 5 0] [-2.54 5.08 0])))
|
284 | 290 | friction-hole (->> (cylinder (if use-choc? 1 (/ 1.7 2)) 10)
|
285 | 291 | (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) |
289 | 295 | hotswap-base-shape (->> (cube 19 6.2 3.5)
|
290 | 296 | (translate [0 3 hotswap-base-z-offset]))
|
291 | 297 | hotswap-holder (difference swap-holder
|
|
0 commit comments