summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad29
1 files changed, 15 insertions, 14 deletions
diff --git a/delta.jscad b/delta.jscad
index 7384ecf..156e704 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -755,38 +755,24 @@ function glass() {
755 rv.properties.c_bed = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); 755 rv.properties.c_bed = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]);
756 rv.properties.P = new CSG.Connector([0,0,-CONFIG.foot.h-CONFIG.heatbed.h],[0,0,1],[1,0,0]); 756 rv.properties.P = new CSG.Connector([0,0,-CONFIG.foot.h-CONFIG.heatbed.h],[0,0,1],[1,0,0]);
757 rv.properties.vitamin = true; 757 rv.properties.vitamin = true;
758 return rv.setColor(CONFIG.color.glass); 758 return rv.setColor(CONFIG.color.glass);
759} 759}
760function platform() { 760function platform() {
761 var b = heatbed(); 761 var b = heatbed();
762 var g = glass(); 762 var g = glass();
763 g = g.connectTo(g.properties.c_bed,b.properties.c_glass,false,0); 763 g = g.connectTo(g.properties.c_bed,b.properties.c_glass,false,0);
764 return b.union(g); 764 return b.union(g);
765} 765}
766 766
767function refaxes(o) {
768 if(!o) o = {};
769 var l = o.l||20, g = o.g||0.7;
770 return union([
771 CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]),
772 CSG.roundedCylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]),
773 CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g])
774 ]);
775}
776
777function P(x) {
778 return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0);
779}
780
781var PARTS = { 767var PARTS = {
782 wip: function(params) { 768 wip: function(params) {
783 return duetholder(params); 769 return duetholder(params);
784 return PARTS.alltogethernow(params); 770 return PARTS.alltogethernow(params);
785 return base_extrusions(); 771 return base_extrusions();
786 return foot(); 772 return foot();
787 return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0])); 773 return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0]));
788 }, 774 },
789 alltogethernow: function(params) { 775 alltogethernow: function(params) {
790 var cols = columns(); 776 var cols = columns();
791 var sides = base_sides(); 777 var sides = base_sides();
792 var feet = THREEWINDS.map(function(w,i) { 778 var feet = THREEWINDS.map(function(w,i) {
@@ -850,24 +836,39 @@ function _main(params) {
850 alltogethernow: [e,hdhd[0],hdhd[1], columns(),hs,ms,fh] 836 alltogethernow: [e,hdhd[0],hdhd[1], columns(),hs,ms,fh]
851 }[params.part||'alltogethernow']) 837 }[params.part||'alltogethernow'])
852 var rv = union( 838 var rv = union(
853 e, 839 e,
854 hs, 840 hs,
855 columns(), 841 columns(),
856 ///hd, 842 ///hd,
857 hdhd[0], hdhd[1], 843 hdhd[0], hdhd[1],
858 ms); 844 ms);
859 return rv; 845 return rv;
860} 846}
861 847
848function refaxes(o) {
849 if(!o) o = {};
850 var l = o.l||20, g = o.g||0.7;
851 return union([
852 CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]),
853 CSG.roundedCylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]),
854 CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g])
855 ]);
856}
857
858function P(x) {
859 return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0);
860}
861
862
862function getParameterDefinitions() { 863function getParameterDefinitions() {
863 return [{ 864 return [{
864 name: 'part', 865 name: 'part',
865 type: 'choice', 866 type: 'choice',
866 values: [ 867 values: [
867 'platform', 868 'platform',
868 'hinged', 869 'hinged',
869 'clamp', 870 'clamp',
870 'fanholder', 871 'fanholder',
871 'duetholder', 872 'duetholder',
872 'foot', 'shoe', 873 'foot', 'shoe',
873 'alltogethernow', 874 'alltogethernow',