summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-01-13 10:12:48 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-13 10:12:48 (UTC)
commit8d9ad499fcb960e825f92580bf96215c73ee91ea (patch) (unidiff)
treeaf555e75ef30508deaa2707480a89e6b43542984
parent10e299ccac1b7e6ab393df441e7e6e24baefc3ca (diff)
downloadredelta-8d9ad499fcb960e825f92580bf96215c73ee91ea.zip
redelta-8d9ad499fcb960e825f92580bf96215c73ee91ea.tar.gz
redelta-8d9ad499fcb960e825f92580bf96215c73ee91ea.tar.bz2
colors
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--delta.jscad4
1 files changed, 3 insertions, 1 deletions
diff --git a/delta.jscad b/delta.jscad
index 83122af..54f1f86 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -77,49 +77,51 @@ var CONFIG = {
77 screw: { 77 screw: {
78 d: 2, h: 10/2-2, 78 d: 2, h: 10/2-2,
79 s: 1.3, // screw shell 79 s: 1.3, // screw shell
80 o: [-9.5/2,9.5/2].map(function(x) { 80 o: [-9.5/2,9.5/2].map(function(x) {
81 return -19.8/2+x; 81 return -19.8/2+x;
82 }) 82 })
83 }, 83 },
84 switch_x: 2.5 84 switch_x: 2.5
85 }, 85 },
86 guide: { 86 guide: {
87 width: 3, height: 5+1, length: 6 87 width: 3, height: 5+1, length: 6
88 }, 88 },
89 fanholder: { 89 fanholder: {
90 r: 30, 90 r: 30,
91 screw: { d: 3, m: 2.5/*margin*/ }, 91 screw: { d: 3, m: 2.5/*margin*/ },
92 w: 3 92 w: 3
93 } 93 }
94 }, 94 },
95 nut: { h: 2.3, w: 5.5 }, 95 nut: { h: 2.3, w: 5.5 },
96 color: { 96 color: {
97 extrusion: [0.8, 0.8, 0.8, 0.8], 97 extrusion: [0.8, 0.8, 0.8, 0.8],
98 pcb: [ 0, 0.3, 0.2, 0.8 ], 98 pcb: [ 0, 0.3, 0.2, 0.8 ],
99 bulk: [ .9, .9, .9, .2 ], 99 bulk: [ .9, .9, .9, .2 ],
100 parts: [ 0, 0.8, 0, 0.9 ], 100 parts: [ 0, 0.8, 0, 0.9 ],
101 softparts: [ 0, 0, 0.8, 0.9 ] 101 softparts: [ 0, 0, 0.8, 0.9 ],
102 heatbed: [0.8, 0.8, 0.8, 0.8 ],
103 glass: [0.9, 0.9, 0.9, 0.7 ]
102 } 104 }
103}; 105};
104 106
105var CD = { 107var CD = {
106 base: (function(){ 108 base: (function(){
107 var rv = {}; 109 var rv = {};
108 rv.circumscription_r = 110 rv.circumscription_r =
109 CONFIG.base.sl/2/Math.cos(Math.PI/6); 111 CONFIG.base.sl/2/Math.cos(Math.PI/6);
110 rv.outer_inscription_r = 112 rv.outer_inscription_r =
111 Math.sqrt(Math.pow(rv.circumscription_r,2)- 113 Math.sqrt(Math.pow(rv.circumscription_r,2)-
112 Math.pow(CONFIG.base.sl/2,2)); 114 Math.pow(CONFIG.base.sl/2,2));
113 rv.mid_inscription_r = 115 rv.mid_inscription_r =
114 rv.outer_inscription_r-CONFIG.extrusion.w/2; 116 rv.outer_inscription_r-CONFIG.extrusion.w/2;
115 rv.inner_inscription_r = 117 rv.inner_inscription_r =
116 rv.outer_inscription_r-CONFIG.extrusion.w; 118 rv.outer_inscription_r-CONFIG.extrusion.w;
117 // TODO: properly calculate 119 // TODO: properly calculate
118 rv.column_r = rv.circumscription_r - 48.29; 120 rv.column_r = rv.circumscription_r - 48.29;
119 return rv; 121 return rv;
120 })(), 122 })(),
121 duetholder: (function() { 123 duetholder: (function() {
122 var rv = {}; 124 var rv = {};
123 var s = CONFIG.base.sl; 125 var s = CONFIG.base.sl;
124 var l = CONFIG.duet.hole_spacing.x; 126 var l = CONFIG.duet.hole_spacing.x;
125 var w = CONFIG.duet.hole_spacing.y; 127 var w = CONFIG.duet.hole_spacing.y;