summaryrefslogtreecommitdiffabout
path: root/delta.jscad
authorMichael Krelin <hacker@klever.net>2016-01-06 22:34:41 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 22:34:41 (UTC)
commit6be14d3c81d6ce000ed7964c51adf99049e4e19f (patch) (unidiff)
tree4be4ecda4fc2b06ee1b81b45da76e6de77ab952b /delta.jscad
parenta7f7cd089e5a0e29b6c6e25120a6e9ce83d830f3 (diff)
downloadredelta-6be14d3c81d6ce000ed7964c51adf99049e4e19f.zip
redelta-6be14d3c81d6ce000ed7964c51adf99049e4e19f.tar.gz
redelta-6be14d3c81d6ce000ed7964c51adf99049e4e19f.tar.bz2
three winds
Diffstat (limited to 'delta.jscad') (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad1
1 files changed, 1 insertions, 0 deletions
diff --git a/delta.jscad b/delta.jscad
index c134c29..9883003 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -528,48 +528,49 @@ var E2020 = {
528 roundradius: [e.roundius,e.roundius,0] 528 roundradius: [e.roundius,e.roundius,0]
529 }); 529 });
530 var fw = [0,90,180,270]; // four winds 530 var fw = [0,90,180,270]; // four winds
531 var iy = e.outer/2-e.T.depth; 531 var iy = e.outer/2-e.T.depth;
532 var ix = e.T.width/2-(e.outer/2-iy-e.thickness-e.T.thickness); 532 var ix = e.T.width/2-(e.outer/2-iy-e.thickness-e.T.thickness);
533 rv = rv.union(fw.map(function(w) { 533 rv = rv.union(fw.map(function(w) {
534 return CAG.fromPoints([ 534 return CAG.fromPoints([
535 [ e.slot_width/2,e.outer/2], 535 [ e.slot_width/2,e.outer/2],
536 [ e.slot_width/2,e.outer/2-e.thickness], 536 [ e.slot_width/2,e.outer/2-e.thickness],
537 [ e.T.width/2,e.outer/2-e.thickness], 537 [ e.T.width/2,e.outer/2-e.thickness],
538 [ e.T.width/2,e.outer/2-e.thickness-e.T.thickness], 538 [ e.T.width/2,e.outer/2-e.thickness-e.T.thickness],
539 [ ix, iy ], 539 [ ix, iy ],
540 [ -ix, iy ], 540 [ -ix, iy ],
541 [ -e.T.width/2,e.outer/2-e.thickness-e.T.thickness], 541 [ -e.T.width/2,e.outer/2-e.thickness-e.T.thickness],
542 [ -e.T.width/2,e.outer/2-e.thickness], 542 [ -e.T.width/2,e.outer/2-e.thickness],
543 [ -e.slot_width/2,e.outer/2-e.thickness], 543 [ -e.slot_width/2,e.outer/2-e.thickness],
544 [ -e.slot_width/2,e.outer/2], 544 [ -e.slot_width/2,e.outer/2],
545 ]).extrude({offset:[0,0,l+thickness]}).rotateZ(w); 545 ]).extrude({offset:[0,0,l+thickness]}).rotateZ(w);
546 })); 546 }));
547 rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); 547 rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]);
548 return rv; 548 return rv;
549 } 549 }
550}; 550};
551 551
552var THREEWINDS = [0,120,240];
552 553
553function refaxes(o) { 554function refaxes(o) {
554 if(!o) o = {}; 555 if(!o) o = {};
555 var l = o.l||20, g = o.g||0.7; 556 var l = o.l||20, g = o.g||0.7;
556 return union([ 557 return union([
557 CSG.cylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]), 558 CSG.cylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]),
558 CSG.cylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]), 559 CSG.cylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]),
559 CSG.cylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g]) 560 CSG.cylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g])
560 ]); 561 ]);
561} 562}
562function P(x) { 563function P(x) {
563 return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0); 564 return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0);
564} 565}
565 566
566function main(params) { 567function main(params) {
567 return P(E2020.extrusion({l:40})).setColor(0.7,0.7,0.7,0.7); 568 return P(E2020.extrusion({l:40})).setColor(0.7,0.7,0.7,0.7);
568} 569}
569 570
570function _main(params) { 571function _main(params) {
571 var e = EFFECTOR.effector(); 572 var e = EFFECTOR.effector();
572 var hs = E3DV6.heatsink(); 573 var hs = E3DV6.heatsink();
573 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); 574 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0);
574 var ms = microswitch(); 575 var ms = microswitch();
575 var hd = EFFECTOR.hinged({ 576 var hd = EFFECTOR.hinged({