diff --git a/README.md b/README.md index 7a69140..c3bd39c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ This is a fork of the [Dactyl-ManuForm](https://github.com/tshort/dactyl-keyboar - If enabled, the rows which use 1.5u sized keys can be specified. - Toggle for an extra row of keys for the outer column(s). - Toggle for an extra inner column before the thumbcluster with (nrows-2) rows. -- Toggle between using the default thumb cluster and mini thumb cluster designed by [l4u](https://github.com/l4u/dactyl-manuform-mini-keyboard). +- Toggle between using the default thumb cluster, the mini thumb cluster designed by [l4u](https://github.com/l4u/dactyl-manuform-mini-keyboard), and a new thumb cluster. +- This new thumb cluster uses the same keycaps as the default, but is more compact. The thumb only has to move one position left or right from its neutral position to reach all the keys. - Removable controller board / TRRS jack holder as a separate part. This holder is then friction fit into a cutout on the back wall of the case. Designed for common TRRS breakout boards. - Models for both pro-micro and elite-c holders in the [things/](things/) directory. diff --git a/src/dactyl_keyboard/dactyl.clj b/src/dactyl_keyboard/dactyl.clj index 341dd7a..ac15b8e 100644 --- a/src/dactyl_keyboard/dactyl.clj +++ b/src/dactyl_keyboard/dactyl.clj @@ -28,7 +28,7 @@ (def extra-row true) ; adds an extra bottom row to the outer columns (def inner-column true) ; adds an extra inner column (two less rows than nrows) -(def mini-thumb false) ; toggles between the default thumb cluster and mini thumb cluster +(def thumb-style "new") ; toggles between "default", "mini", and "new" thumb cluster (def column-style :standard) @@ -668,6 +668,11 @@ (minithumb-1x-layout (sa-cap 1)) (minithumb-15x-layout (rotate (/ π 2) [0 0 1] (sa-cap 1))))) +(def minithumbcaps-fill + (union + (minithumb-1x-layout keyhole-fill) + (minithumb-15x-layout (rotate (/ π 2) [0 0 1] keyhole-fill)))) + (def minithumb (union (minithumb-1x-layout single-plate) @@ -765,9 +770,205 @@ (key-place (+ innercol-offset 3) lastrow web-post-tr) (key-place (+ innercol-offset 3) cornerrow web-post-br) (key-place (+ innercol-offset 4) cornerrow web-post-bl)))))) + +;;;;;;;;;;;;;;;; +;; New Thumb ;; +;;;;;;;;;;;;;;;; -(if (true? mini-thumb) (def thumb-type minithumb) (def thumb-type thumb)) -(if (true? mini-thumb) (def thumb-connector-type minithumb-connectors) (def thumb-connector-type thumb-connectors)) +(defn newthumb-tl-place [shape] + (->> shape + (rotate (deg2rad 10) [1 0 0]) + (rotate (deg2rad -24) [0 1 0]) + (rotate (deg2rad 10) [0 0 1]) + (translate thumborigin) + (translate [-13 -9.8 4]))) +(defn newthumb-tr-place [shape] + (->> shape + (rotate (deg2rad 6) [1 0 0]) + (rotate (deg2rad -24) [0 1 0]) + (rotate (deg2rad 10) [0 0 1]) + (translate thumborigin) + (translate [-7.5 -29.5 0]))) +(defn newthumb-ml-place [shape] + (->> shape + (rotate (deg2rad 8) [1 0 0]) + (rotate (deg2rad -31) [0 1 0]) + (rotate (deg2rad 14) [0 0 1]) + (translate thumborigin) + (translate [-30.5 -17 -6]))) +(defn newthumb-mr-place [shape] + (->> shape + (rotate (deg2rad 4) [1 0 0]) + (rotate (deg2rad -31) [0 1 0]) + (rotate (deg2rad 14) [0 0 1]) + (translate thumborigin) + (translate [-22.2 -41 -10.3]))) +(defn newthumb-br-place [shape] + (->> shape + (rotate (deg2rad 2) [1 0 0]) + (rotate (deg2rad -37) [0 1 0]) + (rotate (deg2rad 18) [0 0 1]) + (translate thumborigin) + (translate [-37 -46.4 -22]))) +(defn newthumb-bl-place [shape] + (->> shape + (rotate (deg2rad 6) [1 0 0]) + (rotate (deg2rad -37) [0 1 0]) + (rotate (deg2rad 18) [0 0 1]) + (translate thumborigin) + (translate [-47 -23 -19]))) + +(defn newthumb-1x-layout [shape] + (union + (newthumb-tr-place (rotate (/ π 2) [0 0 1] shape)) + (newthumb-mr-place shape) + (newthumb-br-place shape) + (newthumb-tl-place (rotate (/ π 2) [0 0 1] shape)))) + +(defn newthumb-15x-layout [shape] + (union + (newthumb-bl-place shape) + (newthumb-ml-place shape))) + +(def newthumbcaps + (union + (newthumb-1x-layout (sa-cap 1)) + (newthumb-15x-layout (rotate (/ π 2) [0 0 1] (sa-cap 1.5))))) + +(def newthumbcaps-fill + (union + (newthumb-1x-layout keyhole-fill) + (newthumb-15x-layout (rotate (/ π 2) [0 0 1] keyhole-fill)))) + +(def newthumb + (union + (newthumb-1x-layout single-plate) + (newthumb-15x-layout larger-plate-half) + (newthumb-15x-layout single-plate))) + +(def newthumb-connectors + (union + (triangle-hulls ; top two + (newthumb-tl-place web-post-tl) + (newthumb-tl-place web-post-bl) + (newthumb-ml-place thumb-post-tr) + (newthumb-ml-place web-post-br)) + (triangle-hulls + (newthumb-ml-place thumb-post-tl) + (newthumb-ml-place web-post-bl) + (newthumb-bl-place thumb-post-tr) + (newthumb-bl-place web-post-br)) + (triangle-hulls ; bottom two + (newthumb-br-place web-post-tr) + (newthumb-br-place web-post-br) + (newthumb-mr-place web-post-tl) + (newthumb-mr-place web-post-bl)) + (triangle-hulls + (newthumb-mr-place web-post-tr) + (newthumb-mr-place web-post-br) + (newthumb-tr-place web-post-tl) + (newthumb-tr-place web-post-bl)) + (triangle-hulls + (newthumb-tr-place web-post-br) + (newthumb-tr-place web-post-bl) + (newthumb-mr-place web-post-br)) + (triangle-hulls ; between top row and bottom row + (newthumb-br-place web-post-tl) + (newthumb-bl-place web-post-bl) + (newthumb-br-place web-post-tr) + (newthumb-bl-place web-post-br) + (newthumb-mr-place web-post-tl) + (newthumb-ml-place web-post-bl) + (newthumb-mr-place web-post-tr) + (newthumb-ml-place web-post-br) + (newthumb-tr-place web-post-tl) + (newthumb-tl-place web-post-bl) + (newthumb-tr-place web-post-tr) + (newthumb-tl-place web-post-br) + ) + (triangle-hulls ; top two to the main keyboard, starting on the left + (newthumb-ml-place thumb-post-tl) + (key-place (+ innercol-offset 0) cornerrow web-post-bl) + (newthumb-ml-place thumb-post-tr) + (key-place (+ innercol-offset 0) cornerrow web-post-br) + (newthumb-tl-place web-post-tl) + (key-place (+ innercol-offset 1) cornerrow web-post-bl) + (newthumb-tl-place web-post-tr) + (key-place (+ innercol-offset 1) cornerrow web-post-br) + (key-place (+ innercol-offset 2) lastrow web-post-tl) + (key-place (+ innercol-offset 2) lastrow web-post-bl) + (newthumb-tl-place web-post-tr) + (key-place (+ innercol-offset 2) lastrow web-post-bl) + (newthumb-tl-place web-post-br) + (key-place (+ innercol-offset 2) lastrow web-post-br) + (key-place (+ innercol-offset 3) lastrow web-post-bl) + (newthumb-tl-place web-post-br) + (newthumb-tr-place web-post-tr)) + (triangle-hulls + (key-place (+ innercol-offset 3) lastrow web-post-tr) + (key-place (+ innercol-offset 3) cornerrow web-post-br) + (key-place (+ innercol-offset 3) lastrow web-post-tl) + (key-place (+ innercol-offset 3) cornerrow web-post-bl)) + (triangle-hulls + (key-place (+ innercol-offset 2) lastrow web-post-tr) + (key-place (+ innercol-offset 2) lastrow web-post-br) + (key-place (+ innercol-offset 3) cornerrow web-post-bl) + (key-place (+ innercol-offset 3) lastrow web-post-bl)) + (triangle-hulls + (newthumb-tr-place web-post-br) + (newthumb-tr-place web-post-tr) + (key-place (+ innercol-offset 3) lastrow web-post-bl)) + (triangle-hulls + (key-place (+ innercol-offset 1) cornerrow web-post-br) + (key-place (+ innercol-offset 2) lastrow web-post-tl) + (key-place (+ innercol-offset 2) cornerrow web-post-bl) + (key-place (+ innercol-offset 2) lastrow web-post-tr) + (key-place (+ innercol-offset 2) cornerrow web-post-br) + (key-place (+ innercol-offset 3) cornerrow web-post-bl)) + (if (true? extra-row) + (union + (triangle-hulls + (key-place (+ innercol-offset 3) lastrow web-post-tr) + (key-place (+ innercol-offset 3) lastrow web-post-br) + (key-place (+ innercol-offset 4) lastrow web-post-tl) + (key-place (+ innercol-offset 4) lastrow web-post-bl)) + (triangle-hulls + (key-place (+ innercol-offset 3) lastrow web-post-tr) + (key-place (+ innercol-offset 3) cornerrow web-post-br) + (key-place (+ innercol-offset 4) lastrow web-post-tl) + (key-place (+ innercol-offset 4) cornerrow web-post-bl))) + (union + (triangle-hulls + (key-place (+ innercol-offset 3) lastrow web-post-tr) + (key-place (+ innercol-offset 3) lastrow web-post-br) + (key-place (+ innercol-offset 4) cornerrow web-post-bl)) + (triangle-hulls + (key-place (+ innercol-offset 3) lastrow web-post-tr) + (key-place (+ innercol-offset 3) cornerrow web-post-br) + (key-place (+ innercol-offset 4) cornerrow web-post-bl)))))) + + +;switching connectors, switchplates, etc. depending on thumb-style used +(cond +(= thumb-style "default") (when true +(def thumb-type thumb) +(def thumb-connector-type thumb-connectors) +(def thumbcaps-type thumbcaps) +(def thumbcaps-fill-type thumbcaps-fill))) + +(cond +(= thumb-style "new") (when true +(def thumb-type newthumb) +(def thumb-connector-type newthumb-connectors) +(def thumbcaps-type newthumbcaps) +(def thumbcaps-fill-type newthumbcaps-fill))) + +(cond +(= thumb-style "mini") (when true +(def thumb-type minithumb) +(def thumb-connector-type minithumb-connectors) +(def thumbcaps-type minithumbcaps) +(def thumbcaps-fill-type minithumbcaps-fill))) ;;;;;;;;;; ;; Case ;; @@ -858,6 +1059,71 @@ (key-wall-brace lastcol extra-cornerrow 0 -1 web-post-br lastcol extra-cornerrow 1 0 web-post-br) ))) +(def new-thumb-wall + (union + ; thumb walls + (wall-brace newthumb-mr-place 0 -1 web-post-br newthumb-tr-place 0 -1 web-post-br) + (wall-brace newthumb-mr-place 0 -1 web-post-br newthumb-mr-place 0 -1 web-post-bl) + (wall-brace newthumb-br-place 0 -1 web-post-br newthumb-br-place 0 -1 web-post-bl) + (wall-brace newthumb-bl-place -0.3 1 thumb-post-tr newthumb-bl-place 0 1 thumb-post-tl) + (wall-brace newthumb-br-place -1 0 web-post-tl newthumb-br-place -1 0 web-post-bl) + (wall-brace newthumb-bl-place -1 0 thumb-post-tl newthumb-bl-place -1 0 web-post-bl) + ; newthumb corners + (wall-brace newthumb-br-place -1 0 web-post-bl newthumb-br-place 0 -1 web-post-bl) + (wall-brace newthumb-bl-place -1 0 thumb-post-tl newthumb-bl-place 0 1 thumb-post-tl) + ; newthumb tweeners + (wall-brace newthumb-mr-place 0 -1.15 web-post-bl newthumb-br-place 0 -1 web-post-br) + (wall-brace newthumb-bl-place -1 0 web-post-bl newthumb-br-place -1 0 web-post-tl) + (wall-brace newthumb-tr-place 0 -1 minithumb-post-br (partial key-place (+ innercol-offset 3) lastrow) 0 -1 web-post-bl) + ; clunky bit on the top left newthumb connection (normal connectors don't work well) + (bottom-hull + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate2 -1 0) web-post)) + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate3 -1 0) web-post)) + (newthumb-bl-place (translate (wall-locate2 -0.3 1) thumb-post-tr)) + (newthumb-bl-place (translate (wall-locate3 -0.3 1) thumb-post-tr))) + (hull + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate2 -1 0) web-post)) + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate3 -1 0) web-post)) + (newthumb-bl-place (translate (wall-locate2 -0.3 1) thumb-post-tr)) + (newthumb-bl-place (translate (wall-locate3 -0.3 1) thumb-post-tr)) + (newthumb-ml-place thumb-post-tl)) + (hull + (left-key-place (- cornerrow innercol-offset) -1 web-post) + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate1 -1 0) web-post)) + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate2 -1 0) web-post)) + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate3 -1 0) web-post)) + (newthumb-ml-place thumb-post-tl)) + (hull + (left-key-place (- cornerrow innercol-offset) -1 web-post) + (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate1 -1 0) web-post)) + (key-place 0 (- cornerrow innercol-offset) web-post-bl) + (newthumb-ml-place thumb-post-tl)) + (hull + (newthumb-bl-place thumb-post-tr) + (newthumb-bl-place (translate (wall-locate1 -0.3 1) thumb-post-tr)) + (newthumb-bl-place (translate (wall-locate2 -0.3 1) thumb-post-tr)) + (newthumb-bl-place (translate (wall-locate3 -0.3 1) thumb-post-tr)) + (newthumb-ml-place thumb-post-tl)) + ; connectors below the inner column to the thumb & second column + (if (true? inner-column) + (union + (hull + (key-place 0 (dec cornerrow) web-post-bl) + (key-place 0 (dec cornerrow) web-post-br) + (key-place 0 cornerrow web-post-tr)) + (hull + (key-place 0 cornerrow web-post-tr) + (key-place 1 cornerrow web-post-tl) + (key-place 1 cornerrow web-post-bl)) + (hull + (key-place 0 (dec cornerrow) web-post-bl) + (key-place 0 cornerrow web-post-tr) + (key-place 1 cornerrow web-post-bl)) + (hull + (key-place 0 (dec cornerrow) web-post-bl) + (key-place 1 cornerrow web-post-bl) + (newthumb-ml-place thumb-post-tl)))))) + (def mini-thumb-wall (union ; thumb walls @@ -963,7 +1229,7 @@ (left-key-place (- cornerrow innercol-offset) -1 web-post) (left-key-place (- cornerrow innercol-offset) -1 (translate (wall-locate1 -1 0) web-post)) (key-place 0 (- cornerrow innercol-offset) web-post-bl) - (key-place 0 (- cornerrow innercol-offset) (translate (wall-locate1 -1 0) web-post-bl)) + (key-place 0 (- cornerrow innercol-offset) (translate (wall-locate1 0 0) web-post-bl)) (thumb-tl-place thumb-post-tl)) ; connectors below the inner column to the thumb & second column (if (true? inner-column) @@ -990,8 +1256,19 @@ (thumb-ml-place (translate (wall-locate2 -0.3 1) web-post-tr)) (thumb-ml-place (translate (wall-locate3 -0.3 1) web-post-tr)) (thumb-tl-place thumb-post-tl)))) + +;switching walls depending on thumb-style used +(cond +(= thumb-style "default") (when true +(def thumb-wall-type default-thumb-wall))) -(if (true? mini-thumb) (def thumb-wall-type mini-thumb-wall) (def thumb-wall-type default-thumb-wall)) +(cond +(= thumb-style "new") (when true +(def thumb-wall-type new-thumb-wall))) + +(cond +(= thumb-style "mini") (when true +(def thumb-wall-type mini-thumb-wall))) (def case-walls (union @@ -1026,17 +1303,23 @@ (case nrows 4 (def holder-offset -3.5) 5 (def holder-offset 0) - 6 (def holder-offset 2.2) - ) + 6 (def holder-offset 3.2)) + (if (and (false? inner-column) (= nrows 6)) (def holder-offset (- holder-offset 1)) ) + +(case nrows + 4 (def notch-offset 3.15) + 5 (def notch-offset 0) + 6 (def notch-offset -5.07)) ; Cutout for controller/trrs jack holder (def usb-holder-ref (key-position 0 0 (map - (wall-locate2 0 -1) [0 (/ mount-height 2) 0]))) (def usb-holder-position (map + [(+ 18.8 holder-offset) 18.7 1.3] [(first usb-holder-ref) (second usb-holder-ref) 2])) -(def usb-holder-cube (cube 28.666 30 12.6)) -(def usb-holder-space (translate (map + usb-holder-position [-1.5 (* -1 wall-thickness) 3]) usb-holder-cube)) +(def usb-holder-cube (cube 28.666 30 19.8)) +(def usb-holder-space (translate (map + usb-holder-position [-1.5 (* -1 wall-thickness) 6.6]) usb-holder-cube)) +(def usb-holder-notch (translate (map + usb-holder-position [-1.5 (+ 4.4 notch-offset) 6.6]) (cube 31.366 1.3 19.8))) ; Screw insert definition & position (defn screw-insert-shape [bottom-radius top-radius height] @@ -1057,12 +1340,12 @@ (->> (screw-insert-shape bottom-radius top-radius height) (translate (map + offset [(first position) (second position) (/ height 2)]))))) -(defn screw-insert-all-shapes [bottom-radius top-radius height] + (defn screw-insert-all-shapes [bottom-radius top-radius height] (union (screw-insert 0 0 bottom-radius top-radius height [7 6.5 0]) - (screw-insert 0 lastrow bottom-radius top-radius height [9 -6.5 0]) + (screw-insert 0 lastrow bottom-radius top-radius height [13 4 0]) (screw-insert lastcol lastrow bottom-radius top-radius height [7 14 0]) (screw-insert lastcol 0 bottom-radius top-radius height [1 7 0]) - (screw-insert 2 lastrow bottom-radius top-radius height [15 3.2 0]))) + (screw-insert (+ 1 innercol-offset) lastrow bottom-radius top-radius height [13 -7 0]))) ; Hole Depth Y: 4.4 (def screw-insert-height 4) @@ -1131,6 +1414,7 @@ (difference (union case-walls screw-insert-outers) usb-holder-space + usb-holder-notch screw-insert-holes)) (translate [0 0 -20] (cube 350 350 40)))) @@ -1141,19 +1425,9 @@ (write-scad (mirror [-1 0 0] model-right))) (spit "things/right-test.scad" - (write-scad - (union - key-holes - key-holes-inner - pinky-connectors - extra-connectors - connectors - inner-connectors - thumb - thumb-connectors - case-walls - thumbcaps - caps))) + (write-scad (union model-right + thumbcaps-type + caps))) (spit "things/right-plate.scad" (write-scad @@ -1168,10 +1442,10 @@ extra-connectors connectors inner-connectors - thumb - thumb-connectors + thumb-type + thumb-connector-type case-walls - thumbcaps-fill + thumbcaps-fill-type caps-fill screw-insert-outers) (translate [0 0 -10] screw-insert-screw-holes)))))) diff --git a/things/controller holder (elite-c).stl b/things/controller holder (elite-c).stl index 28db35c..8f92c8f 100644 Binary files a/things/controller holder (elite-c).stl and b/things/controller holder (elite-c).stl differ diff --git a/things/controller holder.stl b/things/controller holder.stl index 54ac989..7341f27 100644 Binary files a/things/controller holder.stl and b/things/controller holder.stl differ diff --git a/things/shim.stl b/things/shim.stl new file mode 100644 index 0000000..8d412e0 Binary files /dev/null and b/things/shim.stl differ