Skip to content

Commit 681f1d9

Browse files
committed
flattened, combined halves, need to work on walls
1 parent 29e33f0 commit 681f1d9

File tree

6 files changed

+51575
-32308
lines changed

6 files changed

+51575
-32308
lines changed

src/dactyl_keyboard/dactyl.clj

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,28 @@
1515
(def nrows 4)
1616
(def ncols 5)
1717

18-
(def α (/ π 12)) ; curvature along the columns
19-
(def β (/ π 36)) ; curvature along the rows
18+
(def α (/ π 360)) ; curvature along the columns
19+
(def β (/ π 360)) ; curvature along the rows
2020
(def centerrow (- nrows 3)) ; controls front-back tilt
2121
(def centercol 4) ; controls left-right tilt / tenting (higher number is more tenting)
22-
(def tenting-angle (/ π 10)) ; or, change this for more precise tenting control
22+
(def tenting-angle (/ π 7)) ; or, change this for more precise tenting control
2323
(def column-style
2424
(if (> nrows 5) :orthographic :standard)) ; options include :standard, :orthographic, and :fixed
2525
; (def column-style :fixed)
2626
(def pinky-15u false)
2727

2828
(defn column-offset [column] (cond
29-
(= column 2) [0 2.82 -4.5] ; middle finger
30-
(= column 3) [0 0 -2] ; ring finger
29+
(= column 2) [0 0 0] ; middle finger
30+
(= column 3) [0 0 0] ; ring finger
3131
;(>= column 4) [0 0 0] ; keep pinky in line with first rows
32-
(>= column 4) [0 -3 -3] ; original [0 -5.8 5.64]
32+
(>= column 4) [0 0 0] ; original [0 -5.8 5.64]
3333
:else [0 0 0]))
3434

3535
(def thumb-offsets [6 -3 7]) ; location of thumb cluster relative to main keyboard body
3636

37-
(def keyboard-z-offset 10) ; controls overall height; original=9 with centercol=3; use 16 for centercol=2
37+
(def keyboard-z-offset 8) ; controls overall height; original=9 with centercol=3; use 16 for centercol=2
3838

39-
(def extra-width 2) ; extra space between the base of keys; original= 2
39+
(def extra-width 1.5) ; extra space between the base of keys; original= 2
4040
(def extra-height 0.5) ; original= 0.5
4141

4242
(def wall-z-offset -3) ; original=-15 length of the first downward-sloping part of the wall (negative)
@@ -527,17 +527,21 @@
527527
(for [x (range 0 ncols)] (key-wall-brace x 0 0 1 web-post-tl x 0 0 1 web-post-tr))
528528
(for [x (range 1 ncols)] (key-wall-brace x 0 0 1 web-post-tl (dec x) 0 0 1 web-post-tr))
529529

530+
;TODO: figure out how to get these walls angled differently
530531
; left wall
531-
(for [y (range 0 lastrow)] (union (wall-brace (partial left-key-place y 1) -1 0 web-post (partial left-key-place y -1) -1 0 web-post)
532+
(for [y (range 0 lastrow)] (union
532533
(hull (key-place 0 y web-post-tl)
533534
(key-place 0 y web-post-bl)
534535
(left-key-place y 1 web-post)
535536
(left-key-place y -1 web-post))))
536-
(for [y (range 1 lastrow)] (union (wall-brace (partial left-key-place (dec y) -1) -1 0 web-post (partial left-key-place y 1) -1 0 web-post)
537-
(hull (key-place 0 y web-post-tl)
538-
(key-place 0 (dec y) web-post-bl)
539-
(left-key-place y 1 web-post)
540-
(left-key-place (dec y) -1 web-post))))
537+
538+
; tweeners
539+
;; (for [y (range 1 lastrow)] (union (wall-brace (partial left-key-place (dec y) -1) -1 0 web-post (partial left-key-place y 1) -1 0 web-post)
540+
;; (hull (key-place 0 y web-post-tl)
541+
;; (key-place 0 (dec y) web-post-bl)
542+
;; (left-key-place y 1 web-post)
543+
;; (left-key-place (dec y) -1 web-post))))
544+
; left/front corner
541545
(wall-brace (partial key-place 0 0) 0 1 web-post-tl (partial left-key-place 0 1) 0 1 web-post)
542546
(wall-brace (partial left-key-place 0 1) 0 1 web-post (partial left-key-place 0 1) -1 0 web-post)
543547
; front wall
@@ -716,8 +720,46 @@
716720
screw-insert-holes))
717721
(translate [0 0 -20] (cube 350 350 40))))
718722

723+
724+
(def model-right-squish (difference
725+
(union
726+
key-holes
727+
pinky-connectors
728+
pinky-walls
729+
connectors
730+
thumb
731+
thumb-connectors
732+
(difference (union case-walls
733+
screw-insert-outers
734+
)
735+
screw-insert-holes))
736+
(translate [0 0 -20] (cube 350 350 40))))
737+
738+
739+
(def model-left-squish (difference
740+
(union
741+
key-holes
742+
pinky-connectors
743+
pinky-walls
744+
connectors
745+
thumb
746+
thumb-connectors
747+
(difference (union case-walls
748+
screw-insert-outers
749+
usb-holder-holder
750+
trrs-holder)
751+
usb-holder-space
752+
usb-jack
753+
trrs-holder-hole
754+
screw-insert-holes))
755+
(translate [0 0 -20] (cube 350 350 40))))
756+
719757
(spit "things/right.scad"
720-
(write-scad model-right))
758+
(write-scad
759+
(union
760+
(translate[ 87 0 0] ( rotate (/ π 15) [0 0 1] model-right-squish))
761+
(translate[ -87 0 0] ( rotate (/ π 15) [0 0 -1] (mirror [-1 0 0] model-left-squish)))
762+
)))
721763

722764
(spit "things/left.scad"
723765
(write-scad (mirror [-1 0 0] model-right)))

0 commit comments

Comments
 (0)