-rw-r--r-- | delta.jscad | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/delta.jscad b/delta.jscad index 12bdb97..e9fb773 100644 --- a/delta.jscad +++ b/delta.jscad | |||
@@ -708,192 +708,245 @@ function shoe() { | |||
708 | 708 | ||
709 | function duetholder() { | 709 | function duetholder() { |
710 | var DH = CONFIG.duetholder; | 710 | var DH = CONFIG.duetholder; |
711 | var DHD = CD.duetholder; | 711 | var DHD = CD.duetholder; |
712 | var hw = DH.bolt.head.d+2*DH.margin; | 712 | var hw = DH.bolt.head.d+2*DH.margin; |
713 | var s = DH.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2; | 713 | var s = DH.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2; |
714 | var lower = CONFIG.foot.h-2*DH.s; | 714 | var lower = CONFIG.foot.h-2*DH.s; |
715 | var hl = DHD.distance-CONFIG.extrusion.w; | 715 | var hl = DHD.distance-CONFIG.extrusion.w; |
716 | var rv = union([ | 716 | var rv = union([ |
717 | CSG.cube({ // vertical | 717 | CSG.cube({ // vertical |
718 | corner1: [-hw/2,s,CONFIG.extrusion.w], | 718 | corner1: [-hw/2,s,CONFIG.extrusion.w], |
719 | corner2: [hw/2,0,-lower] | 719 | corner2: [hw/2,0,-lower] |
720 | }), | 720 | }), |
721 | CSG.cube({ // horizontal extrusion | 721 | CSG.cube({ // horizontal extrusion |
722 | corner1: [-hw/2,-CONFIG.extrusion.w,0], | 722 | corner1: [-hw/2,-CONFIG.extrusion.w,0], |
723 | corner2: [ hw/2,0,-s] | 723 | corner2: [ hw/2,0,-s] |
724 | }), | 724 | }), |
725 | CSG.cube({ // horizontal | 725 | CSG.cube({ // horizontal |
726 | corner1: [-hw/2,0,-lower], | 726 | corner1: [-hw/2,0,-lower], |
727 | corner2: [hw/2,hl,-lower+DH.s] | 727 | corner2: [hw/2,hl,-lower+DH.s] |
728 | }), | 728 | }), |
729 | CSG.cylinder({ // boltend of horizontal part | 729 | CSG.cylinder({ // boltend of horizontal part |
730 | start: [0,hl,-lower], end: [0,hl,-lower+DH.s], | 730 | start: [0,hl,-lower], end: [0,hl,-lower+DH.s], |
731 | radius: hw/2 | 731 | radius: hw/2 |
732 | }) | 732 | }) |
733 | ]); | 733 | ]); |
734 | rv = rv.subtract([ | 734 | rv = rv.subtract([ |
735 | CSG.cylinder({ // through vertical | 735 | CSG.cylinder({ // through vertical |
736 | start: [0,-1,CONFIG.extrusion.w/2], end: [0,s+1,CONFIG.extrusion.w/2], | 736 | start: [0,-1,CONFIG.extrusion.w/2], end: [0,s+1,CONFIG.extrusion.w/2], |
737 | radius: DH.bolt.d/2+PRINT.slide_tolerance | 737 | radius: DH.bolt.d/2+PRINT.slide_tolerance |
738 | }), | 738 | }), |
739 | CSG.cylinder({ // through horizontal to extrusion | 739 | CSG.cylinder({ // through horizontal to extrusion |
740 | start: [0,-CONFIG.extrusion.w/2,-s-1], | 740 | start: [0,-CONFIG.extrusion.w/2,-s-1], |
741 | end: [0,-CONFIG.extrusion.w/2,1], | 741 | end: [0,-CONFIG.extrusion.w/2,1], |
742 | radius: DH.bolt.d/2+PRINT.slide_tolerance | 742 | radius: DH.bolt.d/2+PRINT.slide_tolerance |
743 | }), | 743 | }), |
744 | CSG.cube({ // cut off | 744 | CSG.cube({ // cut off |
745 | corner1: [-hw/2-1,-2*s,0], | 745 | corner1: [-hw/2-1,-2*s,0], |
746 | corner2: [hw/2+1,0,-2*s] | 746 | corner2: [hw/2+1,0,-2*s] |
747 | }).rotateX(45).translate([0,-CONFIG.extrusion.w,0]), | 747 | }).rotateX(45).translate([0,-CONFIG.extrusion.w,0]), |
748 | CSG.cylinder({ // duet bolt | 748 | CSG.cylinder({ // duet bolt |
749 | start: [0,hl,-lower], end: [0,hl,-lower+DH.s], | 749 | start: [0,hl,-lower], end: [0,hl,-lower+DH.s], |
750 | radius: DH.bolt.d/2+PRINT.slide_tolerance | 750 | radius: DH.bolt.d/2+PRINT.slide_tolerance |
751 | }) | 751 | }) |
752 | ]); | 752 | ]); |
753 | var cp = [0,hl,-lower+DH.s]; | 753 | var cp = [0,hl,-lower+DH.s]; |
754 | rv.properties.duet = new CSG.Properties(); | 754 | rv.properties.duet = new CSG.Properties(); |
755 | rv.properties.duet.c_sw = new CSG.Connector(cp,[0,0,1],[1,0,0]); | 755 | rv.properties.duet.c_sw = new CSG.Connector(cp,[0,0,1],[1,0,0]); |
756 | rv.properties.duet.c_se = new CSG.Connector(cp,[0,0,1],[1,0,0]); | 756 | rv.properties.duet.c_se = new CSG.Connector(cp,[0,0,1],[1,0,0]); |
757 | rv.properties.duet.c_ne = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),-Math.sin(Math.PI/3),0]); | 757 | rv.properties.duet.c_ne = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),-Math.sin(Math.PI/3),0]); |
758 | rv.properties.duet.c_nw = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),Math.sin(Math.PI/3),0]); | 758 | rv.properties.duet.c_nw = new CSG.Connector(cp,[0,0,1],[-Math.cos(Math.PI/3),Math.sin(Math.PI/3),0]); |
759 | rv.properties.c_h = new CSG.Connector([0,-CONFIG.extrusion.w/2,0],[0,0,1],[1,0,0]); | 759 | rv.properties.c_h = new CSG.Connector([0,-CONFIG.extrusion.w/2,0],[0,0,1],[1,0,0]); |
760 | rv.properties.c_v = new CSG.Connector([0,0,CONFIG.extrusion.w/2],[0,-1,0],[0,0,1]); | 760 | rv.properties.c_v = new CSG.Connector([0,0,CONFIG.extrusion.w/2],[0,-1,0],[0,0,1]); |
761 | rv.properties.P = new CSG.Connector([-hw/2,0,0],[1,0,0],[0,1,0]); | 761 | rv.properties.P = new CSG.Connector([-hw/2,0,0],[1,0,0],[0,1,0]); |
762 | return rv.setColor(CONFIG.color.parts); | 762 | return rv.setColor(CONFIG.color.parts); |
763 | } | 763 | } |
764 | 764 | ||
765 | function heatbed() { | 765 | function heatbed() { |
766 | var rv = CSG.cylinder({ | 766 | var rv = CSG.cylinder({ |
767 | start: [0,0,0], end: [0,0,CONFIG.heatbed.h], | 767 | start: [0,0,0], end: [0,0,CONFIG.heatbed.h], |
768 | radius: CONFIG.heatbed.r, resolution: 72 | 768 | radius: CONFIG.heatbed.r, resolution: 72 |
769 | }); | 769 | }); |
770 | var screw = CSG.cylinder({ | 770 | var screw = CSG.cylinder({ |
771 | start: [0,-CONFIG.heatbed.sr,-1], | 771 | start: [0,-CONFIG.heatbed.sr,-1], |
772 | end: [0,-CONFIG.heatbed.sr,CONFIG.heatbed.h+1], | 772 | end: [0,-CONFIG.heatbed.sr,CONFIG.heatbed.h+1], |
773 | radius: 3/2 | 773 | radius: 3/2 |
774 | }); | 774 | }); |
775 | var screws = []; | 775 | var screws = []; |
776 | for(var a=0;a<360;a+=60) screws.push(screw.rotateZ(a)); // TODO: connectors | 776 | for(var a=0;a<360;a+=60) screws.push(screw.rotateZ(a)); // TODO: connectors |
777 | rv = rv.subtract(screws); | 777 | rv = rv.subtract(screws); |
778 | rv.properties.c_glass = new CSG.Connector([0,0,CONFIG.heatbed.h],[0,0,1],[1,0,0]); | 778 | rv.properties.c_glass = new CSG.Connector([0,0,CONFIG.heatbed.h],[0,0,1],[1,0,0]); |
779 | rv.properties.P = new CSG.Connector( | 779 | rv.properties.P = new CSG.Connector( |
780 | [0,0,-CONFIG.foot.h-CONFIG.extrusion.w*2-CONFIG.base.gap-CONFIG.bedholder.h], | 780 | [0,0,-CONFIG.foot.h-CONFIG.extrusion.w*2-CONFIG.base.gap-CONFIG.bedholder.h], |
781 | [0,0,1],[1,0,0]); | 781 | [0,0,1],[1,0,0]); |
782 | rv.properties.vitamin = true; | 782 | rv.properties.vitamin = true; |
783 | return rv.setColor(CONFIG.color.heatbed); | 783 | return rv.setColor(CONFIG.color.heatbed); |
784 | } | 784 | } |
785 | function glass() { | 785 | function glass() { |
786 | var rv = CSG.cylinder({ | 786 | var rv = CSG.cylinder({ |
787 | start: [0,0,0], end: [0,0,CONFIG.glass.h], | 787 | start: [0,0,0], end: [0,0,CONFIG.glass.h], |
788 | radius: CONFIG.glass.r, resolution: 72 | 788 | radius: CONFIG.glass.r, resolution: 72 |
789 | }); | 789 | }); |
790 | rv.properties.c_bed = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); | 790 | rv.properties.c_bed = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); |
791 | rv.properties.P = new CSG.Connector([0,0,-CONFIG.foot.h-CONFIG.heatbed.h],[0,0,1],[1,0,0]); | 791 | rv.properties.P = new CSG.Connector([0,0,-CONFIG.foot.h-CONFIG.heatbed.h],[0,0,1],[1,0,0]); |
792 | rv.properties.vitamin = true; | 792 | rv.properties.vitamin = true; |
793 | return rv.setColor(CONFIG.color.glass); | 793 | return rv.setColor(CONFIG.color.glass); |
794 | } | 794 | } |
795 | function platform() { | 795 | function platform() { |
796 | var b = heatbed(); | 796 | var b = heatbed(); |
797 | var g = glass(); | 797 | var g = glass(); |
798 | g = g.connectTo(g.properties.c_bed,b.properties.c_glass,false,0); | 798 | g = g.connectTo(g.properties.c_bed,b.properties.c_glass,false,0); |
799 | return b.union(g); | 799 | return b.union(g); |
800 | } | 800 | } |
801 | 801 | ||
802 | function bedholder(params) { | 802 | function bedholder(params) { |
803 | var h0 = CONFIG.foot.h+CONFIG.extrusion.w*2+CONFIG.base.gap; | 803 | var h0 = CONFIG.foot.h+CONFIG.extrusion.w*2+CONFIG.base.gap; |
804 | var e_h=E2020.T.thickness; // height of the bump for extrusion | ||
805 | var e_w=E2020.slot_width-PRINT.fit_tolerance; // width of the bump for extrusion | ||
806 | var e_o=E2020.slot_width+PRINT.fit_tolerance; // opening for the T-Nut width | ||
807 | var rv = CSG.cylinder({ | ||
808 | start: [0,0,h0], end: [0,0,h0+CONFIG.bedholder.h], | ||
809 | radiusStart: CD.base.outer_inscription_r, | ||
810 | radiusEnd: CD.base.outer_inscription_r+CONFIG.bedholder.h/2, | ||
811 | resolution: 240 | ||
812 | }); | ||
813 | rv=rv.intersect(CSG.cube({ | ||
814 | corner1: [-CONFIG.extrusion.w/2,-CD.base.inner_inscription_r,h0], | ||
815 | corner2: [ CONFIG.extrusion.w/2,-CD.base.mid_inscription_r*2,h0+2*CONFIG.bedholder.h] | ||
816 | })); | ||
817 | |||
818 | rv=rv.union(CSG.cube({ // bump to fix on extrusion | ||
819 | corner1: [-CONFIG.extrusion.w/2,-CD.base.mid_inscription_r-e_w/2,h0], | ||
820 | corner2: [ CONFIG.extrusion.w/2,-CD.base.mid_inscription_r+e_w/2,h0-e_h] | ||
821 | }).subtract( | ||
822 | CSG.cube({center:[0,0,0],radius:[(e_o+2*e_h)/(2*Math.sqrt(2)),e_w+2,(e_o+2*e_h)/(2*Math.sqrt(2))]}) | ||
823 | .rotateY(45) | ||
824 | .translate([0,-CD.base.mid_inscription_r,h0-e_h]) | ||
825 | )); | ||
826 | |||
827 | var ebolt_s = CONFIG.bedholder.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2; | ||
828 | rv=rv.subtract([ | ||
829 | CSG.cylinder({ // base screw | ||
830 | start: [0,-CD.base.mid_inscription_r,h0-1], | ||
831 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], | ||
832 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 | ||
833 | }), | ||
834 | CSG.cylinder({ // base screw head | ||
835 | start: [0,-CD.base.mid_inscription_r,h0+ebolt_s], | ||
836 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], | ||
837 | radius: CONFIG.bedholder.bolt.head.d/2+PRINT.play_tolerance | ||
838 | }) | ||
839 | ]); | ||
840 | |||
841 | var nuth=h0+CONFIG.bedholder.h*3/4; | ||
842 | rv=rv.subtract([ | ||
843 | CSG.cylinder({ // bed screw | ||
844 | start: [0,-CONFIG.heatbed.sr,h0-1], | ||
845 | end: [0,-CONFIG.heatbed.sr,h0+CONFIG.bedholder.h+1], | ||
846 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 | ||
847 | }), | ||
848 | CSG.cube({ // nut pocket | ||
849 | center: [0,-CONFIG.heatbed.sr,nuth], | ||
850 | radius: [CONFIG.extrusion.w/2+1,CONFIG.bedholder.nut.w/2+PRINT.slide_tolerance/2,CONFIG.bedholder.nut.h/2+PRINT.slide_tolerance/2] | ||
851 | }) | ||
852 | ]); | ||
853 | |||
854 | rv.properties.P = new CSG.Connector([-CONFIG.extrusion.w/2,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h/2], | ||
855 | [1,0,0],[0,0,1]); | ||
856 | return rv.setColor(CONFIG.color.parts); | ||
804 | var bolt_s = CONFIG.bedholder.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2; | 857 | var bolt_s = CONFIG.bedholder.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2; |
805 | var nuth=h0+CONFIG.bedholder.h*3/4; | 858 | var nuth=h0+CONFIG.bedholder.h*3/4; |
806 | var nutth = nuth+CONFIG.bedholder.nut.h/2+PRINT.slide_tolerance/2; | 859 | var nutth = nuth+CONFIG.bedholder.nut.h/2+PRINT.slide_tolerance/2; |
807 | var rv = CSG.roundedCube({ | 860 | var rv = CSG.roundedCube({ |
808 | corner1: [-CONFIG.extrusion.w/2,-CD.base.inner_inscription_r,h0], | 861 | corner1: [-CONFIG.extrusion.w/2,-CD.base.inner_inscription_r,h0], |
809 | corner2: [ CONFIG.extrusion.w/2,-CONFIG.heatbed.sr-3/2-CONFIG.bedholder.margin,h0+CONFIG.bedholder.h], | 862 | corner2: [ CONFIG.extrusion.w/2,-CONFIG.heatbed.sr-3/2-CONFIG.bedholder.margin,h0+CONFIG.bedholder.h], |
810 | roundradius: CONFIG.bedholder.margin | 863 | roundradius: CONFIG.bedholder.margin |
811 | }); | 864 | }); |
812 | rv = rv.subtract([ | 865 | rv = rv.subtract([ |
813 | CSG.cylinder({ // base screw | 866 | CSG.cylinder({ // base screw |
814 | start: [0,-CD.base.mid_inscription_r,h0-1], | 867 | start: [0,-CD.base.mid_inscription_r,h0-1], |
815 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], | 868 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], |
816 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 | 869 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 |
817 | }), | 870 | }), |
818 | CSG.cylinder({ // bed screw | 871 | CSG.cylinder({ // bed screw |
819 | start: [0,-CONFIG.heatbed.sr,h0-1], | 872 | start: [0,-CONFIG.heatbed.sr,h0-1], |
820 | end: [0,-CONFIG.heatbed.sr,h0+CONFIG.bedholder.h+1], | 873 | end: [0,-CONFIG.heatbed.sr,h0+CONFIG.bedholder.h+1], |
821 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 | 874 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 |
822 | }), | 875 | }), |
823 | CSG.cube({ // nut pocket | 876 | CSG.cube({ // nut pocket |
824 | center: [0,-CONFIG.heatbed.sr,nuth], | 877 | center: [0,-CONFIG.heatbed.sr,nuth], |
825 | radius: [CONFIG.extrusion.w/2+1,(CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2,(CONFIG.bedholder.nut.h+PRINT.slide_tolerance)/2] | 878 | radius: [CONFIG.extrusion.w/2+1,(CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2,(CONFIG.bedholder.nut.h+PRINT.slide_tolerance)/2] |
826 | }), | 879 | }), |
827 | CSG.cylinder({ // sink base screw | 880 | CSG.cylinder({ // sink base screw |
828 | start: [0,-CD.base.mid_inscription_r,h0+bolt_s], | 881 | start: [0,-CD.base.mid_inscription_r,h0+bolt_s], |
829 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], | 882 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], |
830 | radius: CONFIG.bedholder.bolt.head.d/2+PRINT.play_tolerance | 883 | radius: CONFIG.bedholder.bolt.head.d/2+PRINT.play_tolerance |
831 | }) | 884 | }) |
832 | ]); | 885 | ]); |
833 | rv = rv.union(CSG.cylinder({ // patch up for bridging | 886 | rv = rv.union(CSG.cylinder({ // patch up for bridging |
834 | start: [0,-CONFIG.heatbed.sr,nutth], end: [0,-CONFIG.heatbed.sr,nutth+PRINT.layer_height], | 887 | start: [0,-CONFIG.heatbed.sr,nutth], end: [0,-CONFIG.heatbed.sr,nutth+PRINT.layer_height], |
835 | radius: (CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2+PRINT.extrusion_width | 888 | radius: (CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2+PRINT.extrusion_width |
836 | })); | 889 | })); |
837 | rv = rv.intersect(CSG.cylinder({ // cut off excess | 890 | rv = rv.intersect(CSG.cylinder({ // cut off excess |
838 | start: [0,0,h0-1], end: [0,0,h0+CONFIG.bedholder.h+1], | 891 | start: [0,0,h0-1], end: [0,0,h0+CONFIG.bedholder.h+1], |
839 | radius: CONFIG.heatbed.r, resolution: 270 | 892 | radius: CONFIG.heatbed.r, resolution: 270 |
840 | })); | 893 | })); |
841 | rv.properties.P = new CSG.Connector([0,-CD.base.mid_inscription_r,h0],[0,0,1],[1,0,0]); | 894 | rv.properties.P = new CSG.Connector([0,-CD.base.mid_inscription_r,h0],[0,0,1],[1,0,0]); |
842 | return rv.setColor(CONFIG.color.parts); | 895 | return rv.setColor(CONFIG.color.parts); |
843 | } | 896 | } |
844 | 897 | ||
845 | var PARTS = { | 898 | var PARTS = { |
846 | wip: function(params) { | 899 | wip: function(params) { |
847 | return duetholder(params); | 900 | return duetholder(params); |
848 | return PARTS.alltogethernow(params); | 901 | return PARTS.alltogethernow(params); |
849 | return base_extrusions(); | 902 | return base_extrusions(); |
850 | return foot(); | 903 | return foot(); |
851 | return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0])); | 904 | return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0])); |
852 | }, | 905 | }, |
853 | alltogethernow: function(params) { | 906 | alltogethernow: function(params) { |
854 | var cols = columns(); | 907 | var cols = columns(); |
855 | var sides = base_sides(); | 908 | var sides = base_sides(); |
856 | var feet = THREEWINDS.map(function(w,i) { | 909 | var feet = THREEWINDS.map(function(w,i) { |
857 | var rv = foot(); | 910 | var rv = foot(); |
858 | rv = rv.connectTo(rv.properties.c_column,cols[i].properties.c_bottom,false,0); | 911 | rv = rv.connectTo(rv.properties.c_column,cols[i].properties.c_bottom,false,0); |
859 | var s = shoe(); | 912 | var s = shoe(); |
860 | s = s.connectTo(s.properties.c_foot,rv.properties.c_shoe,false,0); | 913 | s = s.connectTo(s.properties.c_foot,rv.properties.c_shoe,false,0); |
861 | return rv.union(s); | 914 | return rv.union(s); |
862 | }); | 915 | }); |
863 | var dh = duetholder(); | 916 | var dh = duetholder(); |
864 | var dhsw = dh.connectTo(dh.properties.c_h, | 917 | var dhsw = dh.connectTo(dh.properties.c_h, |
865 | new CSG.Connector([-CONFIG.duet.hole_spacing.x/2,-CD.base.mid_inscription_r,CONFIG.foot.h],[0,0,1],[1,0,0]), | 918 | new CSG.Connector([-CONFIG.duet.hole_spacing.x/2,-CD.base.mid_inscription_r,CONFIG.foot.h],[0,0,1],[1,0,0]), |
866 | false,0); | 919 | false,0); |
867 | var d = duet(); | 920 | var d = duet(); |
868 | d = d.connectTo(d.properties.holes.c_sw,dhsw.properties.duet.c_sw,false,0); | 921 | d = d.connectTo(d.properties.holes.c_sw,dhsw.properties.duet.c_sw,false,0); |
869 | var dhse = dh.connectTo(dh.properties.duet.c_se,d.properties.holes.c_se,false,0); | 922 | var dhse = dh.connectTo(dh.properties.duet.c_se,d.properties.holes.c_se,false,0); |
870 | var dhne = dh.connectTo(dh.properties.duet.c_ne,d.properties.holes.c_ne,false,0); | 923 | var dhne = dh.connectTo(dh.properties.duet.c_ne,d.properties.holes.c_ne,false,0); |
871 | var dhnw = dh.connectTo(dh.properties.duet.c_nw,d.properties.holes.c_nw,false,0); | 924 | var dhnw = dh.connectTo(dh.properties.duet.c_nw,d.properties.holes.c_nw,false,0); |
872 | var rv = union(cols).union(sides.map(union)).union(feet).union([ | 925 | var rv = union(cols).union(sides.map(union)).union(feet).union([ |
873 | d,dhsw,dhse,dhne,dhnw | 926 | d,dhsw,dhse,dhne,dhnw |
874 | ]); | 927 | ]); |
875 | var p = U.P(platform()); | 928 | var p = U.P(platform()); |
876 | rv = rv.union(p); | 929 | rv = rv.union(p); |
877 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); | 930 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); |
878 | return rv; | 931 | return rv; |
879 | }, | 932 | }, |
880 | duetholder: function(params) { | 933 | duetholder: function(params) { |
881 | return duetholder(); | 934 | return duetholder(); |
882 | }, | 935 | }, |
883 | foot: foot, | 936 | foot: foot, |
884 | shoe: shoe, | 937 | shoe: shoe, |
885 | bedholder: bedholder, | 938 | bedholder: bedholder, |
886 | platform: function(params) { return U.P(EFFECTOR.effector()) }, | 939 | platform: function(params) { return U.P(EFFECTOR.effector()) }, |
887 | hinged: function(params) { | 940 | hinged: function(params) { |
888 | // TODO: handle print mode | 941 | // TODO: handle print mode |
889 | var ms = microswitch(); | 942 | var ms = microswitch(); |
890 | var e = EFFECTOR.effector(); | 943 | var e = EFFECTOR.effector(); |
891 | var hd = EFFECTOR.hinged({ | 944 | var hd = EFFECTOR.hinged({ |
892 | microswitch:ms,effector:e | 945 | microswitch:ms,effector:e |
893 | }); | 946 | }); |
894 | ms = ms.connectTo( | 947 | ms = ms.connectTo( |
895 | ms.properties.screw_connector[0], | 948 | ms.properties.screw_connector[0], |
896 | hd.properties.microswitch_screw_connector[0], | 949 | hd.properties.microswitch_screw_connector[0], |
897 | false, 0); | 950 | false, 0); |
898 | var hdhd = EFFECTOR.split_hinged(hd); | 951 | var hdhd = EFFECTOR.split_hinged(hd); |
899 | return U.P(hdhd[1]); | 952 | return U.P(hdhd[1]); |