-rw-r--r-- | delta.jscad | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/delta.jscad b/delta.jscad index 855d4f9..01a5dc7 100644 --- a/delta.jscad +++ b/delta.jscad | |||
@@ -741,25 +741,36 @@ function P(x) { | |||
741 | var PARTS = { | 741 | var PARTS = { |
742 | wip: function(params) { | 742 | wip: function(params) { |
743 | return foot(); | 743 | return foot(); |
744 | return union(base_extrusions(),column_extrusions(),duet()); | 744 | return union(base_extrusions(),column_extrusions(),duet()); |
745 | alltogethernow: function(params) { | 745 | alltogethernow: function(params) { |
746 | var cols = columns(); | 746 | var cols = columns(); |
747 | var sides = base_sides(); | 747 | var sides = base_sides(); |
748 | var feet = THREEWINDS.map(function(w,i) { | 748 | var feet = THREEWINDS.map(function(w,i) { |
749 | var rv = foot(); | 749 | var rv = foot(); |
750 | rv = rv.connectTo(rv.properties.c_column,cols[i].properties.c_bottom,false,0); | 750 | rv = rv.connectTo(rv.properties.c_column,cols[i].properties.c_bottom,false,0); |
751 | return rv; | 751 | return rv; |
752 | }); | 752 | }); |
753 | var rv = union(cols).union(sides.map(union)).union(feet); | 753 | var dh = duetholder(); |
754 | var dhsw = dh.connectTo(dh.properties.c_h, | ||
755 | new CSG.Connector([-CONFIG.duet.hole_spacing.x/2,-CD.base.mid_inscription_r,CONFIG.foot.h],[0,0,1],[1,0,0]), | ||
756 | false,0); | ||
757 | var d = duet(); | ||
758 | d = d.connectTo(d.properties.holes.c_sw,dhsw.properties.duet.c_sw,false,0); | ||
759 | var dhse = dh.connectTo(dh.properties.duet.c_se,d.properties.holes.c_se,false,0); | ||
760 | var dhne = dh.connectTo(dh.properties.duet.c_ne,d.properties.holes.c_ne,false,0); | ||
761 | var dhnw = dh.connectTo(dh.properties.duet.c_nw,d.properties.holes.c_nw,false,0); | ||
762 | var rv = union(cols).union(sides.map(union)).union(feet).union([ | ||
763 | d,dhsw,dhse,dhne,dhnw | ||
764 | ]); | ||
754 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); | 765 | rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]); |
755 | return rv; | 766 | return rv; |
756 | }, | 767 | }, |
757 | duetholder: function(params) { | 768 | duetholder: function(params) { |
758 | return duetholder(); | 769 | return duetholder(); |
759 | } | 770 | } |
760 | }; | 771 | }; |
761 | 772 | ||
762 | function main(params) { | 773 | function main(params) { |
763 | var part = params.part && PARTS[params.part]; | 774 | var part = params.part && PARTS[params.part]; |
764 | if(!part) return refaxes(); | 775 | if(!part) return refaxes(); |
765 | var rv = P(part(params)); | 776 | var rv = P(part(params)); |