summaryrefslogtreecommitdiff
path: root/another.scad
Unidiff
Diffstat (limited to 'another.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad57
1 files changed, 50 insertions, 7 deletions
diff --git a/another.scad b/another.scad
index 2be24e4..844dc3b 100644
--- a/another.scad
+++ b/another.scad
@@ -22,47 +22,53 @@ module the_extruder(
22 idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height 22 idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height
23 // spring properties 23 // spring properties
24 spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length 24 spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length
25 // filament path properties 25 // filament path properties
26 filament_d = 1.75, 26 filament_d = 1.75,
27 filament_path_d = 2, 27 filament_path_d = 2,
28 filament_guide_d = 4, // PTFE filament guide diameter 28 filament_guide_d = 4, // PTFE filament guide diameter
29 // knob properties 29 // knob properties
30 knob_h = 10, 30 knob_h = 10,
31 knob_bore_l = 4, 31 knob_bore_l = 4,
32 knob_indent_d = 4, 32 knob_indent_d = 4,
33 knob_indents = 12, 33 knob_indents = 12,
34 // spring tensioner
35 st_nut_d = 9, st_nut_h = 4,
36 st_screw_d = 5,
37 st_shell = 4*extrusion_width,
34 38
35 // screw it 39 // screw it
36 mount_screw_d = 3.1, mount_screw_l = 20, 40 mount_screw_d = 3.1, mount_screw_l = 20,
37 mount_screwhead_d=6, mount_screwhead_h=3, 41 mount_screwhead_d=6, mount_screwhead_h=3,
38 42
39 pf = pushfit_embeddest, 43 pf = pushfit_embeddest,
40 44
41 // empty spaces 45 // empty spaces
42 idler_travel = 3, // how far should idler travel when pressed 46 idler_travel = 3, // how far should idler travel when pressed
43 idler_clearance=1, 47 idler_clearance=1,
44 pulley_clearance=2, 48 pulley_clearance=2,
45 lever_v_clearance=.7, // vertical clearance for the lever 49 lever_v_clearance=.7, // vertical clearance for the lever
46 spring_d_clearance=1, 50 spring_d_clearance=1,
47 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion 51 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion
48 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion 52 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion
49 mount_screw_d_tolerance=.4, 53 mount_screw_d_tolerance=.4,
50 idler_v_tolerance=.5, 54 idler_v_tolerance=.5,
51 knob_bore_d_tolerance=.6, 55 knob_bore_d_tolerance=.6,
52 56
53 what="lever", 57 what="lever", // lever|body|knob|springpad|*
54 left=false, 58 left=false,
55 vitamins = true, 59 vitamins = true,
56 supports = false 60 supports = false,
61 tensioner = true,
62 debug = false
57) { 63) {
58 lever_shell = mount_screwhead_h+0.5; 64 lever_shell = mount_screwhead_h+0.5;
59 lever_thickness=max(spring_d+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); 65 lever_thickness=max(spring_d+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell);
60 lsd = idler_d-idler_clearance*2; 66 lsd = idler_d-idler_clearance*2;
61 longwing=gearbox_d/2+spring_d/2+lsd/2; 67 longwing=gearbox_d/2+spring_d/2+lsd/2;
62 h_ = (pulley_d+idler_d)/(2*sqrt(2)); 68 h_ = (pulley_d+idler_d)/(2*sqrt(2));
63 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); 69 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) );
64 spring_dl = idler_travel*longwing/ri; 70 spring_dl = idler_travel*longwing/ri;
65 71
66 filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; 72 filament_elevation=protrusion_h+pulley_elevation+teeth_elevation;
67 ls_z = filament_elevation; // leverspace mid-z 73 ls_z = filament_elevation; // leverspace mid-z
68 body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2); 74 body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2);
@@ -188,26 +194,43 @@ module the_extruder(
188 hull() { 194 hull() {
189 translate([0,-longwing,ls_z]) 195 translate([0,-longwing,ls_z])
190 rotate([0,90,0]) 196 rotate([0,90,0])
191 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);
192 hh=body_h-ls_z; 198 hh=body_h-ls_z;
193 translate([0,0,ls_z-lever_thickness/2]) 199 translate([0,0,ls_z-lever_thickness/2])
194 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]);
195 hhh=ls_z; 201 hhh=ls_z;
196 translate([0,0,0]) 202 translate([0,0,0])
197 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]);
198 } 204 }
199 } 205 }
200 translate([0,-longwing,ls_z]) rotate([0,-90,0]) 206 translate([0,-longwing,ls_z]) rotate([0,-90,0]) {
201 finger_indent(d=lever_thickness-1,r=15); 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]);
209 mirror([0,0,1]) {
210 translate([0,0,st_shell])
211 hull() for(o=[0,spring_d]) translate([0,-o,0])
212 rotate([0,0,30])
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);
215 bigd = spring_d+spring_d_clearance;
216 hf = (bigd-st_screw_d)/2;
217 translate([0,0,st_shell+st_nut_h+st_shell-epsilon])
218 cylinder(d1=st_screw_d,d2=bigd,
219 h=hf+epsilon, $fn=bigd*PI*2 );
220 translate([0,0,st_shell+st_nut_h+st_shell+hf-epsilon])
221 cylinder(d=bigd,h=fsw+1,$fn=bigd*PI*2);
222 }
223 }
224 }
202 } // translate 225 } // translate
203 226
204 // pushfit bracket 227 // pushfit bracket
205 translate([0,0,filament_elevation]) 228 translate([0,0,filament_elevation])
206 rotate([0,0,45]) translate([pulley_d/2,0,0]) 229 rotate([0,0,45]) translate([pulley_d/2,0,0])
207 rotate([-90,0,0]) 230 rotate([-90,0,0])
208 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:*/])
209 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);
210 }//union (first child of difference) 233 }//union (first child of difference)
211 // protrusion 234 // protrusion
212 translate([0,0,-1]) 235 translate([0,0,-1])
213 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);
@@ -251,25 +274,25 @@ module the_extruder(
251 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]);
252 } 275 }
253 276
254 rotate([0,0,-45]) 277 rotate([0,0,-45])
255 translate([0,0,ls_z-ls_h/2]) 278 translate([0,0,ls_z-ls_h/2])
256 cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]); 279 cube(size=[gearbox_d,gearbox_d,lever_thickness+lever_v_clearance]);
257 translate([0,0,ls_z-ls_h/2]) { 280 translate([0,0,ls_z-ls_h/2]) {
258 translate([mount_screwhead_d/2,0,0]) 281 translate([mount_screwhead_d/2,0,0])
259 mirror([0,1,0]) 282 mirror([0,1,0])
260 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]);
261 } 284 }
262 //translate([-mount_d/2,-longwing,filament_elevation]) 285 //translate([-mount_d/2,-longwing,filament_elevation])
263 translate([mount_d/2,-longwing,filament_elevation]) 286 if(!tensioner) translate([mount_d/2,-longwing,filament_elevation])
264 rotate([0,-90,0]) difference() { 287 rotate([0,-90,0]) difference() {
265 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);
266 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);
267 } 290 }
268 //sphere(d=spring_d*3/4,$fn=PI*spring_d); 291 //sphere(d=spring_d*3/4,$fn=PI*spring_d);
269 *difference() { 292 *difference() {
270 // spring support 293 // spring support
271 translate([0,-longwing,filament_elevation]) 294 translate([0,-longwing,filament_elevation])
272 sphere(d=spring_d*3/4,$fn=PI*spring_d); 295 sphere(d=spring_d*3/4,$fn=PI*spring_d);
273 } 296 }
274 297
275 }//difference 298 }//difference
@@ -286,24 +309,39 @@ module the_extruder(
286 for(y=[-gearbox_d:4:gearbox_d]) 309 for(y=[-gearbox_d:4:gearbox_d])
287 translate([0,y-extrusion_width/2,0]) 310 translate([0,y-extrusion_width/2,0])
288 cube(size=[gearbox_d,extrusion_width,body_h]); 311 cube(size=[gearbox_d,extrusion_width,body_h]);
289 }else{ // radial 312 }else{ // radial
290 for(zr=[-65:(65+50)/7:50]) 313 for(zr=[-65:(65+50)/7:50])
291 rotate([0,0,zr]) translate([0,-extrusion_width/2,0]) 314 rotate([0,0,zr]) translate([0,-extrusion_width/2,0])
292 cube(size=[gearbox_d,extrusion_width,body_h]); 315 cube(size=[gearbox_d,extrusion_width,body_h]);
293 } 316 }
294 } 317 }
295 318
296 }//body module 319 }//body module
297 320
321 module springpad() {
322 smalld=st_screw_d+extrusion_width;
323 bigd = spring_d+spring_d_clearance/2;
324 hf = (bigd-smalld)/2;
325 translate([-gearbox_d/2+st_shell+st_nut_h+st_shell+smalld,-longwing,filament_elevation])
326 rotate([0,90,0]) difference() {
327 union() {
328 cylinder(d1=smalld,d2=bigd,h=hf,$fn=bigd*PI*2);
329 translate([0,0,hf-epsilon])
330 cylinder(d=bigd,h=hf*2,$fn=bigd*PI*2);
331 }
332 cylinder(d=st_screw_d,h=2*hf,$fn=st_screw_d*PI*2);
333 }
334 }
335
298 module knob() { 336 module knob() {
299 ch = knob_indent_d/2; 337 ch = knob_indent_d/2;
300 translate([0,0,body_h+epsilon]) { 338 translate([0,0,body_h+epsilon]) {
301 mirror([0,0,1]) translate([0,0,-epsilon]) { 339 mirror([0,0,1]) translate([0,0,-epsilon]) {
302 difference() { 340 difference() {
303 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);
304 translate([0,0,-1]) difference() { 342 translate([0,0,-1]) difference() {
305 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);
306 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])
307 cube([bore_d+2,bore_d/2,knob_bore_l+4]); 345 cube([bore_d+2,bore_d/2,knob_bore_l+4]);
308 } 346 }
309 } 347 }
@@ -313,25 +351,30 @@ module the_extruder(
313 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);
314 translate([0,0,ch]) 352 translate([0,0,ch])
315 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);
316 translate([0,0,knob_h-ch]) 354 translate([0,0,knob_h-ch])
317 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);
318 } 356 }
319 for(a=[0:360/knob_indents:359]) rotate([0,0,a]) 357 for(a=[0:360/knob_indents:359]) rotate([0,0,a])
320 translate([0,gearbox_d/2,-1]) 358 translate([0,gearbox_d/2,-1])
321 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);
322 } 360 }
323 } 361 }
324 }//knob module 362 }//knob module
325 363
326 mirrorleft() 364 mirrorleft()
327 if(what=="lever") color("green",0.7) lever(); 365 if(what=="lever") color("green",0.7) lever();
328 else if(what=="body") color("yellow",0.7) body(); 366 else if(what=="body") color("yellow",0.7) body();
329 else if(what=="knob") color("red",0.7) knob(); 367 else if(what=="knob") color("red",0.7) knob();
330 else if(what=="both" || what=="*") { 368 else if(what=="springpad") color("blue",0.7) springpad();
369 else if(what=="both") {
370 color("green",0.7) lever();
371 color("yellow",0.7) body();
372 }else{
331 color("green",0.7) lever(); 373 color("green",0.7) lever();
332 color("yellow",0.7) body(); 374 color("yellow",0.7) body();
333 color("red",0.7) knob(); 375 color("red",0.7) knob();
376 color("blue",0.7) springpad();
334 } 377 }
335} 378}
336 379
337the_extruder(what="both",left=false); 380the_extruder(what="both",left=false);