summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-01-06 22:33:26 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 22:33:26 (UTC)
commit70221c34a5021b3a63aa7fe7a1e925404a36cc95 (patch) (unidiff)
tree3b95fb6effe03e653893241695b27c77787d593b
parent286fd5e24710cc535cfd07888cdcef02af466d30 (diff)
downloadredelta-70221c34a5021b3a63aa7fe7a1e925404a36cc95.zip
redelta-70221c34a5021b3a63aa7fe7a1e925404a36cc95.tar.gz
redelta-70221c34a5021b3a63aa7fe7a1e925404a36cc95.tar.bz2
reference axes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad10
1 files changed, 10 insertions, 0 deletions
diff --git a/delta.jscad b/delta.jscad
index 0ef25e3..baa977d 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -502,48 +502,58 @@ var E2020 = {
502 roundradius: [e.roundius,e.roundius,0] 502 roundradius: [e.roundius,e.roundius,0]
503 }); 503 });
504 var fw = [0,90,180,270]; // four winds 504 var fw = [0,90,180,270]; // four winds
505 var iy = e.outer/2-e.T.depth; 505 var iy = e.outer/2-e.T.depth;
506 var ix = e.T.width/2-(e.outer/2-iy-e.thickness-e.T.thickness); 506 var ix = e.T.width/2-(e.outer/2-iy-e.thickness-e.T.thickness);
507 rv = rv.union(fw.map(function(w) { 507 rv = rv.union(fw.map(function(w) {
508 return CAG.fromPoints([ 508 return CAG.fromPoints([
509 [ e.slot_width/2,e.outer/2], 509 [ e.slot_width/2,e.outer/2],
510 [ e.slot_width/2,e.outer/2-e.thickness], 510 [ e.slot_width/2,e.outer/2-e.thickness],
511 [ e.T.width/2,e.outer/2-e.thickness], 511 [ e.T.width/2,e.outer/2-e.thickness],
512 [ e.T.width/2,e.outer/2-e.thickness-e.T.thickness], 512 [ e.T.width/2,e.outer/2-e.thickness-e.T.thickness],
513 [ ix, iy ], 513 [ ix, iy ],
514 [ -ix, iy ], 514 [ -ix, iy ],
515 [ -e.T.width/2,e.outer/2-e.thickness-e.T.thickness], 515 [ -e.T.width/2,e.outer/2-e.thickness-e.T.thickness],
516 [ -e.T.width/2,e.outer/2-e.thickness], 516 [ -e.T.width/2,e.outer/2-e.thickness],
517 [ -e.slot_width/2,e.outer/2-e.thickness], 517 [ -e.slot_width/2,e.outer/2-e.thickness],
518 [ -e.slot_width/2,e.outer/2], 518 [ -e.slot_width/2,e.outer/2],
519 ]).extrude({offset:[0,0,l+thickness]}).rotateZ(w); 519 ]).extrude({offset:[0,0,l+thickness]}).rotateZ(w);
520 })); 520 }));
521 rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); 521 rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]);
522 return rv; 522 return rv;
523 } 523 }
524}; 524};
525 525
526
527function refaxes(o) {
528 if(!o) o = {};
529 var l = o.l||20, g = o.g||0.7;
530 return union([
531 CSG.cylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]),
532 CSG.cylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]),
533 CSG.cylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g])
534 ]);
535}
526function P(x) { 536function P(x) {
527 return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0); 537 return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0);
528} 538}
529 539
530function main(params) { 540function main(params) {
531 return P(E2020.extrusion({l:40})).setColor(0.7,0.7,0.7,0.7); 541 return P(E2020.extrusion({l:40})).setColor(0.7,0.7,0.7,0.7);
532} 542}
533 543
534function _main(params) { 544function _main(params) {
535 var e = EFFECTOR.effector(); 545 var e = EFFECTOR.effector();
536 var hs = E3DV6.heatsink(); 546 var hs = E3DV6.heatsink();
537 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); 547 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0);
538 var ms = microswitch(); 548 var ms = microswitch();
539 var hd = EFFECTOR.hinged({ 549 var hd = EFFECTOR.hinged({
540 microswitch:ms,effector:e 550 microswitch:ms,effector:e
541 }); 551 });
542 ms = ms.connectTo( 552 ms = ms.connectTo(
543 ms.properties.screw_connector[0], 553 ms.properties.screw_connector[0],
544 hd.properties.microswitch_screw_connector[0], 554 hd.properties.microswitch_screw_connector[0],
545 false, 0); 555 false, 0);
546 var hdhd = EFFECTOR.split_hinged(hd); 556 var hdhd = EFFECTOR.split_hinged(hd);
547 var fh = EFFECTOR.fanholder(); 557 var fh = EFFECTOR.fanholder();
548 return union({ 558 return union({
549 platform: e, 559 platform: e,