From 6f1f6b77769ba5cbf99666e9a5595ab6c40a85d8 Mon Sep 17 00:00:00 2001 From: Leo Lou Date: Wed, 13 Jun 2018 16:22:52 +0900 Subject: [PATCH] Refactor pinky connectors --- src/dactyl_keyboard/dactyl.clj | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/dactyl_keyboard/dactyl.clj b/src/dactyl_keyboard/dactyl.clj index b6f1f4f..1e312bb 100644 --- a/src/dactyl_keyboard/dactyl.clj +++ b/src/dactyl_keyboard/dactyl.clj @@ -274,27 +274,6 @@ (map (partial apply hull) (partition 3 1 shapes)))) -(def pinky-connectors - (apply union - (concat - ;; Row connections - (for [row (range 0 lastrow)] - (triangle-hulls - (key-place lastcol row web-post-tr) - (key-place lastcol row wide-post-tr) - (key-place lastcol row web-post-br) - (key-place lastcol row wide-post-br))) - - ;; Column connections - (for [row (range 0 cornerrow)] - (triangle-hulls - (key-place lastcol row web-post-br) - (key-place lastcol row wide-post-br) - (key-place lastcol (inc row) web-post-tr) - (key-place lastcol (inc row) wide-post-tr))) - - ))) - (def connectors (apply union (concat @@ -323,8 +302,7 @@ (key-place column row web-post-br) (key-place column (inc row) web-post-tr) (key-place (inc column) row web-post-bl) - (key-place (inc column) (inc row) web-post-tl))) - ))) + (key-place (inc column) (inc row) web-post-tl)))))) ;;;;;;;;;;;; ;; Thumbs ;; @@ -683,6 +661,28 @@ (def screw-insert-outers (screw-insert-all-shapes (+ screw-insert-bottom-radius 1.65) (+ screw-insert-top-radius 1.65) (+ screw-insert-height 1.5))) (def screw-insert-screw-holes (screw-insert-all-shapes 1.7 1.7 350)) +(def pinky-connectors + (apply union + (concat + ;; Row connections + (for [row (range 0 lastrow)] + (triangle-hulls + (key-place lastcol row web-post-tr) + (key-place lastcol row wide-post-tr) + (key-place lastcol row web-post-br) + (key-place lastcol row wide-post-br))) + + ;; Column connections + (for [row (range 0 cornerrow)] + (triangle-hulls + (key-place lastcol row web-post-br) + (key-place lastcol row wide-post-br) + (key-place lastcol (inc row) web-post-tr) + (key-place lastcol (inc row) wide-post-tr))) + ;; wall + ;; +))) + (def model-right (difference (union key-holes