Create a handy holder bracket for the PCB to print on a 3D printer.

This commit is contained in:
Aaron Mueller 2014-07-03 22:09:42 +02:00
parent f94a573995
commit b86ec5e729
3 changed files with 2652 additions and 0 deletions

2606
pcbracket/pcbracket.stl Normal file

File diff suppressed because it is too large Load diff

7
pcbracket/project.clj Normal file
View file

@ -0,0 +1,7 @@
(defproject pcbracket "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[scad-clj "0.2.1"]])

View file

@ -0,0 +1,39 @@
(ns pcbracket.core
(:require [scad-clj.model :refer :all]
[scad-clj.scad :refer :all]))
(defn print-scad [shape]
(spit "pcbracket.scad" (write-scad shape)))
(defn shoe []
"Draw a handy shoe holder for a M3 screw. Scale this to 0.75 will still fit.
This bracket can be used on other projects too to make a latch to hold the
rest of the workpiece on a flat surface."
(difference
(cube 10 10 4)
(translate [0 -0.5 0] (cylinder 3 7))
(translate [0 -1 3] (cube 8 10 7))
(->>
(cube 12 15 4)
(rotate (/ pi 12) [1 0 0])
(translate [0 -2 3]))))
(defn corpus []
(difference
(cube 40 24.5 4)
(translate [0 0 2] (cube 36 20.5 4))
(translate [-1 2 0] (cube 31 13.5 7))
(translate [-20 4 2] (cube 5 10 4))
(translate [-1.5 -14 1.0] (cube 33 14 10))
(translate [21 -5.25 1] (cube 10 10 4))))
(defn scene []
(union
(corpus)
(scale [0.75 0.75 0.75] (translate [-31.5 -8 -0.7] (rotate (/ pi 2) [0 0 -1] (shoe))))
(scale [0.75 0.75 0.75] (translate [31.5 8 -0.7] (rotate (/ pi 2) [0 0 1] (shoe))))
(scale [0.75 0.75 0.75] (translate [-15 21 -0.7] (rotate pi [0 0 1] (shoe))))))
(print-scad
(color [0.8 0.8 0.8] (scene)))