|
13 | 13 | ;; Shape parameters ;;
|
14 | 14 | ;;;;;;;;;;;;;;;;;;;;;;
|
15 | 15 |
|
16 |
| -(def nrows 4) |
17 |
| -(def ncols 5) |
| 16 | +(def nrows 5) |
| 17 | +(def ncols 6) |
18 | 18 |
|
19 | 19 | (def α (/ π 12)) ; curvature of the columns
|
20 | 20 | (def β (/ π 36)) ; curvature of the rows
|
|
596 | 596 | (def teensy-height 12)
|
597 | 597 | (def teensy-length 33)
|
598 | 598 | (def teensy2-length 53)
|
599 |
| -(def teensy-pcb-thickness 1.6) |
| 599 | +(def teensy-pcb-thickness 2) |
600 | 600 | (def teensy-holder-width (+ 7 teensy-pcb-thickness))
|
601 | 601 | (def teensy-holder-height (+ 6 teensy-width))
|
602 | 602 | (def teensy-offset-height 5)
|
603 |
| -(def teensy-holder-length 72) |
604 |
| -(def teensy-holder-offset (/ teensy-holder-length -2)) |
605 | 603 | (def teensy-holder-top-length 18)
|
606 |
| -(def teensy-top-xy (key-position 0 0 (map + (wall-locate3 0 1) [(/ mount-width -2) (/ mount-height 2) 0]))) |
607 |
| -(def teensy-bot-xy (map + (key-position 0 2 (map + (wall-locate3 -1 0) [(/ mount-width -2) (/ mount-height 2) 0])) |
608 |
| - [(* 1 teensy-holder-width) 0 0])) |
609 |
| -(def teensy-holder-top-offset (/ teensy-holder-top-length -2)) |
610 |
| -(def teensy-holder-angle (Math/atan2 (- (first teensy-top-xy) (first teensy-bot-xy)) (- (second teensy-top-xy) (second teensy-bot-xy)))) |
| 604 | +(def teensy-top-xy (key-position 0 (- centerrow 1) (wall-locate3 -1 0))) |
| 605 | +(def teensy-bot-xy (key-position 0 (+ centerrow 1) (wall-locate3 -1 0))) |
| 606 | +(def teensy-holder-length (- (second teensy-top-xy) (second teensy-bot-xy))) |
| 607 | +(def teensy-holder-offset (/ teensy-holder-length -2)) |
| 608 | +(def teensy-holder-top-offset (- (/ teensy-holder-top-length 2) teensy-holder-length)) |
611 | 609 |
|
612 | 610 | (def teensy-holder
|
613 | 611 | (->>
|
|
621 | 619 | (->> (cube teensy-pcb-thickness teensy-holder-top-length 3)
|
622 | 620 | (translate [(+ (/ teensy-pcb-thickness 2) 3) teensy-holder-top-offset (+ 1.5 (/ teensy-width 2))]))
|
623 | 621 | (->> (cube 4 teensy-holder-top-length 4)
|
624 |
| - (translate [(+ teensy-pcb-thickness 5) teensy-holder-top-offset (+ 1 (/ teensy-width 2))])) |
625 |
| - (->> (cube teensy-holder-width 2 teensy-holder-height) |
626 |
| - (translate [(+ (/ teensy-holder-width 2)) -1 0]))) |
| 622 | + (translate [(+ teensy-pcb-thickness 5) teensy-holder-top-offset (+ 1 (/ teensy-width 2))]))) |
627 | 623 | (translate [(- teensy-holder-width) 0 0])
|
628 |
| - (rotate teensy-holder-angle [0 0 -1]) |
| 624 | + (translate [(- 1) 0 0]) |
629 | 625 | (translate [(first teensy-top-xy)
|
630 | 626 | (- (second teensy-top-xy) 1)
|
631 | 627 | (/ (+ 6 teensy-width) 2)])
|
|
634 | 630 | (def usb-cutout
|
635 | 631 | (->> (cube 8 30 12)
|
636 | 632 | (translate [-4 -5 0])
|
637 |
| - (rotate teensy-holder-angle [0 0 -1]) |
638 | 633 | (translate [(+ (first teensy-top-xy) 3)
|
639 | 634 | (+ (second teensy-top-xy) 0)
|
640 | 635 | (/ teensy-holder-height 2)])
|
|
643 | 638 | (def teensy-holder-hole
|
644 | 639 | (->> (cube teensy-holder-width 30 teensy-holder-height)
|
645 | 640 | (translate [(/ teensy-holder-width -2) -15 (/ teensy-holder-height 2)])
|
646 |
| - (rotate teensy-holder-angle [0 0 -1]) |
647 | 641 | (translate [(first teensy-top-xy)
|
648 | 642 | (- (second teensy-top-xy) 1)
|
649 | 643 | 0])))
|
|
686 | 680 | (->> shape
|
687 | 681 | (rotate (/ π 2) [0 -1 0])
|
688 | 682 | (translate [(- 3 teensy-holder-width (/ screw-insert-height 2)) (- (+ length 7)) 0])
|
689 |
| - (rotate teensy-holder-angle [0 0 -1]) |
690 | 683 | (translate [(first teensy-top-xy) (second teensy-top-xy) 15])
|
691 | 684 | )))
|
692 | 685 |
|
|
763 | 756 | case-walls
|
764 | 757 | thumbcaps
|
765 | 758 | caps
|
766 |
| - ; teensy-holder |
| 759 | + teensy-holder |
| 760 | + rj9-holder |
767 | 761 | ; ; teensy-holder-hole
|
768 | 762 | ; screw-insert-outers
|
769 | 763 | ; teensy-screw-insert-holes
|
|
0 commit comments