summaryrefslogtreecommitdiffabout
path: root/delta.jscad
authorMichael Krelin <hacker@klever.net>2016-01-06 21:38:15 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 21:38:15 (UTC)
commit1822646c471df79f4a97ae6cae7d328917503b47 (patch) (unidiff)
treec4250da736c7c3429ea9d2edd17a369f73173091 /delta.jscad
parent1d1eef5830bd523eebe3607923d986268cd85339 (diff)
downloadredelta-1822646c471df79f4a97ae6cae7d328917503b47.zip
redelta-1822646c471df79f4a97ae6cae7d328917503b47.tar.gz
redelta-1822646c471df79f4a97ae6cae7d328917503b47.tar.bz2
reformatted parameters definition
Diffstat (limited to 'delta.jscad') (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad16
1 files changed, 14 insertions, 2 deletions
diff --git a/delta.jscad b/delta.jscad
index fd36ba5..489e20d 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -409,50 +409,62 @@ function microswitch() {
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: ['platform', 'hinged', 'clamp', 'fanholder', 'alltogethernow'], 433 values: [
434 captions: ['Effector platform','Hinged part', 'Clamp', 'Fan holder', 'All together now!'], 434 'platform',
435 'hinged',
436 'clamp',
437 'fanholder',
438 'alltogethernow'
439 ],
440 captions: [
441 'Effector platform',
442 'Hinged part',
443 'Clamp',
444 'Fan holder',
445 'All together now!'
446 ],
435 caption: 'Part', 447 caption: 'Part',
436 initial: 'alltogethernow' 448 initial: 'alltogethernow'
437 }]; 449 }];
438} 450}
439 451
440function main(params) { 452function main(params) {
441 var e = EFFECTOR.effector(); 453 var e = EFFECTOR.effector();
442 var hs = E3DV6.heatsink(); 454 var hs = E3DV6.heatsink();
443 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); 455 hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0);
444 var ms = microswitch(); 456 var ms = microswitch();
445 var hd = EFFECTOR.hinged({ 457 var hd = EFFECTOR.hinged({
446 microswitch:ms,effector:e 458 microswitch:ms,effector:e
447 }); 459 });
448 ms = ms.connectTo( 460 ms = ms.connectTo(
449 ms.properties.screw_connector[0], 461 ms.properties.screw_connector[0],
450 hd.properties.microswitch_screw_connector[0], 462 hd.properties.microswitch_screw_connector[0],
451 false, 0); 463 false, 0);
452 var hdhd = EFFECTOR.split_hinged(hd); 464 var hdhd = EFFECTOR.split_hinged(hd);
453 var fh = EFFECTOR.fanholder(); 465 var fh = EFFECTOR.fanholder();
454 return union({ 466 return union({
455 platform: e, 467 platform: e,
456 hinged: hdhd[1], 468 hinged: hdhd[1],
457 clamp: hdhd[0], 469 clamp: hdhd[0],
458 fanholder: fh, 470 fanholder: fh,