summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-01-06 22:34:06 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 22:34:06 (UTC)
commit506bc3db8f3c1abdc97b9331ad4f038c7f851b51 (patch) (unidiff)
treeeed49b2e5a5b3b8466070ac651e744705619b626
parent70221c34a5021b3a63aa7fe7a1e925404a36cc95 (diff)
downloadredelta-506bc3db8f3c1abdc97b9331ad4f038c7f851b51.zip
redelta-506bc3db8f3c1abdc97b9331ad4f038c7f851b51.tar.gz
redelta-506bc3db8f3c1abdc97b9331ad4f038c7f851b51.tar.bz2
more configuration
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad30
1 files changed, 27 insertions, 3 deletions
diff --git a/delta.jscad b/delta.jscad
index baa977d..547b51e 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -1,23 +1,26 @@
1var PRINT = { 1var PRINT = {
2 layer_height: 0.2, 2 layer_height: 0.2,
3 extrusion_width: 0.4, 3 extrusion_width: 0.4,
4 4
5 fit_tolerance: .2, slide_tolerance: .4, play_tolerance: .6 5 fit_tolerance: .2, slide_tolerance: .4, play_tolerance: .6
6}; 6};
7 7
8var CONFIG = { 8var CONFIG = {
9 side: { 9 extrusion: {
10 w: 20
11 },
12 base: {
10 el: 240, // side extrusion length 13 el: 240, // side extrusion length
11 tl: 240+2*70, // triangle side length 14 sl: 240+2*70, // triangle side length
12 gap: 9 // vertical gap between side extrusions 15 gap: 9 // vertical gap between side extrusions
13 }, 16 },
14 column: { 17 column: {
15 h: 600 // column height 18 h: 600 // column height
16 }, 19 },
17 heatbed: { 20 heatbed: {
18 r: 220/2, // heatbed radius 21 r: 220/2, // heatbed radius
19 sr: 220/2-4.5,// radius of the screwholes circle 22 sr: 220/2-4.5,// radius of the screwholes circle
20 h: 3+1.5 // thickness (including insulation) 23 h: 3+1.5 // thickness (including insulation)
21 }, 24 },
22 glass: { 25 glass: {
23 r: 195/2, // glass radius 26 r: 195/2, // glass radius
@@ -61,25 +64,46 @@ var CONFIG = {
61 }, 64 },
62 switch_x: 2.5 65 switch_x: 2.5
63 }, 66 },
64 guide: { 67 guide: {
65 width: 3, height: 5+1, length: 6 68 width: 3, height: 5+1, length: 6
66 }, 69 },
67 fanholder: { 70 fanholder: {
68 r: 30, 71 r: 30,
69 screw: { d: 3, m: 2.5/*margin*/ }, 72 screw: { d: 3, m: 2.5/*margin*/ },
70 w: 3 73 w: 3
71 } 74 }
72 }, 75 },
73 nut: { h: 2.3, w: 5.5 } 76 nut: { h: 2.3, w: 5.5 },
77 color: {
78 extrusion: [0.8, 0.8, 0.8, 0.8]
79 }
80};
81
82var CD = {
83 base: (function(){
84 var rv = {};
85 rv.circumscription_r =
86 CONFIG.base.sl/2/Math.cos(Math.PI/6);
87 rv.outer_inscription_r =
88 Math.sqrt(Math.pow(rv.circumscription_r,2)-
89 Math.pow(CONFIG.base.sl/2,2));
90 rv.mid_inscription_r =
91 rv.outer_inscription_r-CONFIG.extrusion.w/2;
92 rv.inner_inscription_r =
93 rv.outer_inscription_r-CONFIG.extrusion.w/2;
94 // TODO: properly calculate
95 rv.column_r = rv.circumscription_r - 48.29;
96 return rv;
97 })()
74}; 98};
75 99
76var U = { 100var U = {
77 hypotenuse: function(a,b) { 101 hypotenuse: function(a,b) {
78 return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); 102 return Math.sqrt(Math.pow(a,2)+Math.pow(b,2));
79 }, 103 },
80 peek: function(x,m) { 104 peek: function(x,m) {
81 console.log(x,m); 105 console.log(x,m);
82 return x; 106 return x;
83 } 107 }
84}; 108};
85 109