Documentation, renaming, housekeeping
parent
6d408ebf19
commit
ca25f54102
22
README.md
22
README.md
|
@ -1,34 +1,38 @@
|
|||
## Fork info
|
||||
|
||||
I (bchociej) forked this repo from [adereth/ergodox-tent](https://github.com/adereth/ergodox-tent) with the intention of implementing new features, including tilting, native millimeter dimensions, and full-hand version.
|
||||
I (bchociej) forked this repo from [adereth/ergodox-tent](https://github.com/adereth/ergodox-tent) and implemented new features, including tilting, native millimeter dimensions, and full-hand version.
|
||||
|
||||
I didn't know what I was doing when I cloned this repo. Maybe you don't either! Here's how I got things working:
|
||||
|
||||
1. Install leiningen (a shell script) into my $PATH from here: [lein](https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein)
|
||||
2. Install openscad (I used my package manager for this)
|
||||
3. Start lein from the root directory of this repo using `$ lein repl`
|
||||
4. Make some changes to [src/ergodox_tent/core.clj](core.clj)
|
||||
5. In the lein REPL (at the `user=> ` prompt), enter `(use 'ergodox-tent.core :reload)`
|
||||
6. Open [tent.scad](resources/tent.scad) in openscad
|
||||
4. Make some changes to [src/ergodox_stand/core.clj](core.clj)
|
||||
5. In the lein REPL (at the `user=> ` prompt), enter `(use 'ergodox-stand.core :reload)`
|
||||
6. Open [stand.scad](resources/stand.scad) in openscad
|
||||
7. Repeat steps 4-6
|
||||
|
||||
You can use openscad to Build (F6) and Export to .stl format too.
|
||||
|
||||
To fulfill the various licenses: this is based on work by [adereth](https://github.com/adereth/), and I have modified it as described above. I hereby release modifications under the same licensing conditions as the original work.
|
||||
|
||||
# ergodox-tent
|
||||
|
||||
A tent for the [Ergodox acrylic case designed by Litster](http://deskthority.net/wiki/ErgoDox). The design was implemented using [clj-scad](https://github.com/farrellm/scad-clj).
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## Usage
|
||||
|
||||
If you're just interested in printing your own, just download [resources/tent.stl](resources/tent.stl) and feed it into your favorite software for 3D printing.
|
||||
If you're just interested in printing your own, just download [resources/stand.stl](resources/stand.stl) and feed it into your favorite software for 3D printing.
|
||||
|
||||
If you'd like to contribute, I'd prefer you make changes to the original Clojure source. I've also included the [generated SCAD](resources/tent.scad) if you want to experiment and don't have a Clojure environment set up.
|
||||
If you'd like to contribute, I'd prefer you make changes to the original Clojure source. I've also included the [generated SCAD](resources/stand.scad) if you want to experiment and don't have a Clojure environment set up.
|
||||
|
||||
## License
|
||||
|
||||
All source is distributed under the Eclipse Public License either version 1.0 or (at
|
||||
your option) any later version.
|
||||
|
||||
The tent design and all images are released under the [Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0)](http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
The stand design and all images are released under the [Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0)](http://creativecommons.org/licenses/by-sa/4.0/)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(defproject ergodox-tent "0.1.0-SNAPSHOT"
|
||||
:description "A tent for the Ergodox"
|
||||
:url "https://github.com/adereth/ergodox-tent"
|
||||
(defproject ergodox-stand "0.1.0-SNAPSHOT"
|
||||
:description "A customizable tent-tilt stand for the Ergodox based on adereth's"
|
||||
:url "https://github.com/bchociej/ergodox-stand"
|
||||
:license {:name "Eclipse Public License"
|
||||
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
||||
:dependencies [[org.clojure/clojure "1.5.1"]
|
||||
|
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,106 @@
|
|||
union () {
|
||||
difference () {
|
||||
rotate (a=3.5, v=[1,0,0]) {
|
||||
rotate (a=-6.0, v=[0,1,0]) {
|
||||
difference () {
|
||||
translate ([0,0,25]) {
|
||||
union () {
|
||||
cube([161.65099999999998, 200.139, 50], center=true);
|
||||
cube([147.087, 214.703, 50], center=true);
|
||||
translate ([73.5435,100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.5435,100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.5435,-100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
translate ([73.5435,-100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
translate ([74.6725,101.19850000000001,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([21.189500000000002,103.0185,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([-73.8805,101.19850000000001,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([6.525499999999994,-26.522499999999994,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([-73.8805,-100.41249999999998,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([72.7965,-100.80449999999998,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([-10,0,25]) {
|
||||
cube([157.087, 190.139, 60], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
translate ([0,0,-20]) {
|
||||
cube([1000, 1000, 100], center=true);
|
||||
}
|
||||
}
|
||||
translate ([-24,-16,0]) {
|
||||
mirror ([1,0,0]) {
|
||||
difference () {
|
||||
rotate (a=3.5, v=[1,0,0]) {
|
||||
rotate (a=-6.0, v=[0,1,0]) {
|
||||
difference () {
|
||||
translate ([0,0,25]) {
|
||||
union () {
|
||||
cube([161.65099999999998, 200.139, 50], center=true);
|
||||
cube([147.087, 214.703, 50], center=true);
|
||||
translate ([73.5435,100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.5435,100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.5435,-100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
translate ([73.5435,-100.0695,0]) {
|
||||
cylinder (h=50, r=7.282, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
translate ([74.6725,101.19850000000001,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([21.189500000000002,103.0185,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([-73.8805,101.19850000000001,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([6.525499999999994,-26.522499999999994,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([-73.8805,-100.41249999999998,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([72.7965,-100.80449999999998,0]) {
|
||||
cylinder (h=250, r=3.282, center=true);
|
||||
}
|
||||
translate ([-10,0,25]) {
|
||||
cube([157.087, 190.139, 60], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
translate ([0,0,-20]) {
|
||||
cube([1000, 1000, 100], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
|
@ -1,77 +0,0 @@
|
|||
union () {
|
||||
difference () {
|
||||
rotate (a=0.0, v=[0,0,0]) {
|
||||
union () {
|
||||
difference () {
|
||||
translate ([0,0,15]) {
|
||||
union () {
|
||||
cube([161.933, 124.712, 30], center=true);
|
||||
cube([147.369, 139.276, 30], center=true);
|
||||
translate ([73.6845,62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.6845,62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.6845,-62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
translate ([73.6845,-62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
translate ([74.8135,63.485,0]) {
|
||||
cylinder (h=150, r=3.282, center=true);
|
||||
}
|
||||
translate ([21.330500000000008,65.30499999999999,0]) {
|
||||
cylinder (h=150, r=3.282, center=true);
|
||||
}
|
||||
translate ([6.666499999999999,-64.235,0]) {
|
||||
cylinder (h=150, r=3.282, center=true);
|
||||
}
|
||||
}
|
||||
translate ([0,0,-30]) {
|
||||
difference () {
|
||||
translate ([0,0,15]) {
|
||||
union () {
|
||||
cube([161.933, 124.712, 30], center=true);
|
||||
cube([147.369, 139.276, 30], center=true);
|
||||
translate ([73.6845,62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.6845,62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
translate ([-73.6845,-62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
translate ([73.6845,-62.356,0]) {
|
||||
cylinder (h=30, r=7.282, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
translate ([74.8135,63.485,0]) {
|
||||
cylinder (h=150, r=3.282, center=true);
|
||||
}
|
||||
translate ([21.330500000000008,65.30499999999999,0]) {
|
||||
cylinder (h=150, r=3.282, center=true);
|
||||
}
|
||||
translate ([6.666499999999999,-64.235,0]) {
|
||||
cylinder (h=150, r=3.282, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
translate ([0,0,-250]) {
|
||||
cube([700, 700, 500], center=true);
|
||||
}
|
||||
translate ([-375,0,0]) {
|
||||
cube([700, 700, 500], center=true);
|
||||
}
|
||||
translate ([0,0,100]) {
|
||||
cube([132.6321, 118.4764, 300], center=true);
|
||||
}
|
||||
}
|
||||
}
|
6610
resources/tent.stl
6610
resources/tent.stl
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,158 @@
|
|||
(ns ergodox-stand.core
|
||||
(:use [scad-clj.scad])
|
||||
(:use [scad-clj.model]))
|
||||
|
||||
;; Note:
|
||||
;; adereth's version used SVG pixels (1/90th of an inch) for dimensions
|
||||
;; I changed everything to mm for my own sanity
|
||||
|
||||
|
||||
|
||||
(def standard-depth 124.712)
|
||||
(def fullhand-depth 200.139)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; CUSTOMIZABLES
|
||||
|
||||
; Which case do you want to support?
|
||||
(def rect-depth fullhand-depth) ; choose fullhand-depth or standard-depth
|
||||
|
||||
; Angles for tenting and tilting, to your preferences
|
||||
(def tent-degrees 6) ; side-to-side angle
|
||||
(def tilt-degrees 3.5) ; front-to-back angle
|
||||
|
||||
; Baseline height determines how far down to clip the bottom flat.
|
||||
; You probably want a complete model with at least 5mm extra for screws and
|
||||
; nuts to hang down.
|
||||
(def baseline-height-adjust 20) ; adjust the baseline for clipping the bottom
|
||||
|
||||
; Tenting and tilting affects how close the mirrored pieces sit to one
|
||||
; another. Adjust these values so that the gaps are small but at least a
|
||||
; few mm apart.
|
||||
(def mirror-x-gap 12) ; side-to-side gap between mirrored pieces
|
||||
(def mirror-y-gap 4) ; back-to-front gap between mirrored pieces
|
||||
|
||||
;; STOP CUSTOMIZING
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(def rect-width 147.087)
|
||||
(def profile-height 50)
|
||||
(def curve-radius 7.282)
|
||||
(def total-width (+ rect-width (* 2 curve-radius)))
|
||||
(def total-depth (+ rect-depth (* 2 curve-radius)))
|
||||
|
||||
(def tent-slope (* tent-degrees (/ Math/PI 180)))
|
||||
(def tilt-slope (* tilt-degrees (/ Math/PI 180)))
|
||||
|
||||
(def screw-radius 1.641)
|
||||
(def nut-radius (* 2 screw-radius))
|
||||
|
||||
(def nut-hole
|
||||
(cylinder nut-radius (* 5 profile-height)))
|
||||
|
||||
(def main-base
|
||||
(difference
|
||||
|
||||
;; BASIC SHAPE
|
||||
; rectangular prism with rounded edges
|
||||
(translate [0 0 (/ profile-height 2)]
|
||||
(union
|
||||
; main area
|
||||
(cube total-width rect-depth profile-height)
|
||||
(cube rect-width total-depth profile-height)
|
||||
|
||||
; rounded edges
|
||||
(translate [(/ rect-width 2) (/ rect-depth 2) 0] (cylinder curve-radius profile-height))
|
||||
(translate [(/ rect-width -2) (/ rect-depth 2) 0] (cylinder curve-radius profile-height))
|
||||
(translate [(/ rect-width -2) (/ rect-depth -2) 0] (cylinder curve-radius profile-height))
|
||||
(translate [(/ rect-width 2) (/ rect-depth -2) 0] (cylinder curve-radius profile-height))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
;; NUT HOLES
|
||||
; top right
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129)
|
||||
(+ (/ rect-depth 2) 1.129)
|
||||
0]))
|
||||
|
||||
; top middle
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129 -53.483)
|
||||
(+ (/ rect-depth 2) 1.129 1.82)
|
||||
0]))
|
||||
|
||||
; top left
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129 -148.553)
|
||||
(+ (/ rect-depth 2) 1.129)
|
||||
0]))
|
||||
|
||||
; this hole never gets printed
|
||||
; middle left (bottom left on standard case)
|
||||
; (->> nut-hole
|
||||
; (translate [(+ (/ rect-width 2) 1.129 -148.553)
|
||||
; (+ (/ rect-depth 2) 1.129 -124.315)
|
||||
; 0]))
|
||||
|
||||
; middle-middle (bottom middle on standard case)
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129 -68.147)
|
||||
(+ (/ rect-depth 2) 1.129 -127.721)
|
||||
0]))
|
||||
|
||||
; bottom left
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129 -148.553)
|
||||
(+ (/ rect-depth 2) 1.129 -201.611)
|
||||
0]))
|
||||
|
||||
; bottom right
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129 -1.876)
|
||||
(+ (/ rect-depth 2) 1.129 -202.003)
|
||||
0]))
|
||||
|
||||
|
||||
|
||||
;; HOLLOWED-OUT AREA
|
||||
; remove the left side so 2 pieces can be made more efficiently
|
||||
(translate [-10 0 (/ profile-height 2)]
|
||||
(cube (+ rect-width 10) (- rect-depth 10) (+ profile-height 10))
|
||||
)
|
||||
) ; difference
|
||||
) ; def main-base
|
||||
|
||||
(def rotated-clipped
|
||||
(difference
|
||||
(->> main-base (rotate (- tent-slope) [0 1 0]) (rotate tilt-slope [1 0 0]))
|
||||
(translate [0 0 (- baseline-height-adjust)] (cube 1000 1000 100))
|
||||
)
|
||||
)
|
||||
|
||||
(def mirrored
|
||||
(union
|
||||
rotated-clipped
|
||||
(->> rotated-clipped
|
||||
(mirror [1 0 0])
|
||||
(translate [(- (+ mirror-x-gap 12)) (- (+ mirror-y-gap 12)) 0])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(spit "resources/stand.scad" (write-scad mirrored))
|
|
@ -1,88 +0,0 @@
|
|||
(ns ergodox-tent.core
|
||||
(:use [scad-clj.scad])
|
||||
(:use [scad-clj.model]))
|
||||
|
||||
|
||||
;; Set your tent and tilt angles in degrees here
|
||||
|
||||
(def tent-degrees 6)
|
||||
(def tilt-degrees 3.5)
|
||||
|
||||
|
||||
|
||||
|
||||
;; Note that I did this using the values from lister's case design.
|
||||
;; I got all the numbers from the SVG, which represents all values
|
||||
;; in pixels, with 90 pixels per inch. At the end, I scale everything
|
||||
;; to be in mm.
|
||||
|
||||
(def rect-depth 124.712) ; mm
|
||||
(def rect-width 147.369) ; mm
|
||||
(def rect-height 30) ; mm
|
||||
|
||||
(def curve-radius 7.282) ; mm
|
||||
|
||||
(def total-width (+ rect-width (* 2 curve-radius)))
|
||||
(def total-depth (+ rect-depth (* 2 curve-radius)))
|
||||
|
||||
(def tent-slope (* tent-degrees (/ Math/PI 180)))
|
||||
(def tilt-slope (* tilt-degrees (/ Math/PI 180)))
|
||||
|
||||
(def screw-radius 1.641) ; mm
|
||||
(def nut-radius (* 2 screw-radius))
|
||||
|
||||
(def nut-hole
|
||||
(cylinder nut-radius (* 5 rect-height)))
|
||||
|
||||
(def main-base
|
||||
(difference
|
||||
(translate [0 0 (/ rect-height 2)]
|
||||
(union
|
||||
(cube total-width rect-depth rect-height)
|
||||
(cube rect-width total-depth rect-height)
|
||||
(translate [(/ rect-width 2) (/ rect-depth 2) 0] (cylinder curve-radius rect-height))
|
||||
(translate [(/ rect-width -2) (/ rect-depth 2) 0] (cylinder curve-radius rect-height))
|
||||
(translate [(/ rect-width -2) (/ rect-depth -2) 0] (cylinder curve-radius rect-height))
|
||||
(translate [(/ rect-width 2) (/ rect-depth -2) 0] (cylinder curve-radius rect-height))))
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129) ; mm
|
||||
(+ (/ rect-depth 2) 1.129) ; mm
|
||||
0]))
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129 -53.483) ; mm
|
||||
(+ (/ rect-depth 2) 1.129 1.82) ; mm
|
||||
0]))
|
||||
(->> nut-hole
|
||||
(translate [(+ (/ rect-width 2) 1.129 -68.147) ; mm
|
||||
(+ (/ rect-depth 2) 1.129 -127.72) ; mm
|
||||
0]))))
|
||||
|
||||
|
||||
; (def shift-down-height
|
||||
; (let [x (* (/ total-width 2) (Math/tan tent-slope))]
|
||||
; (* (- rect-height x)
|
||||
; (Math/cos tent-slope))))
|
||||
|
||||
(def flush-top
|
||||
(->> (union main-base (translate [0 0 (- rect-height)] main-base))
|
||||
(rotate 0 [0 0 0])
|
||||
; (rotate (- tent-slope) [0 1 0])
|
||||
; (rotate tilt-slope [1 0 0])
|
||||
; (translate [0 0 (- shift-down-height)])
|
||||
))
|
||||
|
||||
(def tent
|
||||
(difference
|
||||
flush-top
|
||||
(translate [0 0 -250] (cube 700 700 500))
|
||||
(translate [-375 0 -0] (cube 700 700 500))
|
||||
(translate [0 0 100] (cube (* 0.9 rect-width) (* 0.95 rect-depth) 300))))
|
||||
|
||||
(spit "resources/tent.scad"
|
||||
(write-scad
|
||||
(union
|
||||
tent
|
||||
; (->> tent
|
||||
; (mirror [1 0 0])
|
||||
; (translate [50 (- 20) 0]))
|
||||
)))
|
|
@ -1,6 +1,6 @@
|
|||
(ns ergodox-tent.core-test
|
||||
(ns ergodox-stand.core-test
|
||||
(:require [clojure.test :refer :all]
|
||||
[ergodox-tent.core :refer :all]))
|
||||
[ergodox-stand.core :refer :all]))
|
||||
|
||||
(deftest a-test
|
||||
(testing "FIXME, I fail."
|
Loading…
Reference in New Issue