summaryrefslogtreecommitdiffabout
path: root/delta.jscad
authorMichael Krelin <hacker@klever.net>2016-01-06 23:45:19 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 23:45:19 (UTC)
commitf669f3d2881597cc0d86e4b55332b541883c8205 (patch) (unidiff)
tree7728a7362ed323703267620ec680a01a99ca3879 /delta.jscad
parentd9e0cf63db5c64802dfbba0dc76506b9b0d5127a (diff)
downloadredelta-f669f3d2881597cc0d86e4b55332b541883c8205.zip
redelta-f669f3d2881597cc0d86e4b55332b541883c8205.tar.gz
redelta-f669f3d2881597cc0d86e4b55332b541883c8205.tar.bz2
more colors
Diffstat (limited to 'delta.jscad') (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad4
1 files changed, 3 insertions, 1 deletions
diff --git a/delta.jscad b/delta.jscad
index f06870e..ef0d4ec 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -59,49 +59,51 @@ var CONFIG = {
59 split: 0.6 59 split: 0.6
60 }, 60 },
61 mswitch: { 61 mswitch: {
62 size: [ 19.8, 6, 10 ], 62 size: [ 19.8, 6, 10 ],
63 screw: { 63 screw: {
64 d: 2, h: 10/2-2, 64 d: 2, h: 10/2-2,
65 s: 1.3, // screw shell 65 s: 1.3, // screw shell
66 o: [-9.5/2,9.5/2].map(function(x) { 66 o: [-9.5/2,9.5/2].map(function(x) {
67 return -19.8/2+x; 67 return -19.8/2+x;
68 }) 68 })
69 }, 69 },
70 switch_x: 2.5 70 switch_x: 2.5
71 }, 71 },
72 guide: { 72 guide: {
73 width: 3, height: 5+1, length: 6 73 width: 3, height: 5+1, length: 6
74 }, 74 },
75 fanholder: { 75 fanholder: {
76 r: 30, 76 r: 30,
77 screw: { d: 3, m: 2.5/*margin*/ }, 77 screw: { d: 3, m: 2.5/*margin*/ },
78 w: 3 78 w: 3
79 } 79 }
80 }, 80 },
81 nut: { h: 2.3, w: 5.5 }, 81 nut: { h: 2.3, w: 5.5 },
82 color: { 82 color: {
83 extrusion: [0.8, 0.8, 0.8, 0.8] 83 extrusion: [0.8, 0.8, 0.8, 0.8],
84 pcb: [ 0, 0.3, 0.2, 0.8 ],
85 bulk: [ .9, .9, .9, .2 ]
84 } 86 }
85}; 87};
86 88
87var CD = { 89var CD = {
88 base: (function(){ 90 base: (function(){
89 var rv = {}; 91 var rv = {};
90 rv.circumscription_r = 92 rv.circumscription_r =
91 CONFIG.base.sl/2/Math.cos(Math.PI/6); 93 CONFIG.base.sl/2/Math.cos(Math.PI/6);
92 rv.outer_inscription_r = 94 rv.outer_inscription_r =
93 Math.sqrt(Math.pow(rv.circumscription_r,2)- 95 Math.sqrt(Math.pow(rv.circumscription_r,2)-
94 Math.pow(CONFIG.base.sl/2,2)); 96 Math.pow(CONFIG.base.sl/2,2));
95 rv.mid_inscription_r = 97 rv.mid_inscription_r =
96 rv.outer_inscription_r-CONFIG.extrusion.w/2; 98 rv.outer_inscription_r-CONFIG.extrusion.w/2;
97 rv.inner_inscription_r = 99 rv.inner_inscription_r =
98 rv.outer_inscription_r-CONFIG.extrusion.w/2; 100 rv.outer_inscription_r-CONFIG.extrusion.w/2;
99 // TODO: properly calculate 101 // TODO: properly calculate
100 rv.column_r = rv.circumscription_r - 48.29; 102 rv.column_r = rv.circumscription_r - 48.29;
101 return rv; 103 return rv;
102 })() 104 })()
103}; 105};
104 106
105var U = { 107var U = {
106 hypotenuse: function(a,b) { 108 hypotenuse: function(a,b) {
107 return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); 109 return Math.sqrt(Math.pow(a,2)+Math.pow(b,2));