|
15 | 15 | (def nrows 4)
|
16 | 16 | (def ncols 5)
|
17 | 17 |
|
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 |
20 | 20 | (def centerrow (- nrows 3)) ; controls front-back tilt
|
21 | 21 | (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 |
23 | 23 | (def column-style
|
24 | 24 | (if (> nrows 5) :orthographic :standard)) ; options include :standard, :orthographic, and :fixed
|
25 | 25 | ; (def column-style :fixed)
|
26 | 26 | (def pinky-15u false)
|
27 | 27 |
|
28 | 28 | (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 |
31 | 31 | ;(>= 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] |
33 | 33 | :else [0 0 0]))
|
34 | 34 |
|
35 | 35 | (def thumb-offsets [6 -3 7]) ; location of thumb cluster relative to main keyboard body
|
36 | 36 |
|
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 |
38 | 38 |
|
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 |
40 | 40 | (def extra-height 0.5) ; original= 0.5
|
41 | 41 |
|
42 | 42 | (def wall-z-offset -3) ; original=-15 length of the first downward-sloping part of the wall (negative)
|
|
527 | 527 | (for [x (range 0 ncols)] (key-wall-brace x 0 0 1 web-post-tl x 0 0 1 web-post-tr))
|
528 | 528 | (for [x (range 1 ncols)] (key-wall-brace x 0 0 1 web-post-tl (dec x) 0 0 1 web-post-tr))
|
529 | 529 |
|
| 530 | + ;TODO: figure out how to get these walls angled differently |
530 | 531 | ; 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 |
532 | 533 | (hull (key-place 0 y web-post-tl)
|
533 | 534 | (key-place 0 y web-post-bl)
|
534 | 535 | (left-key-place y 1 web-post)
|
535 | 536 | (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 |
541 | 545 | (wall-brace (partial key-place 0 0) 0 1 web-post-tl (partial left-key-place 0 1) 0 1 web-post)
|
542 | 546 | (wall-brace (partial left-key-place 0 1) 0 1 web-post (partial left-key-place 0 1) -1 0 web-post)
|
543 | 547 | ; front wall
|
|
716 | 720 | screw-insert-holes))
|
717 | 721 | (translate [0 0 -20] (cube 350 350 40))))
|
718 | 722 |
|
| 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 | + |
719 | 757 | (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 | + ))) |
721 | 763 |
|
722 | 764 | (spit "things/left.scad"
|
723 | 765 | (write-scad (mirror [-1 0 0] model-right)))
|
|
0 commit comments