-rw-r--r-- | delta.jscad | 57 |
1 files changed, 54 insertions, 3 deletions
diff --git a/delta.jscad b/delta.jscad index 24c1c7e..0e8fd62 100644 --- a/delta.jscad +++ b/delta.jscad | |||
@@ -1,95 +1,101 @@ | |||
1 | var PRINT = { | 1 | var PRINT = { |
2 | layer_height: 0.2, | 2 | layer_height: 0.2, |
3 | extrusion_width: 0.4, | 3 | extrusion_width: 0.4, |
4 | 4 | ||
5 | fit_tolerance: .2, slide_tolerance: .4, play_tolerance: .6, screw_tolerance: .3 | 5 | fit_tolerance: .2, slide_tolerance: .4, play_tolerance: .6, screw_tolerance: .3 |
6 | }; | 6 | }; |
7 | 7 | ||
8 | var CONFIG = { | 8 | var CONFIG = { |
9 | extrusion: { | 9 | extrusion: { |
10 | w: 20, slotdepth: 6 | 10 | w: 20, slotdepth: 6 |
11 | }, | 11 | }, |
12 | base: { | 12 | base: { |
13 | el: 240, // side extrusion length | 13 | el: 240, // side extrusion length |
14 | sl: 240+2*70, // triangle side length | 14 | sl: 240+2*70, // triangle side length |
15 | gap: 9 // vertical gap between side extrusions | 15 | gap: 9 // vertical gap between side extrusions |
16 | }, | 16 | }, |
17 | column: { | 17 | column: { |
18 | h: 600 // column height | 18 | h: 600 // column height |
19 | }, | 19 | }, |
20 | heatbed: { | 20 | heatbed: { |
21 | r: 220/2, // heatbed radius | 21 | r: 220/2, // heatbed radius |
22 | sr: 220/2-4.5,// radius of the screwholes circle | 22 | sr: 220/2-4.5,// radius of the screwholes circle |
23 | h: 3+1.5 // thickness (including insulation) | 23 | h: 3+1.5 // thickness (including insulation) |
24 | }, | 24 | }, |
25 | glass: { | 25 | glass: { |
26 | r: 195/2, // glass radius | 26 | r: 195/2, // glass radius |
27 | h: 3 // glass thickness | 27 | h: 3 // glass thickness |
28 | }, | 28 | }, |
29 | duet: { | 29 | duet: { |
30 | pcb_size: { x: 124, y: 100, z: 1 }, | 30 | pcb_size: { x: 124, y: 100, z: 1 }, |
31 | hole_spacing: { x: 115, y: 92 }, | 31 | hole_spacing: { x: 115, y: 92 }, |
32 | h: 30 | 32 | h: 30 |
33 | }, | 33 | }, |
34 | foot: { | 34 | foot: { |
35 | d: 20*Math.sqrt(2), h: 30, | 35 | d: 20*Math.sqrt(2), h: 30, |
36 | bolt: { d:5, l: 19, hd: 10 }, | 36 | bolt: { d:5, l: 19, hd: 10 }, |
37 | margin: 2.5, | 37 | margin: 2.5, |
38 | nut: { d: 8.6 /* TODO: */, h: 3.5 }, | 38 | nut: { d: 8.6 /* TODO: */, h: 3.5 }, |
39 | shell: 4, | 39 | shell: 4, |
40 | zscalefactor: 1.6, | 40 | zscalefactor: 1.6, |
41 | foot: { ho: 2.5, hi: 5 } | 41 | foot: { ho: 2.5, hi: 5 } |
42 | }, | 42 | }, |
43 | duetholder: { | 43 | duetholder: { |
44 | bolt: { d: 3, l: 10, head: { d: 5.33, h: 3 } }, | 44 | bolt: { d: 3, l: 10, head: { d: 5.33, h: 3 } }, |
45 | margin: 3, | 45 | margin: 3, |
46 | s: 2.5 | 46 | s: 2.5 |
47 | }, | 47 | }, |
48 | bedholder: { | ||
49 | h: 15, | ||
50 | margin: 3, | ||
51 | nut: { w: 5.4, h: 2.5 }, | ||
52 | bolt: { d: 3, l: 10, head: { d: 5.33, h: 3 } } | ||
53 | }, | ||
48 | hotend: { | 54 | hotend: { |
49 | h: 62.4, // full assembly height | 55 | h: 62.4, // full assembly height |
50 | groove: { d:12, h:6 }, // grove diameter and height | 56 | groove: { d:12, h:6 }, // grove diameter and height |
51 | ungroove: { d:16, above:3.7, below: 3+4 } | 57 | ungroove: { d:16, above:3.7, below: 3+4 } |
52 | }, | 58 | }, |
53 | effector: { | 59 | effector: { |
54 | h: 6, | 60 | h: 6, |
55 | o: 20,// offset to the rod mounts line | 61 | o: 20,// offset to the rod mounts line |
56 | rods_apart: 40, | 62 | rods_apart: 40, |
57 | cone: { shell: 1, angle: Math.PI/6 }, | 63 | cone: { shell: 1, angle: Math.PI/6 }, |
58 | rodend: { | 64 | rodend: { |
59 | joint_w: 7,// thickness of the joint | 65 | joint_w: 7,// thickness of the joint |
60 | screw_l: 20-1, // 20 with the head | 66 | screw_l: 20-1, // 20 with the head |
61 | screw_d: 3 | 67 | screw_d: 3 |
62 | }, | 68 | }, |
63 | hotend: { margin: 2 }, | 69 | hotend: { margin: 2 }, |
64 | hinge: { | 70 | hinge: { |
65 | d: 3, w: 5, margin: 2.5, | 71 | d: 3, w: 5, margin: 2.5, |
66 | h: 1+(6+3.7)/2, // elevation + grove + top | 72 | h: 1+(6+3.7)/2, // elevation + grove + top |
67 | e: 1 // elevation | 73 | e: 1 // elevation |
68 | }, | 74 | }, |
69 | clamp: { | 75 | clamp: { |
70 | shell: 4.6, | 76 | shell: 4.6, |
71 | d: 3, | 77 | d: 3, |
72 | margin: 2.5, | 78 | margin: 2.5, |
73 | split: 0.6 | 79 | split: 0.6 |
74 | }, | 80 | }, |
75 | mswitch: { | 81 | mswitch: { |
76 | size: [ 19.8, 6, 10 ], | 82 | size: [ 19.8, 6, 10 ], |
77 | screw: { | 83 | screw: { |
78 | d: 2, h: 10/2-2, | 84 | d: 2, h: 10/2-2, |
79 | s: 1.3, // screw shell | 85 | s: 1.3, // screw shell |
80 | o: [-9.5/2,9.5/2].map(function(x) { | 86 | o: [-9.5/2,9.5/2].map(function(x) { |
81 | return -19.8/2+x; | 87 | return -19.8/2+x; |
82 | }) | 88 | }) |
83 | }, | 89 | }, |
84 | switch_x: 2.5 | 90 | switch_x: 2.5 |
85 | }, | 91 | }, |
86 | guide: { | 92 | guide: { |
87 | width: 3, height: 5+1, length: 6 | 93 | width: 3, height: 5+1, length: 6 |
88 | }, | 94 | }, |
89 | fanholder: { | 95 | fanholder: { |
90 | r: 30, | 96 | r: 30, |
91 | screw: { d: 3, m: 2.5/*margin*/ }, | 97 | screw: { d: 3, m: 2.5/*margin*/ }, |
92 | w: 3 | 98 | w: 3 |
93 | } | 99 | } |
94 | }, | 100 | }, |
95 | nut: { h: 2.3, w: 5.5 }, | 101 | nut: { h: 2.3, w: 5.5 }, |
@@ -719,180 +725,225 @@ function duetholder() { | |||
719 | rv.properties.duet = new CSG.Properties(); | 725 | rv.properties.duet = new CSG.Properties(); |
720 | rv.properties.duet.c_sw = new CSG.Connector(cp,[0,0,1],[1,0,0]); | 726 | rv.properties.duet.c_sw = new CSG.Connector(cp,[0,0,1],[1,0,0]); |
721 | rv.properties.duet.c_se = new CSG.Connector(cp,[0,0,1],[1,0,0]); | 727 | rv.properties.duet.c_se = new CSG.Connector(cp,[0,0,1],[1,0,0]); |
722 | rv.properties.duet.c_ne = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),-Math.sin(Math.PI/3),0]); | 728 | rv.properties.duet.c_ne = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),-Math.sin(Math.PI/3),0]); |
723 | rv.properties.duet.c_nw = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),Math.sin(Math.PI/3),0]); | 729 | rv.properties.duet.c_nw = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),Math.sin(Math.PI/3),0]); |
724 | rv.properties.c_h = new CSG.Connector([0,-CONFIG.extrusion.w/2,0],[0,0,1],[1,0,0]); | 730 | rv.properties.c_h = new CSG.Connector([0,-CONFIG.extrusion.w/2,0],[0,0,1],[1,0,0]); |
725 | rv.properties.c_v = new CSG.Connector([0,0,CONFIG.extrusion.w/2],[0,-1,0],[0,0,1]); | 731 | rv.properties.c_v = new CSG.Connector([0,0,CONFIG.extrusion.w/2],[0,-1,0],[0,0,1]); |
726 | rv.properties.P = new CSG.Connector([-hw/2,0,0],[1,0,0],[0,1,0]); | 732 | rv.properties.P = new CSG.Connector([-hw/2,0,0],[1,0,0],[0,1,0]); |
727 | return rv.setColor(CONFIG.color.parts); | 733 | return rv.setColor(CONFIG.color.parts); |
728 | } | 734 | } |
729 | 735 | ||
730 | function heatbed() { | 736 | function heatbed() { |
731 | var rv = CSG.cylinder({ | 737 | var rv = CSG.cylinder({ |
732 | start: [0,0,0], end: [0,0,CONFIG.heatbed.h], | 738 | start: [0,0,0], end: [0,0,CONFIG.heatbed.h], |
733 | radius: CONFIG.heatbed.r, resolution: 72 | 739 | radius: CONFIG.heatbed.r, resolution: 72 |
734 | }); | 740 | }); |
735 | var screw = CSG.cylinder({ | 741 | var screw = CSG.cylinder({ |
736 | start: [0,-CONFIG.heatbed.sr,-1], | 742 | start: [0,-CONFIG.heatbed.sr,-1], |
737 | end: [0,-CONFIG.heatbed.sr,CONFIG.heatbed.h+1], | 743 | end: [0,-CONFIG.heatbed.sr,CONFIG.heatbed.h+1], |
738 | radius: 3/2 | 744 | radius: 3/2 |
739 | }); | 745 | }); |
740 | var screws = []; | 746 | var screws = []; |
741 | for(var a=0;a<360;a+=60) screws.push(screw.rotateZ(a)); // TODO: connectors | 747 | for(var a=0;a<360;a+=60) screws.push(screw.rotateZ(a)); // TODO: connectors |
742 | rv = rv.subtract(screws); | 748 | rv = rv.subtract(screws); |
743 | rv.properties.c_glass = new CSG.Connector([0,0,CONFIG.heatbed.h],[0,0,1],[1,0,0]); | 749 | rv.properties.c_glass = new CSG.Connector([0,0,CONFIG.heatbed.h],[0,0,1],[1,0,0]); |
744 | rv.properties.P = new CSG.Connector( | 750 | rv.properties.P = new CSG.Connector( |
745 | [0,0,-CONFIG.foot.h-CONFIG.extrusion.w*2-CONFIG.base.gap-CONFIG.bedholder.h], | 751 | [0,0,-CONFIG.foot.h-CONFIG.extrusion.w*2-CONFIG.base.gap-CONFIG.bedholder.h], |
746 | [0,0,1],[1,0,0]); | 752 | [0,0,1],[1,0,0]); |
747 | rv.properties.vitamin = true; | 753 | rv.properties.vitamin = true; |
748 | return rv.setColor(CONFIG.color.heatbed); | 754 | return rv.setColor(CONFIG.color.heatbed); |
749 | } | 755 | } |
750 | function glass() { | 756 | function glass() { |
751 | var rv = CSG.cylinder({ | 757 | var rv = CSG.cylinder({ |
752 | start: [0,0,0], end: [0,0,CONFIG.glass.h], | 758 | start: [0,0,0], end: [0,0,CONFIG.glass.h], |
753 | radius: CONFIG.glass.r, resolution: 72 | 759 | radius: CONFIG.glass.r, resolution: 72 |
754 | }); | 760 | }); |
755 | rv.properties.c_bed = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); | 761 | 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]); | 762 | 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; | 763 | rv.properties.vitamin = true; |
758 | return rv.setColor(CONFIG.color.glass); | 764 | return rv.setColor(CONFIG.color.glass); |
759 | } | 765 | } |
760 | function platform() { | 766 | function platform() { |
761 | var b = heatbed(); | 767 | var b = heatbed(); |
762 | var g = glass(); | 768 | var g = glass(); |
763 | g = g.connectTo(g.properties.c_bed,b.properties.c_glass,false,0); | 769 | g = g.connectTo(g.properties.c_bed,b.properties.c_glass,false,0); |
764 | return b.union(g); | 770 | return b.union(g); |
765 | } | 771 | } |
766 | 772 | ||
773 | function bedholder(params) { | ||
774 | var h0 = CONFIG.foot.h+CONFIG.extrusion.w*2+CONFIG.base.gap; | ||
775 | var bolt_s = CONFIG.bedholder.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2; | ||
776 | var nuth=h0+CONFIG.bedholder.h*3/4; | ||
777 | var nutth = nuth+CONFIG.bedholder.nut.h/2+PRINT.slide_tolerance/2; | ||
778 | var rv = CSG.roundedCube({ | ||
779 | corner1: [-CONFIG.extrusion.w/2,-CD.base.inner_inscription_r,h0], | ||
780 | corner2: [ CONFIG.extrusion.w/2,-CONFIG.heatbed.sr-3/2-CONFIG.bedholder.margin,h0+CONFIG.bedholder.h], | ||
781 | roundradius: CONFIG.bedholder.margin | ||
782 | }); | ||
783 | rv = rv.subtract([ | ||
784 | CSG.cylinder({ // base screw | ||
785 | start: [0,-CD.base.mid_inscription_r,h0-1], | ||
786 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], | ||
787 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 | ||
788 | }), | ||
789 | CSG.cylinder({ // bed screw | ||
790 | start: [0,-CONFIG.heatbed.sr,h0-1], | ||
791 | end: [0,-CONFIG.heatbed.sr,h0+CONFIG.bedholder.h+1], | ||
792 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 | ||
793 | }), | ||
794 | CSG.cube({ // nut pocket | ||
795 | center: [0,-CONFIG.heatbed.sr,nuth], | ||
796 | radius: [CONFIG.extrusion.w/2+1,(CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2,(CONFIG.bedholder.nut.h+PRINT.slide_tolerance)/2] | ||
797 | }), | ||
798 | CSG.cylinder({ // sink base screw | ||
799 | start: [0,-CD.base.mid_inscription_r,h0+bolt_s], | ||
800 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], | ||
801 | radius: CONFIG.bedholder.bolt.head.d/2+PRINT.play_tolerance | ||
802 | }) | ||
803 | ]); | ||
804 | rv = rv.union(CSG.cylinder({ | ||
805 | start: [0,-CONFIG.heatbed.sr,nutth], end: [0,-CONFIG.heatbed.sr,nutth+PRINT.layer_height], | ||
806 | radius: (CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2+PRINT.extrusion_width | ||
807 | })); | ||
808 | rv = rv.intersect(CSG.cylinder({ | ||
809 | start: [0,0,h0-1], end: [0,0,h0+CONFIG.bedholder.h+1], | ||
810 | radius: CONFIG.heatbed.r, resolution: 270 | ||
811 | })); | ||
812 | rv.properties.P = new CSG.Connector([0,-CD.base.mid_inscription_r,h0],[0,0,1],[1,0,0]); | ||
813 | return rv.setColor(CONFIG.color.parts); | ||
814 | } | ||
815 | |||
767 | var PARTS = { | 816 | var PARTS = { |
768 | wip: function(params) { | 817 | wip: function(params) { |
769 | return duetholder(params); | 818 | return duetholder(params); |
770 | return PARTS.alltogethernow(params); | 819 | return PARTS.alltogethernow(params); |
771 | return base_extrusions(); | 820 | return base_extrusions(); |
772 | return foot(); | 821 | return foot(); |
773 | return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0])); | 822 | return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0])); |
774 | }, | 823 | }, |
775 | alltogethernow: function(params) { | 824 | alltogethernow: function(params) { |
776 | var cols = columns(); | 825 | var cols = columns(); |
777 | var sides = base_sides(); | 826 | var sides = base_sides(); |
778 | var feet = THREEWINDS.map(function(w,i) { | 827 | var feet = THREEWINDS.map(function(w,i) { |
779 | var rv = foot(); | 828 | var rv = foot(); |
780 | rv = rv.connectTo(rv.properties.c_column,cols[i].properties.c_bottom,false,0); | 829 | rv = rv.connectTo(rv.properties.c_column,cols[i].properties.c_bottom,false,0); |
781 | var s = shoe(); | 830 | var s = shoe(); |
782 | s = s.connectTo(s.properties.c_foot,rv.properties.c_shoe,false,0); | 831 | s = s.connectTo(s.properties.c_foot,rv.properties.c_shoe,false,0); |
783 | return rv.union(s); | 832 | return rv.union(s); |
784 | }); | 833 | }); |
785 | var dh = duetholder(); | 834 | var dh = duetholder(); |
786 | var dhsw = dh.connectTo(dh.properties.c_h, | 835 | var dhsw = dh.connectTo(dh.properties.c_h, |
787 | new CSG.Connector([-CONFIG.duet.hole_spacing.x/2,-CD.base.mid_inscription_r,CONFIG.foot.h],[0,0,1],[1,0,0]), | 836 | new CSG.Connector([-CONFIG.duet.hole_spacing.x/2,-CD.base.mid_inscription_r,CONFIG.foot.h],[0,0,1],[1,0,0]), |
788 | false,0); | 837 | false,0); |
789 | var d = duet(); | 838 | var d = duet(); |
790 | d = d.connectTo(d.properties.holes.c_sw,dhsw.properties.duet.c_sw,false,0); | 839 | d = d.connectTo(d.properties.holes.c_sw,dhsw.properties.duet.c_sw,false,0); |
791 | var dhse = dh.connectTo(dh.properties.duet.c_se,d.properties.holes.c_se,false,0); | 840 | var dhse = dh.connectTo(dh.properties.duet.c_se,d.properties.holes.c_se,false,0); |
792 | var dhne = dh.connectTo(dh.properties.duet.c_ne,d.properties.holes.c_ne,false,0); | 841 | var dhne = dh.connectTo(dh.properties.duet.c_ne,d.properties.holes.c_ne,false,0); |
793 | var dhnw = dh.connectTo(dh.properties.duet.c_nw,d.properties.holes.c_nw,false,0); | 842 | var dhnw = dh.connectTo(dh.properties.duet.c_nw,d.properties.holes.c_nw,false,0); |
794 | var rv = union(cols).union(sides.map(union)).union(feet).union([ | 843 | var rv = union(cols).union(sides.map(union)).union(feet).union([ |
795 | d,dhsw,dhse,dhne,dhnw | 844 | d,dhsw,dhse,dhne,dhnw |
796 | ]); | 845 | ]); |
797 | var p = P(platform()); | 846 | var p = P(platform()); |
798 | rv = rv.union(p); | 847 | rv = rv.union(p); |
799 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); | 848 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); |
800 | return rv; | 849 | return rv; |
801 | }, | 850 | }, |
802 | duetholder: function(params) { | 851 | duetholder: function(params) { |
803 | return duetholder(); | 852 | return duetholder(); |
804 | }, | 853 | }, |
805 | foot: foot, | 854 | foot: foot, |
806 | shoe: shoe | 855 | shoe: shoe, |
856 | bedholder: bedholder | ||
807 | }; | 857 | }; |
808 | 858 | ||
809 | function main(params) { | 859 | function main(params) { |
810 | var part = params.part && PARTS[params.part]; | 860 | var part = params.part && PARTS[params.part]; |
811 | if(!part) return refaxes(); | 861 | if(!part) return refaxes(); |
812 | var rv = P(part(params)); | 862 | var rv = P(part(params)); |
813 | if(!params.print) rv = rv.union(refaxes()); | 863 | if(!params.print) rv = rv.union(refaxes()); |
814 | return rv; | 864 | return rv; |
815 | } | 865 | } |
816 | 866 | ||
817 | function _main(params) { | 867 | function _main(params) { |
818 | var e = EFFECTOR.effector(); | 868 | var e = EFFECTOR.effector(); |
819 | var hs = E3DV6.heatsink(); | 869 | var hs = E3DV6.heatsink(); |
820 | hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); | 870 | hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); |
821 | var ms = microswitch(); | 871 | var ms = microswitch(); |
822 | var hd = EFFECTOR.hinged({ | 872 | var hd = EFFECTOR.hinged({ |
823 | microswitch:ms,effector:e | 873 | microswitch:ms,effector:e |
824 | }); | 874 | }); |
825 | ms = ms.connectTo( | 875 | ms = ms.connectTo( |
826 | ms.properties.screw_connector[0], | 876 | ms.properties.screw_connector[0], |
827 | hd.properties.microswitch_screw_connector[0], | 877 | hd.properties.microswitch_screw_connector[0], |
828 | false, 0); | 878 | false, 0); |
829 | var hdhd = EFFECTOR.split_hinged(hd); | 879 | var hdhd = EFFECTOR.split_hinged(hd); |
830 | var fh = EFFECTOR.fanholder(); | 880 | var fh = EFFECTOR.fanholder(); |
831 | return union({ | 881 | return union({ |
832 | platform: e, | 882 | platform: e, |
833 | hinged: hdhd[1], | 883 | hinged: hdhd[1], |
834 | clamp: hdhd[0], | 884 | clamp: hdhd[0], |
835 | fanholder: fh, | 885 | fanholder: fh, |
836 | alltogethernow: [e,hdhd[0],hdhd[1], columns(),hs,ms,fh] | 886 | alltogethernow: [e,hdhd[0],hdhd[1], columns(),hs,ms,fh] |
837 | }[params.part||'alltogethernow']) | 887 | }[params.part||'alltogethernow']) |
838 | var rv = union( | 888 | var rv = union( |
839 | e, | 889 | e, |
840 | hs, | 890 | hs, |
841 | columns(), | 891 | columns(), |
842 | ///hd, | 892 | ///hd, |
843 | hdhd[0], hdhd[1], | 893 | hdhd[0], hdhd[1], |
844 | ms); | 894 | ms); |
845 | return rv; | 895 | return rv; |
846 | } | 896 | } |
847 | 897 | ||
848 | function refaxes(o) { | 898 | function refaxes(o) { |
849 | if(!o) o = {}; | 899 | if(!o) o = {}; |
850 | var l = o.l||20, g = o.g||0.7; | 900 | var l = o.l||20, g = o.g||0.7; |
851 | return union([ | 901 | return union([ |
852 | CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]), | 902 | 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]), | 903 | 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]) | 904 | CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g]) |
855 | ]); | 905 | ]); |
856 | } | 906 | } |
857 | 907 | ||
858 | function P(x) { | 908 | function P(x) { |
859 | return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0); | 909 | return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0); |
860 | } | 910 | } |
861 | 911 | ||
862 | 912 | ||
863 | function getParameterDefinitions() { | 913 | function getParameterDefinitions() { |
864 | return [{ | 914 | return [{ |
865 | name: 'part', | 915 | name: 'part', |
866 | type: 'choice', | 916 | type: 'choice', |
867 | values: [ | 917 | values: [ |
868 | 'platform', | 918 | 'platform', |
869 | 'hinged', | 919 | 'hinged', |
870 | 'clamp', | 920 | 'clamp', |
871 | 'fanholder', | 921 | 'fanholder', |
872 | 'duetholder', | 922 | 'duetholder', |
873 | 'foot', 'shoe', | 923 | 'foot', 'shoe', |
924 | 'bedholder', | ||
874 | 'alltogethernow', | 925 | 'alltogethernow', |
875 | 'wip' | 926 | 'wip' |
876 | ], | 927 | ], |
877 | captions: [ | 928 | captions: [ |
878 | 'Effector platform', | 929 | 'Effector platform', |
879 | 'Hinged part', | 930 | 'Hinged part', |
880 | 'Clamp', | 931 | 'Clamp', |
881 | 'Fan holder', | 932 | 'Fan holder', |
882 | 'Duet holder', | 933 | 'Duet holder', |
883 | 'Foot', | 934 | 'Foot', 'Shoe', |
884 | 'Shoe', | 935 | 'Bed holder', |
885 | 'All together now!', | 936 | 'All together now!', |
886 | 'Work in progress' | 937 | 'Work in progress' |
887 | ], | 938 | ], |
888 | caption: 'Part', | 939 | caption: 'Part', |
889 | initial: 'wip' | 940 | initial: 'wip' |
890 | },{ | 941 | },{ |
891 | name: 'print', | 942 | name: 'print', |
892 | type: 'checkbox', | 943 | type: 'checkbox', |
893 | caption: 'For print, no nonsense', | 944 | caption: 'For print, no nonsense', |
894 | initial: false | 945 | initial: false |
895 | }]; | 946 | }]; |
896 | } | 947 | } |
897 | 948 | ||
898 | /* vim:set ft=javascript ai: */ | 949 | /* vim:set ft=javascript ai: */ |