This commit is contained in:
2021-06-30 12:47:52 +03:00
parent 7b26338842
commit 093fab023a
17 changed files with 78 additions and 565538 deletions

View File

@@ -4,6 +4,9 @@
:main dactyl-keyboard.dactyl
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:plugins [[lein-auto "0.1.3"]
[lein-exec "0.3.7"]]
:aliases {"generate" ["exec" "-p" "src/dactyl_keyboard/dactyl.clj"]}
:dependencies [[org.clojure/clojure "1.7.0"]
[unicode-math "0.2.0"]
[scad-clj "0.4.0"]])

View File

@@ -13,10 +13,10 @@
;; Shape parameters ;;
;;;;;;;;;;;;;;;;;;;;;;
(def nrows 4)
(def ncols 5)
(def nrows 5)
(def ncols 6)
(def α (/ π 12)) ; curvature of the columns
(def α (/ π 11)) ; curvature of the columns
(def β (/ π 36)) ; curvature of the rows
(def centerrow (- nrows 3)) ; controls front-back tilt
(def centercol 3) ; controls left-right tilt / tenting (higher number is more tenting)
@@ -583,17 +583,37 @@
))
(def rj9-start (map + [0 -3 0] (key-position 0 0 (map + (wall-locate3 0 1) [0 (/ mount-height 2) 0]))))
(def rj9-start (map + [3 -2 0] (key-position 0 0 (map + (wall-locate3 0 1) [0 (/ mount-height 2) 0]))))
(def rj9-position [(first rj9-start) (second rj9-start) 11])
(def rj9-cube (cube 14.78 13 22.38))
(def rj9-cube (cube 11.5 4 16))
(def rj9-space (translate rj9-position rj9-cube))
(def rj9-holder (translate rj9-position
(difference rj9-cube
(union (translate [0 2 0] (cube 10.78 9 18.38))
(translate [0 0 5] (cube 10.78 13 5))))))
(def usb-holder-position (key-position 1 0 (map + (wall-locate2 0 1) [0 (/ mount-height 2) 0])))
(def usb-holder-size [6.5 10.0 13.6])
(def usbc-start (map + [17.5 -2 0] (key-position 0 0 (map + (wall-locate3 0 1) [0 (/ mount-height 2) 0]))))
(def usbc-position [(first usbc-start) (second usbc-start) 4.75])
(def usbc-cube (cube 9.5 4 3.5))
(def usbc-space (translate usbc-position usbc-cube))
(def reset-start (map + [17.5 -2 0] (key-position 0 0 (map + (wall-locate3 0 1) [0 (/ mount-height 2) 0]))))
(def reset-position [(first reset-start) (second reset-start) 11])
(def reset-cylinder (rotate (/ π 2) [1 0 0] (binding [*fn* 30] (cylinder 2 5))))
(def reset-space (translate reset-position
reset-cylinder) )
;(union (cylinder [bottom-radius top-radius] height)
;(def rj9-holder (translate rj9-position
; (difference rj9-cube
; (union (translate [0 2 0] (cube 10.78 9 18.38))
; (translate [0 0 5] (cube 10.78 13 5))))))
;(def usbc-holder (translate usbc-position
; (difference usbc-cube
; (union (translate [0 2 0] (cube 10.78 9 18.38))
; (translate [0 0 5] (cube 10.78 13 5))))))
;(def usb-holder-position key-position 1 0 (map + (wall-locate2 1 1) [0 (/ mount-height 2) 0])))
(def usb-holder-position (map + [12.5 -2 0] (key-position 0 0 (map + (wall-locate3 0 1) [0 (/ mount-height 2) 0]))))
(def usb-holder-size [9.5 10 3.5])
(def usb-holder-thickness 4)
(def usb-holder
(->> (cube (+ (first usb-holder-size) usb-holder-thickness) (second usb-holder-size) (+ (last usb-holder-size) usb-holder-thickness))
@@ -700,13 +720,16 @@
thumb-connectors
(difference (union case-walls
screw-insert-outers
teensy-holder
usb-holder)
;teensy-holder
;usb-holder
)
rj9-space
usb-holder-hole
usbc-space
reset-space
;usb-holder-hole
screw-insert-holes)
rj9-holder
wire-posts
;rj9-holder
;wire-posts
; thumbcaps
; caps
)
@@ -719,44 +742,44 @@
(spit "things/left.scad"
(write-scad (mirror [-1 0 0] model-right)))
(spit "things/right-test.scad"
(write-scad
(union
key-holes
connectors
thumb
thumb-connectors
case-walls
thumbcaps
caps
teensy-holder
rj9-holder
usb-holder-hole
; usb-holder-hole
; ; teensy-holder-hole
; screw-insert-outers
; teensy-screw-insert-holes
; teensy-screw-insert-outers
; usb-cutout
; rj9-space
; wire-posts
)))
;(spit "things/right-test.scad"
; (write-scad
; (union
; key-holes
; connectors
; thumb
; thumb-connectors
; case-walls
; thumbcaps
; caps
; teensy-holder
; rj9-holder
; usb-holder-hole
; ; usb-holder-hole
; ; ; teensy-holder-hole
; ; screw-insert-outers
; ; teensy-screw-insert-holes
; ; teensy-screw-insert-outers
; ; usb-cutout
; ; rj9-space
; ; wire-posts
; )))
(spit "things/right-plate.scad"
(write-scad
(cut
(translate [0 0 -0.1]
(difference (union case-walls
teensy-holder
; rj9-holder
screw-insert-outers)
(translate [0 0 -10] screw-insert-screw-holes))
))))
;(spit "things/right-plate.scad"
; (write-scad
; (cut
; (translate [0 0 -0.1]
; (difference (union case-walls
; teensy-holder
; ; rj9-holder
; screw-insert-outers)
; (translate [0 0 -10] screw-insert-screw-holes))
; ))))
(spit "things/test.scad"
(write-scad
(difference usb-holder usb-holder-hole)))
;(spit "things/test.scad"
; (write-scad
; (difference usb-holder usb-holder-hole)))
(defn -main [dum] 1) ; dummy to make it easier to batch
(defn -main [dum] 1) ; dummy to make it easier to batch

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
things/left.stl Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
things/right.stl Normal file

Binary file not shown.