-rw-r--r-- | delta.jscad | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/delta.jscad b/delta.jscad index 4716875..a1be156 100644 --- a/delta.jscad +++ b/delta.jscad @@ -96,48 +96,58 @@ var CONFIG = { color: { extrusion: [0.8, 0.8, 0.8, 0.8], pcb: [ 0, 0.3, 0.2, 0.8 ], bulk: [ .9, .9, .9, .2 ], parts: [ 0, 0.8, 0, 0.9 ], softparts: [ 0, 0, 0.8, 0.9 ] } }; var CD = { base: (function(){ var rv = {}; rv.circumscription_r = CONFIG.base.sl/2/Math.cos(Math.PI/6); rv.outer_inscription_r = Math.sqrt(Math.pow(rv.circumscription_r,2)- Math.pow(CONFIG.base.sl/2,2)); rv.mid_inscription_r = rv.outer_inscription_r-CONFIG.extrusion.w/2; rv.inner_inscription_r = rv.outer_inscription_r-CONFIG.extrusion.w/2; // TODO: properly calculate rv.column_r = rv.circumscription_r - 48.29; return rv; + })(), + duetholder: (function() { + var rv = {}; + var s = CONFIG.base.sl; + var l = CONFIG.duet.hole_spacing.x; + var w = CONFIG.duet.hole_spacing.y; + var h = s*Math.cos(Math.PI/6); + var h1 = h*(1-l/s); + rv.distance = (h1-w)/3; // hole to side + return rv; })() }; var U = { hypotenuse: function(a,b) { return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); }, peek: function(x,m) { console.log(x,m); return x; } }; /* {h:,w:} */ function nut(o) { var rv = CSG.cylinder({ start:[0,0,0],end:[0,0,o.h], radius: o.w/2/Math.cos(Math.PI/6), resolution: 6 }); rv.properties.axis_connector = new CSG.Connector([0,0,0],[0,0,1],[0,1,0]); return rv; } |