Skip to content

Commit

Permalink
Quick and dirtly wrist rest
Browse files Browse the repository at this point in the history
  • Loading branch information
adereth committed Mar 10, 2017
1 parent f3feba5 commit 15b2488
Show file tree
Hide file tree
Showing 4 changed files with 1,021 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/dactyl_keyboard/util.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(ns dactyl-keyboard.util
(:refer-clojure :exclude [use import])
(:require [scad-clj.model :refer :all]))

(defn triangle-hulls [& shapes]
(apply union
(map (partial apply hull)
(partition 3 1 shapes))))

(defn bottom [height p]
(->> (project p)
(extrude-linear {:height height :twist 0 :convexity 0})
(translate [0 0 (/ height 2)])))

(defn bottom-hull [p]
(hull p (bottom 1 p)))
39 changes: 39 additions & 0 deletions src/dactyl_keyboard/wrist.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
(ns dactyl-keyboard.wrist
(:refer-clojure :exclude [use import])
(:require [scad-clj.scad :refer :all]
[scad-clj.model :refer :all]
[unicode-math.core :refer :all]
[dactyl-keyboard.util :refer :all]))

(def pad-corner-r 11)
(def pad-width 95)
(def pad-length 76.5)

(def stand-height 45)
(def stand-thickness 1.5)

(def bumper-diameter 9.6)
(def bumper-radius (/ bumper-diameter 2))

(def corner-circle (->> (cylinder pad-corner-r stand-thickness)
(translate [(- (/ pad-width 2) pad-corner-r)
(- (/ pad-length 2) pad-corner-r)
(+ stand-height (/ stand-thickness 2))])))

(def corner {:back-right corner-circle
:back-left (->> corner-circle (mirror [-1 0 0]))
:front-right (->> corner-circle (mirror [0 -1 0]))
:front-left (->> corner-circle (mirror [0 -1 0]) (mirror [-1 0 0])) })

(def wrist-rest
(union (hull (corner :back-right)
(corner :back-left)
(corner :front-right)
(corner :front-left))
(bottom-hull (corner :back-right))
(bottom-hull (corner :back-left))
(bottom-hull (corner :front-right))
(bottom-hull (corner :front-left))))

(spit "things/wrist.scad"
(write-scad wrist-rest))
96 changes: 96 additions & 0 deletions things/wrist.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
union () {
hull () {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
mirror ([-1, 0, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
mirror ([0, -1, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
mirror ([-1, 0, 0]) {
mirror ([0, -1, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
}
}
hull () {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
translate ([0, 0, 1/2]) {
linear_extrude (height=1, twist=0.0, convexity=0, center=true){
projection (cut = false) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
}
}
}
hull () {
mirror ([-1, 0, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
translate ([0, 0, 1/2]) {
linear_extrude (height=1, twist=0.0, convexity=0, center=true){
projection (cut = false) {
mirror ([-1, 0, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
}
}
}
}
hull () {
mirror ([0, -1, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
translate ([0, 0, 1/2]) {
linear_extrude (height=1, twist=0.0, convexity=0, center=true){
projection (cut = false) {
mirror ([0, -1, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
}
}
}
}
hull () {
mirror ([-1, 0, 0]) {
mirror ([0, -1, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
}
translate ([0, 0, 1/2]) {
linear_extrude (height=1, twist=0.0, convexity=0, center=true){
projection (cut = false) {
mirror ([-1, 0, 0]) {
mirror ([0, -1, 0]) {
translate ([73/2, 27.25, 45.75]) {
cylinder (h=1.5, r=11, center=true);
}
}
}
}
}
}
}
}
Loading

0 comments on commit 15b2488

Please sign in to comment.