summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-01-06 21:38:22 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 21:38:22 (UTC)
commitbfc4a5d491d06a2300915abd3eb356c5656611ee (patch) (unidiff)
treec7abe2f15a291cdacb3fc88c398bba0b429e55b4
parent1822646c471df79f4a97ae6cae7d328917503b47 (diff)
downloadredelta-bfc4a5d491d06a2300915abd3eb356c5656611ee.zip
redelta-bfc4a5d491d06a2300915abd3eb356c5656611ee.tar.gz
redelta-bfc4a5d491d06a2300915abd3eb356c5656611ee.tar.bz2
four winds
Diffstat (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 489e20d..7c6f35f 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -404,80 +404,81 @@ function microswitch() {
404 var screw_connector = new CSG.Properties(); 404 var screw_connector = new CSG.Properties();
405 var rv = CSG.cube({ center:[0,0,2.5],radius: [19.8/2,6/2,10/2] }).union( 405 var rv = CSG.cube({ center:[0,0,2.5],radius: [19.8/2,6/2,10/2] }).union(
406 CSG.cube({ center: [2.5,0.5,6], radius: [2/2,3.5/2,5/2] }) 406 CSG.cube({ center: [2.5,0.5,6], radius: [2/2,3.5/2,5/2] })
407 ).union( 407 ).union(
408 [-8,-1,8].map(function(x) { 408 [-8,-1,8].map(function(x) {
409 return CSG.cube({ center:[x,0,0], radius: [0.6/2,3.2/2,13/2] }) 409 return CSG.cube({ center:[x,0,0], radius: [0.6/2,3.2/2,13/2] })
410 }) 410 })
411 ).subtract( 411 ).subtract(
412 [-9.5/2,9.5/2].map(function(x,i) { 412 [-9.5/2,9.5/2].map(function(x,i) {
413 screw_connector[i] = new CSG.Connector([x,6/2,0],[0,-1,0],[0,0,1]); 413 screw_connector[i] = new CSG.Connector([x,6/2,0],[0,-1,0],[0,0,1]);
414 return CSG.cylinder({ 414 return CSG.cylinder({
415 start: [x,-4,0], end: [x,4,0], 415 start: [x,-4,0], end: [x,4,0],
416 radius: 2/2 416 radius: 2/2
417 }) 417 })
418 }) 418 })
419 ); 419 );
420 rv.properties.switch_connector = new CSG.Connector([2.5,0.5,6+5/2],[0,0,1],[0,-1,0]); 420 rv.properties.switch_connector = new CSG.Connector([2.5,0.5,6+5/2],[0,0,1],[0,-1,0]);
421 rv.properties.screw_connector = screw_connector; 421 rv.properties.screw_connector = screw_connector;
422 rv.properties.microswitch = new CSG.Properties(); 422 rv.properties.microswitch = new CSG.Properties();
423 rv.properties.microswitch.size = new CSG.Vector3D( 423 rv.properties.microswitch.size = new CSG.Vector3D(
424 19.8,6,10 424 19.8,6,10
425 ); 425 );
426 return rv; 426 return rv;
427} 427}
428 428
429function getParameterDefinitions() { 429function getParameterDefinitions() {
430 return [{ 430 return [{
431 name: 'part', 431 name: 'part',
432 type: 'choice', 432 type: 'choice',
433 values: [ 433 values: [
434 'platform', 434 'platform',
435 'hinged', 435 'hinged',
436 'clamp', 436 'clamp',
437 'fanholder', 437 'fanholder',
438 'alltogethernow' 438 'alltogethernow'
439 ], 439 ],
440 captions: [ 440 captions: [
441 'Effector platform', 441 'Effector platform',
442 'Hinged part', 442 'Hinged part',
443 'Clamp', 443 'Clamp',
444 'Fan holder', 444 'Fan holder',
445 'All together now!' 445 'All together now!'
446 ], 446 ],
447 caption: 'Part', 447 caption: 'Part',
448 initial: 'alltogethernow' 448 initial: 'alltogethernow'
449 }]; 449 }];
450} 450}
451 451
452var FOURWINDS = [0,90,180,270];
452function main(params) { 453function main(params) {
453 var e = EFFECTOR.effector(); 454 var e = EFFECTOR.effector();
454 var hs = E3DV6.heatsink(); 455 var hs = E3DV6.heatsink();
455 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); 456 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0);
456 var ms = microswitch(); 457 var ms = microswitch();
457 var hd = EFFECTOR.hinged({ 458 var hd = EFFECTOR.hinged({
458 microswitch:ms,effector:e 459 microswitch:ms,effector:e
459 }); 460 });
460 ms = ms.connectTo( 461 ms = ms.connectTo(
461 ms.properties.screw_connector[0], 462 ms.properties.screw_connector[0],
462 hd.properties.microswitch_screw_connector[0], 463 hd.properties.microswitch_screw_connector[0],
463 false, 0); 464 false, 0);
464 var hdhd = EFFECTOR.split_hinged(hd); 465 var hdhd = EFFECTOR.split_hinged(hd);
465 var fh = EFFECTOR.fanholder(); 466 var fh = EFFECTOR.fanholder();
466 return union({ 467 return union({
467 platform: e, 468 platform: e,
468 hinged: hdhd[1], 469 hinged: hdhd[1],
469 clamp: hdhd[0], 470 clamp: hdhd[0],
470 fanholder: fh, 471 fanholder: fh,
471 alltogethernow: [e,hdhd[0],hdhd[1], columns(),hs,ms,fh] 472 alltogethernow: [e,hdhd[0],hdhd[1], columns(),hs,ms,fh]
472 }[params.part||'alltogethernow']) 473 }[params.part||'alltogethernow'])
473 var rv = union( 474 var rv = union(
474 e, 475 e,
475 hs, 476 hs,
476 columns(), 477 columns(),
477 ///hd, 478 ///hd,
478 hdhd[0], hdhd[1], 479 hdhd[0], hdhd[1],
479 ms); 480 ms);
480 return rv; 481 return rv;
481} 482}
482/* vim:set ft=javascript ai: */ 483/* vim:set ft=javascript ai: */
483 484