-rw-r--r-- | multiswitch.scad | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/multiswitch.scad b/multiswitch.scad index 2b909a9..f58b7bd 100644 --- a/multiswitch.scad +++ b/multiswitch.scad | |||
@@ -60,49 +60,51 @@ module multiswitch( | |||
60 | rotate([90-laydown_angle,0,0]) | 60 | rotate([90-laydown_angle,0,0]) |
61 | translate([0,r,h_bottom]) | 61 | translate([0,r,h_bottom]) |
62 | rotate([0,0,angular_step/2-90]) | 62 | rotate([0,0,angular_step/2-90]) |
63 | children(); | 63 | children(); |
64 | } | 64 | } |
65 | module finalize() { | 65 | module finalize() { |
66 | if(print) laydown() children(); | 66 | if(print) laydown() children(); |
67 | else children(); | 67 | else children(); |
68 | } | 68 | } |
69 | 69 | ||
70 | finalize() difference() { | 70 | finalize() difference() { |
71 | hull() { | 71 | hull() { |
72 | forinputs() | 72 | forinputs() |
73 | translate([0,0,l_input+pushfit_h]) mirror([0,0,1]) | 73 | translate([0,0,l_input+pushfit_h]) mirror([0,0,1]) |
74 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); | 74 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); |
75 | foroutput() | 75 | foroutput() |
76 | translate([0,0,l_output+pushfit_h]) { | 76 | translate([0,0,l_output+pushfit_h]) { |
77 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); | 77 | cylinder(d=pushfit_d+shell*2,h=epsilon,$fn=pushfit_d*fnd); |
78 | } | 78 | } |
79 | } | 79 | } |
80 | forinputs() { | 80 | forinputs() { |
81 | translate([0,0,l_input]) pushfit(pf,draft=draft); | 81 | translate([0,0,l_input]) pushfit(pf,draft=draft); |
82 | translate([0,0,l_narrow]) { | 82 | translate([0,0,l_narrow]) { |
83 | cylinder(d=lod,h=l_input+1-l_narrow,$fn=lod*fnd); | 83 | cylinder(d=lod,h=l_input+1-l_narrow,$fn=lod*fnd); |
84 | mirror([0,0,1]) translate([0,0,-epsilon]) | 84 | mirror([0,0,1]) translate([0,0,-epsilon]) |
85 | cylinder(d1=(liner_id+lod)/2,d2=liner_id,h=liner_id,$fn=lod*fnd); | 85 | cylinder(d1=(liner_id+lod)/2,d2=liner_id,h=liner_id,$fn=lod*fnd); |
86 | } | 86 | } |
87 | cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd); | 87 | cylinder(d=liner_id,h=l_input+epsilon,$fn=liner_id*fnd); |
88 | } | 88 | } |
89 | foroutput() { | 89 | foroutput() { |
90 | translate([0,0,l_output]) pushfit(pf,draft=draft); | 90 | translate([0,0,l_output]) pushfit(pf,draft=draft); |
91 | cylinder(d=lod,h=l_output+1,$fn=lod*fnd); | 91 | cylinder(d=lod,h=l_output+1,$fn=lod*fnd); |
92 | } | 92 | } |
93 | hull() { | 93 | hull() { |
94 | forinputs() | 94 | forinputs() |
95 | translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); | 95 | translate([0,0,l_fork]) cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); |
96 | foroutput() | 96 | foroutput() |
97 | cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); | 97 | cylinder(d=liner_id,h=epsilon,$fn=liner_id*fnd); |
98 | } | 98 | } |
99 | if(debug) { | 99 | if(debug) { |
100 | translate([0,0,-20/*TODO:*/]) | 100 | translate([0,0,-20/*TODO:*/]) |
101 | rotate_extrude(angle=angular_step*debug) | 101 | rotate_extrude(angle=angular_step*debug) |
102 | square([50,100]/*TODO:*/); | 102 | square([50,100]/*TODO:*/); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | } | 106 | } |
107 | 107 | ||
108 | multiswitch(debug=2,print=false); | 108 | |
109 | //CUSTOMIZERCUTOFF | ||
110 | multiswitch(debug=1,print=false,inputs=2); | ||