-rw-r--r-- | delta.jscad | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/delta.jscad b/delta.jscad index 85cf254..9061c28 100644 --- a/delta.jscad +++ b/delta.jscad | |||
@@ -108,48 +108,49 @@ var CD = { | |||
108 | rv.circumscription_r = | 108 | rv.circumscription_r = |
109 | CONFIG.base.sl/2/Math.cos(Math.PI/6); | 109 | CONFIG.base.sl/2/Math.cos(Math.PI/6); |
110 | rv.outer_inscription_r = | 110 | rv.outer_inscription_r = |
111 | Math.sqrt(Math.pow(rv.circumscription_r,2)- | 111 | Math.sqrt(Math.pow(rv.circumscription_r,2)- |
112 | Math.pow(CONFIG.base.sl/2,2)); | 112 | Math.pow(CONFIG.base.sl/2,2)); |
113 | rv.mid_inscription_r = | 113 | rv.mid_inscription_r = |
114 | rv.outer_inscription_r-CONFIG.extrusion.w/2; | 114 | rv.outer_inscription_r-CONFIG.extrusion.w/2; |
115 | rv.inner_inscription_r = | 115 | rv.inner_inscription_r = |
116 | rv.outer_inscription_r-CONFIG.extrusion.w; | 116 | rv.outer_inscription_r-CONFIG.extrusion.w; |
117 | // TODO: properly calculate | 117 | // TODO: properly calculate |
118 | rv.column_r = rv.circumscription_r - 48.29; | 118 | rv.column_r = rv.circumscription_r - 48.29; |
119 | return rv; | 119 | return rv; |
120 | })(), | 120 | })(), |
121 | duetholder: (function() { | 121 | duetholder: (function() { |
122 | var rv = {}; | 122 | var rv = {}; |
123 | var s = CONFIG.base.sl; | 123 | var s = CONFIG.base.sl; |
124 | var l = CONFIG.duet.hole_spacing.x; | 124 | var l = CONFIG.duet.hole_spacing.x; |
125 | var w = CONFIG.duet.hole_spacing.y; | 125 | var w = CONFIG.duet.hole_spacing.y; |
126 | var h = s*Math.cos(Math.PI/6); | 126 | var h = s*Math.cos(Math.PI/6); |
127 | var h1 = h*(1-l/s); | 127 | var h1 = h*(1-l/s); |
128 | rv.distance = (h1-w)/3; // hole to side | 128 | rv.distance = (h1-w)/3; // hole to side |
129 | return rv; | 129 | return rv; |
130 | })() | 130 | })() |
131 | }; | 131 | }; |
132 | console.log(CONFIG); console.log(CD); | ||
132 | 133 | ||
133 | var U = { | 134 | var U = { |
134 | hypotenuse: function(a,b) { | 135 | hypotenuse: function(a,b) { |
135 | return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); | 136 | return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); |
136 | }, | 137 | }, |
137 | peek: function(x,m) { | 138 | peek: function(x,m) { |
138 | console.log(x,m); | 139 | console.log(x,m); |
139 | return x; | 140 | return x; |
140 | } | 141 | } |
141 | }; | 142 | }; |
142 | 143 | ||
143 | /* {h:,w:} */ | 144 | /* {h:,w:} */ |
144 | function nut(o) { | 145 | function nut(o) { |
145 | var rv = CSG.cylinder({ | 146 | var rv = CSG.cylinder({ |
146 | start:[0,0,0],end:[0,0,o.h], | 147 | start:[0,0,0],end:[0,0,o.h], |
147 | radius: o.w/2/Math.cos(Math.PI/6), | 148 | radius: o.w/2/Math.cos(Math.PI/6), |
148 | resolution: 6 | 149 | resolution: 6 |
149 | }); | 150 | }); |
150 | rv.properties.axis_connector = new CSG.Connector([0,0,0],[0,0,1],[0,1,0]); | 151 | rv.properties.axis_connector = new CSG.Connector([0,0,0],[0,0,1],[0,1,0]); |
151 | return rv; | 152 | return rv; |
152 | } | 153 | } |
153 | 154 | ||
154 | var E3DV6 = { | 155 | var E3DV6 = { |
155 | dimensions: { | 156 | dimensions: { |