-rw-r--r-- | delta.jscad | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/delta.jscad b/delta.jscad index 0e8fd62..326d172 100644 --- a/delta.jscad +++ b/delta.jscad | |||
@@ -756,101 +756,101 @@ function heatbed() { | |||
756 | function glass() { | 756 | function glass() { |
757 | var rv = CSG.cylinder({ | 757 | var rv = CSG.cylinder({ |
758 | start: [0,0,0], end: [0,0,CONFIG.glass.h], | 758 | start: [0,0,0], end: [0,0,CONFIG.glass.h], |
759 | radius: CONFIG.glass.r, resolution: 72 | 759 | radius: CONFIG.glass.r, resolution: 72 |
760 | }); | 760 | }); |
761 | 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]); |
762 | 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]); |
763 | rv.properties.vitamin = true; | 763 | rv.properties.vitamin = true; |
764 | return rv.setColor(CONFIG.color.glass); | 764 | return rv.setColor(CONFIG.color.glass); |
765 | } | 765 | } |
766 | function platform() { | 766 | function platform() { |
767 | var b = heatbed(); | 767 | var b = heatbed(); |
768 | var g = glass(); | 768 | var g = glass(); |
769 | 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); |
770 | return b.union(g); | 770 | return b.union(g); |
771 | } | 771 | } |
772 | 772 | ||
773 | function bedholder(params) { | 773 | function bedholder(params) { |
774 | var h0 = CONFIG.foot.h+CONFIG.extrusion.w*2+CONFIG.base.gap; | 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; | 775 | var bolt_s = CONFIG.bedholder.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2; |
776 | var nuth=h0+CONFIG.bedholder.h*3/4; | 776 | var nuth=h0+CONFIG.bedholder.h*3/4; |
777 | var nutth = nuth+CONFIG.bedholder.nut.h/2+PRINT.slide_tolerance/2; | 777 | var nutth = nuth+CONFIG.bedholder.nut.h/2+PRINT.slide_tolerance/2; |
778 | var rv = CSG.roundedCube({ | 778 | var rv = CSG.roundedCube({ |
779 | corner1: [-CONFIG.extrusion.w/2,-CD.base.inner_inscription_r,h0], | 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], | 780 | corner2: [ CONFIG.extrusion.w/2,-CONFIG.heatbed.sr-3/2-CONFIG.bedholder.margin,h0+CONFIG.bedholder.h], |
781 | roundradius: CONFIG.bedholder.margin | 781 | roundradius: CONFIG.bedholder.margin |
782 | }); | 782 | }); |
783 | rv = rv.subtract([ | 783 | rv = rv.subtract([ |
784 | CSG.cylinder({ // base screw | 784 | CSG.cylinder({ // base screw |
785 | start: [0,-CD.base.mid_inscription_r,h0-1], | 785 | start: [0,-CD.base.mid_inscription_r,h0-1], |
786 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+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 | 787 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 |
788 | }), | 788 | }), |
789 | CSG.cylinder({ // bed screw | 789 | CSG.cylinder({ // bed screw |
790 | start: [0,-CONFIG.heatbed.sr,h0-1], | 790 | start: [0,-CONFIG.heatbed.sr,h0-1], |
791 | end: [0,-CONFIG.heatbed.sr,h0+CONFIG.bedholder.h+1], | 791 | end: [0,-CONFIG.heatbed.sr,h0+CONFIG.bedholder.h+1], |
792 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 | 792 | radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2 |
793 | }), | 793 | }), |
794 | CSG.cube({ // nut pocket | 794 | CSG.cube({ // nut pocket |
795 | center: [0,-CONFIG.heatbed.sr,nuth], | 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] | 796 | radius: [CONFIG.extrusion.w/2+1,(CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2,(CONFIG.bedholder.nut.h+PRINT.slide_tolerance)/2] |
797 | }), | 797 | }), |
798 | CSG.cylinder({ // sink base screw | 798 | CSG.cylinder({ // sink base screw |
799 | start: [0,-CD.base.mid_inscription_r,h0+bolt_s], | 799 | start: [0,-CD.base.mid_inscription_r,h0+bolt_s], |
800 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], | 800 | end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1], |
801 | radius: CONFIG.bedholder.bolt.head.d/2+PRINT.play_tolerance | 801 | radius: CONFIG.bedholder.bolt.head.d/2+PRINT.play_tolerance |
802 | }) | 802 | }) |
803 | ]); | 803 | ]); |
804 | rv = rv.union(CSG.cylinder({ | 804 | rv = rv.union(CSG.cylinder({ // patch up for bridging |
805 | start: [0,-CONFIG.heatbed.sr,nutth], end: [0,-CONFIG.heatbed.sr,nutth+PRINT.layer_height], | 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 | 806 | radius: (CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2+PRINT.extrusion_width |
807 | })); | 807 | })); |
808 | rv = rv.intersect(CSG.cylinder({ | 808 | rv = rv.intersect(CSG.cylinder({ // cut off excess |
809 | start: [0,0,h0-1], end: [0,0,h0+CONFIG.bedholder.h+1], | 809 | start: [0,0,h0-1], end: [0,0,h0+CONFIG.bedholder.h+1], |
810 | radius: CONFIG.heatbed.r, resolution: 270 | 810 | radius: CONFIG.heatbed.r, resolution: 270 |
811 | })); | 811 | })); |
812 | rv.properties.P = new CSG.Connector([0,-CD.base.mid_inscription_r,h0],[0,0,1],[1,0,0]); | 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); | 813 | return rv.setColor(CONFIG.color.parts); |
814 | } | 814 | } |
815 | 815 | ||
816 | var PARTS = { | 816 | var PARTS = { |
817 | wip: function(params) { | 817 | wip: function(params) { |
818 | return duetholder(params); | 818 | return duetholder(params); |
819 | return PARTS.alltogethernow(params); | 819 | return PARTS.alltogethernow(params); |
820 | return base_extrusions(); | 820 | return base_extrusions(); |
821 | return foot(); | 821 | return foot(); |
822 | return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0])); | 822 | return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0])); |
823 | }, | 823 | }, |
824 | alltogethernow: function(params) { | 824 | alltogethernow: function(params) { |
825 | var cols = columns(); | 825 | var cols = columns(); |
826 | var sides = base_sides(); | 826 | var sides = base_sides(); |
827 | var feet = THREEWINDS.map(function(w,i) { | 827 | var feet = THREEWINDS.map(function(w,i) { |
828 | var rv = foot(); | 828 | var rv = foot(); |
829 | 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); |
830 | var s = shoe(); | 830 | var s = shoe(); |
831 | 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); |
832 | return rv.union(s); | 832 | return rv.union(s); |
833 | }); | 833 | }); |
834 | var dh = duetholder(); | 834 | var dh = duetholder(); |
835 | var dhsw = dh.connectTo(dh.properties.c_h, | 835 | var dhsw = dh.connectTo(dh.properties.c_h, |
836 | 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]), |
837 | false,0); | 837 | false,0); |
838 | var d = duet(); | 838 | var d = duet(); |
839 | 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); |
840 | 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); |
841 | 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); |
842 | 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); |
843 | var rv = union(cols).union(sides.map(union)).union(feet).union([ | 843 | var rv = union(cols).union(sides.map(union)).union(feet).union([ |
844 | d,dhsw,dhse,dhne,dhnw | 844 | d,dhsw,dhse,dhne,dhnw |
845 | ]); | 845 | ]); |
846 | var p = P(platform()); | 846 | var p = P(platform()); |
847 | rv = rv.union(p); | 847 | rv = rv.union(p); |
848 | 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]); |
849 | return rv; | 849 | return rv; |
850 | }, | 850 | }, |
851 | duetholder: function(params) { | 851 | duetholder: function(params) { |
852 | return duetholder(); | 852 | return duetholder(); |
853 | }, | 853 | }, |
854 | foot: foot, | 854 | foot: foot, |
855 | shoe: shoe, | 855 | shoe: shoe, |
856 | bedholder: bedholder | 856 | bedholder: bedholder |