-rw-r--r-- | delta.jscad | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/delta.jscad b/delta.jscad index 35a777c..45e8765 100644 --- a/delta.jscad +++ b/delta.jscad | |||
@@ -867,34 +867,34 @@ var PARTS = { | |||
867 | var d = duet(); | 867 | var d = duet(); |
868 | d = d.connectTo(d.properties.holes.c_sw,dhsw.properties.duet.c_sw,false,0); | 868 | 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); | 869 | 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); | 870 | 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); | 871 | 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([ | 872 | var rv = union(cols).union(sides.map(union)).union(feet).union([ |
873 | d,dhsw,dhse,dhne,dhnw | 873 | d,dhsw,dhse,dhne,dhnw |
874 | ]); | 874 | ]); |
875 | var p = P(platform()); | 875 | var p = U.P(platform()); |
876 | rv = rv.union(p); | 876 | rv = rv.union(p); |
877 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); | 877 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); |
878 | return rv; | 878 | return rv; |
879 | }, | 879 | }, |
880 | duetholder: function(params) { | 880 | duetholder: function(params) { |
881 | return duetholder(); | 881 | return duetholder(); |
882 | }, | 882 | }, |
883 | foot: foot, | 883 | foot: foot, |
884 | shoe: shoe, | 884 | shoe: shoe, |
885 | bedholder: bedholder | 885 | bedholder: bedholder |
886 | }; | 886 | }; |
887 | 887 | ||
888 | function main(params) { | 888 | function main(params) { |
889 | var part = params.part && PARTS[params.part]; | 889 | var part = params.part && PARTS[params.part]; |
890 | if(!part) return refaxes(); | 890 | if(!part) return U.axes(); |
891 | var rv = P(part(params)); | 891 | var rv = U.P(part(params)); |
892 | if(!params.print) rv = rv.union(refaxes()); | 892 | if(!params.print) rv = rv.union(U.axes()); |
893 | return rv; | 893 | return rv; |
894 | } | 894 | } |
895 | 895 | ||
896 | function _main(params) { | 896 | function _main(params) { |
897 | var e = EFFECTOR.effector(); | 897 | var e = EFFECTOR.effector(); |
898 | var hs = E3DV6.heatsink(); | 898 | var hs = E3DV6.heatsink(); |
899 | hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); | 899 | hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0); |
900 | var ms = microswitch(); | 900 | var ms = microswitch(); |
@@ -919,31 +919,16 @@ function _main(params) { | |||
919 | hs, | 919 | hs, |
920 | columns(), | 920 | columns(), |
921 | ///hd, | 921 | ///hd, |
922 | hdhd[0], hdhd[1], | 922 | hdhd[0], hdhd[1], |
923 | ms); | 923 | ms); |
924 | return rv; | 924 | return rv; |
925 | } | 925 | } |
926 | 926 | ||
927 | function refaxes(o) { | ||
928 | if(!o) o = {}; | ||
929 | var l = o.l||20, g = o.g||0.7; | ||
930 | return union([ | ||
931 | CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]), | ||
932 | CSG.roundedCylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]), | ||
933 | CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g]) | ||
934 | ]); | ||
935 | } | ||
936 | |||
937 | function P(x) { | ||
938 | return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0); | ||
939 | } | ||
940 | |||
941 | |||
942 | function getParameterDefinitions() { | 927 | function getParameterDefinitions() { |
943 | return [{ | 928 | return [{ |
944 | name: 'part', | 929 | name: 'part', |
945 | type: 'choice', | 930 | type: 'choice', |
946 | values: [ | 931 | values: [ |
947 | 'platform', | 932 | 'platform', |
948 | 'hinged', | 933 | 'hinged', |
949 | 'clamp', | 934 | 'clamp', |