-rw-r--r-- | another.scad | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/another.scad b/another.scad index 844dc3b..cd084ce 100644 --- a/another.scad +++ b/another.scad | |||
@@ -100,281 +100,281 @@ module the_extruder( | |||
100 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); | 100 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); |
101 | translate([0,0,protrusion_h]) { | 101 | translate([0,0,protrusion_h]) { |
102 | difference() { | 102 | difference() { |
103 | cylinder(d=bore_d,h=bore_l,$fn=30); | 103 | cylinder(d=bore_d,h=bore_l,$fn=30); |
104 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) | 104 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) |
105 | cube([bore_d+2,bore_d/2,bore_l+2]); | 105 | cube([bore_d+2,bore_d/2,bore_l+2]); |
106 | } | 106 | } |
107 | translate([0,0,pulley_elevation]) { | 107 | translate([0,0,pulley_elevation]) { |
108 | cylinder(d=pulley_d,h=pulley_h,$fn=30); | 108 | cylinder(d=pulley_d,h=pulley_h,$fn=30); |
109 | translate([0,0,teeth_elevation]) { | 109 | translate([0,0,teeth_elevation]) { |
110 | place_idler() { | 110 | place_idler() { |
111 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); | 111 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); |
112 | cylinder(d=idler_id,h=lever_thickness+2,center=true,$fn=30); | 112 | cylinder(d=idler_id,h=lever_thickness+2,center=true,$fn=30); |
113 | }//place idler | 113 | }//place idler |
114 | // filament path | 114 | // filament path |
115 | rotate([0,0,45]) translate([(pulley_d-filament_path_d)/2,0,0]) { | 115 | rotate([0,0,45]) translate([(pulley_d-filament_path_d)/2,0,0]) { |
116 | rotate([90,0,0]) cylinder(d=filament_d,h=gearbox_d*2,center=true,$fn=15); | 116 | rotate([90,0,0]) cylinder(d=filament_d,h=gearbox_d*2,center=true,$fn=15); |
117 | rotate([-90,0,0]) | 117 | rotate([-90,0,0]) |
118 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) | 118 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) |
119 | pushfit(pf); | 119 | pushfit(pf); |
120 | } | 120 | } |
121 | }//translate teeth | 121 | }//translate teeth |
122 | }//translate pulley | 122 | }//translate pulley |
123 | }//translate protrusion | 123 | }//translate protrusion |
124 | }//vitamins | 124 | }//vitamins |
125 | 125 | ||
126 | module lever() { | 126 | module lever() { |
127 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { | 127 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { |
128 | difference() { | 128 | difference() { |
129 | union() { | 129 | union() { |
130 | hull() { | 130 | hull() { |
131 | place_idler() | 131 | place_idler() |
132 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 132 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
133 | translate([mount_d/2,0,0]) | 133 | translate([mount_d/2,0,0]) |
134 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 134 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
135 | }//hull | 135 | }//hull |
136 | hull() { | 136 | hull() { |
137 | translate([mount_d/2,0,0]) | 137 | translate([mount_d/2,0,0]) |
138 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 138 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
139 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) | 139 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) |
140 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); | 140 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); |
141 | }//hull | 141 | }//hull |
142 | }//union | 142 | }//union |
143 | 143 | ||
144 | // filament path | 144 | // filament path |
145 | place_idler() translate([-(idler_d+filament_path_d)/2,0,0]) rotate([90,0,0]) { | 145 | place_idler() translate([-(idler_d+filament_path_d)/2,0,0]) rotate([90,0,0]) { |
146 | cylinder(d=filament_path_d,h=3*gearbox_d,center=true,$fn=30); | 146 | cylinder(d=filament_path_d,h=3*gearbox_d,center=true,$fn=30); |
147 | translate([0,-filament_path_d/2/sqrt(2),0]) rotate([0,0,45]) | 147 | translate([0,-filament_path_d/2/sqrt(2),0]) rotate([0,0,45]) |
148 | cube(size=[filament_path_d/2,filament_path_d/2,3*gearbox_d],center=true); | 148 | cube(size=[filament_path_d/2,filament_path_d/2,3*gearbox_d],center=true); |
149 | } | 149 | } |
150 | 150 | ||
151 | // idler space and mounting hole | 151 | // idler space and mounting hole |
152 | place_idler() { | 152 | place_idler() { |
153 | difference() { | 153 | difference() { |
154 | cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); | 154 | cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); |
155 | if(supports) for(y=[-lsd/2+extrusion_width:(lsd-2*extrusion_width)/3:lsd/2-extrusion_width]) | 155 | if(supports) for(y=[-lsd/2+extrusion_width:(lsd-2*extrusion_width)/3:lsd/2-extrusion_width]) |
156 | translate([-lsd/2-1,y-extrusion_width/2,-idler_h/2-idler_v_tolerance/2-1]) | 156 | translate([-lsd/2-1,y-extrusion_width/2,-idler_h/2-idler_v_tolerance/2-1]) |
157 | cube(size=[lsd+2,extrusion_width,idler_h+idler_v_tolerance+2]); | 157 | cube(size=[lsd+2,extrusion_width,idler_h+idler_v_tolerance+2]); |
158 | } | 158 | } |
159 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=30); | 159 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=30); |
160 | translate([0,0,lever_thickness/2-mount_screwhead_h]) | 160 | translate([0,0,lever_thickness/2-mount_screwhead_h]) |
161 | cylinder(d=mount_screwhead_d,h=mount_screwhead_h+1,$fn=2*PI*mount_screwhead_d); | 161 | cylinder(d=mount_screwhead_d,h=mount_screwhead_h+1,$fn=2*PI*mount_screwhead_d); |
162 | } | 162 | } |
163 | // mounting screw hole | 163 | // mounting screw hole |
164 | translate([mount_d/2,0,0]) | 164 | translate([mount_d/2,0,0]) |
165 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=2*PI*mount_screw_d); | 165 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=2*PI*mount_screw_d); |
166 | 166 | ||
167 | // lever end | 167 | // lever end |
168 | translate([mount_d/2,0,0]) rotate([0,90,0]) { | 168 | translate([mount_d/2,0,0]) rotate([0,90,0]) { |
169 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); | 169 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); |
170 | translate([0,-longwing,0]) | 170 | translate([0,-longwing,0]) |
171 | mirror([0,0,1]) | 171 | mirror([0,0,1]) |
172 | difference() { | 172 | difference() { |
173 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=2*PI*spring_d); | 173 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=2*PI*spring_d); |
174 | sphere(d=spring_d*3/4,$fn=PI*spring_d); | 174 | sphere(d=spring_d*3/4,$fn=PI*spring_d); |
175 | } | 175 | } |
176 | }//rotate-translate | 176 | }//rotate-translate |
177 | }//difference | 177 | }//difference |
178 | // bridging patch | 178 | // bridging patch |
179 | place_idler() | 179 | place_idler() |
180 | translate([0,0,lever_thickness/2-mount_screwhead_h]) | 180 | translate([0,0,lever_thickness/2-mount_screwhead_h]) |
181 | mirror([0,0,1]) | 181 | mirror([0,0,1]) |
182 | cylinder(d=mount_screwhead_d,h=layer_height); | 182 | cylinder(d=mount_screwhead_d,h=layer_height); |
183 | }//translate | 183 | }//translate |
184 | }//lever module | 184 | }//lever module |
185 | 185 | ||
186 | module body() { | 186 | module body() { |
187 | difference() { | 187 | difference() { |
188 | union() { | 188 | union() { |
189 | cylinder(d=gearbox_d,h=body_h,$fn=2*PI*gearbox_d); | 189 | cylinder(d=gearbox_d,h=body_h,$fn=2*PI*gearbox_d); |
190 | // finger and spring support | 190 | // finger and spring support |
191 | fsw = gearbox_d/2+mount_screwhead_d/2; | 191 | fsw = gearbox_d/2+mount_screwhead_d/2; |
192 | translate([-gearbox_d/2,0,0]) difference() { | 192 | translate([-gearbox_d/2,0,0]) difference() { |
193 | union() { | 193 | union() { |
194 | hull() { | 194 | hull() { |
195 | translate([0,-longwing,ls_z]) | 195 | translate([0,-longwing,ls_z]) |
196 | rotate([0,90,0]) | 196 | rotate([0,90,0]) |
197 | cylinder(d=max(lever_thickness,spring_d+spring_d_clearance+2*extrusion_width),h=fsw,$fn=2*PI*lever_thickness); | 197 | cylinder(d=max(lever_thickness,spring_d+spring_d_clearance+2*extrusion_width),h=fsw,$fn=2*PI*lever_thickness); |
198 | hh=body_h-ls_z; | 198 | hh=body_h-ls_z; |
199 | translate([0,0,ls_z-lever_thickness/2]) | 199 | translate([0,0,ls_z-lever_thickness/2]) |
200 | mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]); | 200 | mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]); |
201 | hhh=ls_z; | 201 | hhh=ls_z; |
202 | translate([0,0,0]) | 202 | translate([0,0,0]) |
203 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); | 203 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); |
204 | } | 204 | } |
205 | } | 205 | } |
206 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { | 206 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { |
207 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { | 207 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { |
208 | if(debug) translate([0,-gearbox_d,-gearbox_d]) cube(size=[body_h/2+1,gearbox_d,gearbox_d+2]); | 208 | if(debug) translate([0,-gearbox_d,-gearbox_d]) cube(size=[body_h/2+1,gearbox_d,gearbox_d+2]); |
209 | mirror([0,0,1]) { | 209 | mirror([0,0,1]) { |
210 | translate([0,0,st_shell]) | 210 | translate([0,0,st_shell]) |
211 | hull() for(o=[0,spring_d]) translate([0,-o,0]) | 211 | hull() for(o=[0,spring_d]) translate([0,-o,0]) |
212 | rotate([0,0,30]) | 212 | rotate([0,0,30]) |
213 | cylinder(d=st_nut_d,h=st_nut_h,$fn=6); | 213 | cylinder(d=st_nut_d,h=st_nut_h,$fn=6); |
214 | translate([0,0,-1]) cylinder(d=st_screw_d,h=fsw+2,$fn=st_screw_d*PI*2); | 214 | translate([0,0,-1]) cylinder(d=st_screw_d,h=fsw+2,$fn=st_screw_d*PI*2); |
215 | bigd = spring_d+spring_d_clearance; | 215 | bigd = spring_d+spring_d_clearance; |
216 | hf = (bigd-st_screw_d)/2; | 216 | hf = (bigd-st_screw_d)/2; |
217 | translate([0,0,st_shell+st_nut_h+st_shell-epsilon]) | 217 | translate([0,0,st_shell+st_nut_h+st_shell-epsilon]) |
218 | cylinder(d1=st_screw_d,d2=bigd, | 218 | cylinder(d1=st_screw_d,d2=bigd, |
219 | h=hf+epsilon, $fn=bigd*PI*2 ); | 219 | h=hf+epsilon, $fn=bigd*PI*2 ); |
220 | translate([0,0,st_shell+st_nut_h+st_shell+hf-epsilon]) | 220 | translate([0,0,st_shell+st_nut_h+st_shell+hf-epsilon]) |
221 | cylinder(d=bigd,h=fsw+1,$fn=bigd*PI*2); | 221 | cylinder(d=bigd,h=fsw+1,$fn=bigd*PI*2); |
222 | } | 222 | } |
223 | } | 223 | } |
224 | } | 224 | } |
225 | } // translate | 225 | } // translate |
226 | 226 | ||
227 | // pushfit bracket | 227 | // pushfit bracket |
228 | translate([0,0,filament_elevation]) | 228 | translate([0,0,filament_elevation]) |
229 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 229 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
230 | rotate([-90,0,0]) | 230 | rotate([-90,0,0]) |
231 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) | 231 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) |
232 | cylinder(r=min(body_h-filament_elevation,filament_elevation)/sin(60)-epsilon,h=pf_h(pf)+gearbox_d/2/*TODO:*/,$fn=6); | 232 | cylinder(r=min(body_h-filament_elevation,filament_elevation)/sin(60)-epsilon,h=pf_h(pf)+gearbox_d/2/*TODO:*/,$fn=6); |
233 | }//union (first child of difference) | 233 | }//union (first child of difference) |
234 | // protrusion | 234 | // protrusion |
235 | translate([0,0,-1]) | 235 | translate([0,0,-1]) |
236 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=2*PI*protrusion_d); | 236 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=2*PI*protrusion_d); |
237 | // mount screw holes | 237 | // mount screw holes |
238 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { | 238 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { |
239 | translate([0,0,mount_screw_l-mounthole_depth/2-layer_height-1]) | 239 | translate([0,0,mount_screw_l-mounthole_depth/2-layer_height-1]) |
240 | mirror([0,0,1]) | 240 | mirror([0,0,1]) |
241 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 241 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
242 | h=mount_screw_l-mounthole_depth/2-layer_height+1, | 242 | h=mount_screw_l-mounthole_depth/2-layer_height+1, |
243 | $fn=2*PI*mount_screw_d); | 243 | $fn=2*PI*mount_screw_d); |
244 | translate([0,0,mount_screw_l-mounthole_depth/2]) | 244 | translate([0,0,mount_screw_l-mounthole_depth/2]) |
245 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=2*PI*mount_screwhead_d); | 245 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=2*PI*mount_screwhead_d); |
246 | }//for | 246 | }//for |
247 | // pushfit | 247 | // pushfit |
248 | translate([0,0,filament_elevation]) | 248 | translate([0,0,filament_elevation]) |
249 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 249 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
250 | rotate([-90,0,0]) | 250 | rotate([-90,0,0]) |
251 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) | 251 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) |
252 | rotate([0,0,180]) { | 252 | rotate([0,0,180]) { |
253 | pushfit(pf); | 253 | pushfit(pf); |
254 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=2*PI*filament_guide_d); | 254 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=2*PI*filament_guide_d); |
255 | translate([0,-filament_guide_d/2/sqrt(2),0]) | 255 | translate([0,-filament_guide_d/2/sqrt(2),0]) |
256 | rotate([0,0,45]) | 256 | rotate([0,0,45]) |
257 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); | 257 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); |
258 | } | 258 | } |
259 | // pulley | 259 | // pulley |
260 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=2*PI*(pulley_d+pulley_clearance)); | 260 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=2*PI*(pulley_d+pulley_clearance)); |
261 | // leverspace | 261 | // leverspace |
262 | hull() for(x=[0,gearbox_d]) | 262 | hull() for(x=[0,gearbox_d]) |
263 | rotate([0,0,45]) | 263 | rotate([0,0,45]) |
264 | translate([x,0,ls_z-ls_h/2]) | 264 | translate([x,0,ls_z-ls_h/2]) |
265 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=2*PI*idler_d); | 265 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=2*PI*idler_d); |
266 | 266 | ||
267 | a=cos(45)*(pulley_d+idler_d)/2; | 267 | a=cos(45)*(pulley_d+idler_d)/2; |
268 | b=mount_d/2-a; | 268 | b=mount_d/2-a; |
269 | x=sqrt(pow(a,2)+pow(b,2)); | 269 | x=sqrt(pow(a,2)+pow(b,2)); |
270 | translate([mount_d/2,0,ls_z]) | 270 | translate([mount_d/2,0,ls_z]) |
271 | intersection() { | 271 | intersection() { |
272 | r = x+idler_d/2+1;/* TODO: */ | 272 | r = x+idler_d/2+1;/* TODO: */ |
273 | cylinder(r=r,h=ls_h,center=true); | 273 | cylinder(r=r,h=ls_h,center=true); |
274 | translate([-r-1,0,-1]) cube(size=[2*r+2,r+1,ls_h+2]); | 274 | translate([-r-1,0,-1]) cube(size=[2*r+2,r+1,ls_h+2]); |
275 | } | 275 | } |
276 | 276 | ||
277 | rotate([0,0,-45]) | 277 | rotate([0,0,-45]) |
278 | translate([0,0,ls_z-ls_h/2]) | 278 | translate([0,0,ls_z-ls_h/2]) |
279 | cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); | 279 | cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); |
280 | translate([0,0,ls_z-ls_h/2]) { | 280 | translate([0,0,ls_z-ls_h/2]) { |
281 | translate([mount_screwhead_d/2,0,0]) | 281 | translate([mount_screwhead_d/2,0,0]) |
282 | mirror([0,1,0]) | 282 | mirror([0,1,0]) |
283 | cube(size=[gearbox_d,gearbox_d/2+1,lever_thickness+lever_v_clearance]); | 283 | cube(size=[gearbox_d,gearbox_d/2+1,lever_thickness+lever_v_clearance]); |
284 | } | 284 | } |
285 | //translate([-mount_d/2,-longwing,filament_elevation]) | 285 | //translate([-mount_d/2,-longwing,filament_elevation]) |
286 | if(!tensioner) translate([mount_d/2,-longwing,filament_elevation]) | 286 | if(!tensioner) translate([mount_d/2,-longwing,filament_elevation]) |
287 | rotate([0,-90,0]) difference() { | 287 | rotate([0,-90,0]) difference() { |
288 | cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=PI*spring_d); | 288 | cylinder(d=spring_d+spring_d_clearance,h=spring_lc+spring_dl,$fn=PI*spring_d); |
289 | translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=PI*spring_d); | 289 | translate([0,0,spring_lc+spring_dl]) sphere(d=spring_d*3/4,$fn=PI*spring_d); |
290 | } | 290 | } |
291 | //sphere(d=spring_d*3/4,$fn=PI*spring_d); | 291 | //sphere(d=spring_d*3/4,$fn=PI*spring_d); |
292 | *difference() { | 292 | * difference() { |
293 | // spring support | 293 | // spring support |
294 | translate([0,-longwing,filament_elevation]) | 294 | translate([0,-longwing,filament_elevation]) |
295 | sphere(d=spring_d*3/4,$fn=PI*spring_d); | 295 | sphere(d=spring_d*3/4,$fn=PI*spring_d); |
296 | } | 296 | } |
297 | 297 | ||
298 | }//difference | 298 | }//difference |
299 | 299 | ||
300 | if(supports) intersection() { | 300 | if(supports) intersection() { |
301 | difference() { | 301 | difference() { |
302 | translate([0,0,ls_z-ls_h/2-epsilon]) | 302 | translate([0,0,ls_z-ls_h/2-epsilon]) |
303 | cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=2*PI*gearbox_d); | 303 | cylinder(d=gearbox_d,h=ls_h+2*epsilon,$fn=2*PI*gearbox_d); |
304 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=2*PI*(pulley_d+pulley_clearance)); | 304 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=2*PI*(pulley_d+pulley_clearance)); |
305 | } | 305 | } |
306 | // supports | 306 | // supports |
307 | // TODO: hardcoded stuff below… | 307 | // TODO: hardcoded stuff below… |
308 | if(false) { // parallel | 308 | if(false) { // parallel |
309 | for(y=[-gearbox_d:4:gearbox_d]) | 309 | for(y=[-gearbox_d:4:gearbox_d]) |
310 | translate([0,y-extrusion_width/2,0]) | 310 | translate([0,y-extrusion_width/2,0]) |
311 | cube(size=[gearbox_d,extrusion_width,body_h]); | 311 | cube(size=[gearbox_d,extrusion_width,body_h]); |
312 | }else{ // radial | 312 | }else{ // radial |
313 | for(zr=[-65:(65+50)/7:50]) | 313 | for(zr=[-65:(65+50)/7:50]) |
314 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) | 314 | rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) |
315 | cube(size=[gearbox_d,extrusion_width,body_h]); | 315 | cube(size=[gearbox_d,extrusion_width,body_h]); |
316 | } | 316 | } |
317 | } | 317 | } |
318 | 318 | ||
319 | }//body module | 319 | }//body module |
320 | 320 | ||
321 | module springpad() { | 321 | module springpad() { |
322 | smalld=st_screw_d+extrusion_width; | 322 | smalld=st_screw_d+extrusion_width; |
323 | bigd = spring_d+spring_d_clearance/2; | 323 | bigd = spring_d+spring_d_clearance/2; |
324 | hf = (bigd-smalld)/2; | 324 | hf = (bigd-smalld)/2; |
325 | translate([-gearbox_d/2+st_shell+st_nut_h+st_shell+smalld,-longwing,filament_elevation]) | 325 | translate([-gearbox_d/2+st_shell+st_nut_h+st_shell+smalld,-longwing,filament_elevation]) |
326 | rotate([0,90,0]) difference() { | 326 | rotate([0,90,0]) difference() { |
327 | union() { | 327 | union() { |
328 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=bigd*PI*2); | 328 | cylinder(d1=smalld,d2=bigd,h=hf,$fn=bigd*PI*2); |
329 | translate([0,0,hf-epsilon]) | 329 | translate([0,0,hf-epsilon]) |
330 | cylinder(d=bigd,h=hf*2,$fn=bigd*PI*2); | 330 | cylinder(d=bigd,h=hf*2,$fn=bigd*PI*2); |
331 | } | 331 | } |
332 | cylinder(d=st_screw_d,h=2*hf,$fn=st_screw_d*PI*2); | 332 | cylinder(d=st_screw_d,h=2*hf,$fn=st_screw_d*PI*2); |
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
336 | module knob() { | 336 | module knob() { |
337 | ch = knob_indent_d/2; | 337 | ch = knob_indent_d/2; |
338 | translate([0,0,body_h+epsilon]) { | 338 | translate([0,0,body_h+epsilon]) { |
339 | mirror([0,0,1]) translate([0,0,-epsilon]) { | 339 | mirror([0,0,1]) translate([0,0,-epsilon]) { |
340 | difference() { | 340 | difference() { |
341 | cylinder(d=pulley_d,h=knob_bore_l,$fn=pulley_d*PI*2); | 341 | cylinder(d=pulley_d,h=knob_bore_l,$fn=pulley_d*PI*2); |
342 | translate([0,0,-1]) difference() { | 342 | translate([0,0,-1]) difference() { |
343 | cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2); | 343 | cylinder(d=bore_d+knob_bore_d_tolerance,h=knob_bore_l+2); |
344 | translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1]) | 344 | translate([-bore_d/2-1,bore_dd-bore_d/2+knob_bore_d_tolerance/2,-1]) |
345 | cube([bore_d+2,bore_d/2,knob_bore_l+4]); | 345 | cube([bore_d+2,bore_d/2,knob_bore_l+4]); |
346 | } | 346 | } |
347 | } | 347 | } |
348 | } | 348 | } |
349 | difference() { | 349 | difference() { |
350 | union() { | 350 | union() { |
351 | cylinder(d1=gearbox_d-2*ch,d2=gearbox_d,h=ch+epsilon,$fn=PI*gearbox_d*2); | 351 | cylinder(d1=gearbox_d-2*ch,d2=gearbox_d,h=ch+epsilon,$fn=PI*gearbox_d*2); |
352 | translate([0,0,ch]) | 352 | translate([0,0,ch]) |
353 | cylinder(d=gearbox_d,h=knob_h-2*ch+epsilon,$fn=PI*gearbox_d*2); | 353 | cylinder(d=gearbox_d,h=knob_h-2*ch+epsilon,$fn=PI*gearbox_d*2); |
354 | translate([0,0,knob_h-ch]) | 354 | translate([0,0,knob_h-ch]) |
355 | cylinder(d1=gearbox_d,d2=gearbox_d-2*ch,h=ch,$fn=PI*gearbox_d*2); | 355 | cylinder(d1=gearbox_d,d2=gearbox_d-2*ch,h=ch,$fn=PI*gearbox_d*2); |
356 | } | 356 | } |
357 | for(a=[0:360/knob_indents:359]) rotate([0,0,a]) | 357 | for(a=[0:360/knob_indents:359]) rotate([0,0,a]) |
358 | translate([0,gearbox_d/2,-1]) | 358 | translate([0,gearbox_d/2,-1]) |
359 | cylinder(d=knob_indent_d,h=knob_h+2,$fn=knob_indent_d*PI*2); | 359 | cylinder(d=knob_indent_d,h=knob_h+2,$fn=knob_indent_d*PI*2); |
360 | } | 360 | } |
361 | } | 361 | } |
362 | }//knob module | 362 | }//knob module |
363 | 363 | ||
364 | mirrorleft() | 364 | mirrorleft() |
365 | if(what=="lever") color("green",0.7) lever(); | 365 | if(what=="lever") color("green",0.7) lever(); |
366 | else if(what=="body") color("yellow",0.7) body(); | 366 | else if(what=="body") color("yellow",0.7) body(); |
367 | else if(what=="knob") color("red",0.7) knob(); | 367 | else if(what=="knob") color("red",0.7) knob(); |
368 | else if(what=="springpad") color("blue",0.7) springpad(); | 368 | else if(what=="springpad") color("blue",0.7) springpad(); |
369 | else if(what=="both") { | 369 | else if(what=="both") { |
370 | color("green",0.7) lever(); | 370 | color("green",0.7) lever(); |
371 | color("yellow",0.7) body(); | 371 | color("yellow",0.7) body(); |
372 | }else{ | 372 | }else{ |
373 | color("green",0.7) lever(); | 373 | color("green",0.7) lever(); |
374 | color("yellow",0.7) body(); | 374 | color("yellow",0.7) body(); |
375 | color("red",0.7) knob(); | 375 | color("red",0.7) knob(); |
376 | color("blue",0.7) springpad(); | 376 | color("blue",0.7) springpad(); |
377 | } | 377 | } |
378 | } | 378 | } |
379 | 379 | ||
380 | the_extruder(what="both",left=false); | 380 | the_extruder(what="both",left=false); |