-rw-r--r-- | delta.jscad | 4 |
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 | |||
@@ -53,97 +53,99 @@ var CONFIG = { | |||
53 | effector: { | 53 | effector: { |
54 | h: 6, | 54 | h: 6, |
55 | o: 20,// offset to the rod mounts line | 55 | o: 20,// offset to the rod mounts line |
56 | rods_apart: 40, | 56 | rods_apart: 40, |
57 | cone: { shell: 1, angle: Math.PI/6 }, | 57 | cone: { shell: 1, angle: Math.PI/6 }, |
58 | rodend: { | 58 | rodend: { |
59 | joint_w: 7,// thickness of the joint | 59 | joint_w: 7,// thickness of the joint |
60 | screw_l: 20-1, // 20 with the head | 60 | screw_l: 20-1, // 20 with the head |
61 | screw_d: 3 | 61 | screw_d: 3 |
62 | }, | 62 | }, |
63 | hotend: { margin: 2 }, | 63 | hotend: { margin: 2 }, |
64 | hinge: { | 64 | hinge: { |
65 | d: 3, w: 5, margin: 2.5, | 65 | d: 3, w: 5, margin: 2.5, |
66 | h: 1+(6+3.7)/2, // elevation + grove + top | 66 | h: 1+(6+3.7)/2, // elevation + grove + top |
67 | e: 1 // elevation | 67 | e: 1 // elevation |
68 | }, | 68 | }, |
69 | clamp: { | 69 | clamp: { |
70 | shell: 4.6, | 70 | shell: 4.6, |
71 | d: 3, | 71 | d: 3, |
72 | margin: 2.5, | 72 | margin: 2.5, |
73 | split: 0.6 | 73 | split: 0.6 |
74 | }, | 74 | }, |
75 | mswitch: { | 75 | mswitch: { |
76 | size: [ 19.8, 6, 10 ], | 76 | size: [ 19.8, 6, 10 ], |
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 | ||
105 | var CD = { | 107 | var 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; |
126 | var h = s*Math.cos(Math.PI/6); | 128 | var h = s*Math.cos(Math.PI/6); |
127 | var h1 = h*(1-l/s); | 129 | var h1 = h*(1-l/s); |
128 | rv.distance = (h1-w)/3; // hole to side | 130 | rv.distance = (h1-w)/3; // hole to side |
129 | return rv; | 131 | return rv; |
130 | })() | 132 | })() |
131 | }; | 133 | }; |
132 | console.log(CONFIG); console.log(CD); | 134 | console.log(CONFIG); console.log(CD); |
133 | 135 | ||
134 | var U = { | 136 | var U = { |
135 | hypotenuse: function(a,b) { | 137 | hypotenuse: function(a,b) { |
136 | return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); | 138 | return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); |
137 | }, | 139 | }, |
138 | peek: function(x,m) { | 140 | peek: function(x,m) { |
139 | console.log(x,m); | 141 | console.log(x,m); |
140 | return x; | 142 | return x; |
141 | } | 143 | } |
142 | }; | 144 | }; |
143 | 145 | ||
144 | /* {h:,w:} */ | 146 | /* {h:,w:} */ |
145 | function nut(o) { | 147 | function nut(o) { |
146 | var rv = CSG.cylinder({ | 148 | var rv = CSG.cylinder({ |
147 | start:[0,0,0],end:[0,0,o.h], | 149 | start:[0,0,0],end:[0,0,o.h], |
148 | radius: o.w/2/Math.cos(Math.PI/6), | 150 | radius: o.w/2/Math.cos(Math.PI/6), |
149 | resolution: 6 | 151 | resolution: 6 |