summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-08-22 11:44:04 (UTC)
committer Michael Krelin <hacker@klever.net>2018-08-22 11:44:04 (UTC)
commit5bd8dd3c057007ab62e74682036131a15e49e53e (patch) (unidiff)
treee00c34ee65865e394520903f806f26f94af2865e
parent55fdf941a3514b04e7c49d4428b6cd141e087783 (diff)
downloadextrudery-5bd8dd3c057007ab62e74682036131a15e49e53e.zip
extrudery-5bd8dd3c057007ab62e74682036131a15e49e53e.tar.gz
extrudery-5bd8dd3c057007ab62e74682036131a15e49e53e.tar.bz2
somewhat finalized output funnel
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad23
1 files changed, 9 insertions, 14 deletions
diff --git a/another.scad b/another.scad
index 4a9fc01..8fd9356 100644
--- a/another.scad
+++ b/another.scad
@@ -26,66 +26,66 @@ module the_extruder(
26 spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length 26 spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length
27 // filament path properties 27 // filament path properties
28 filament_d = 1.75, 28 filament_d = 1.75,
29 filament_path_d = 2, 29 filament_path_d = 2,
30 filament_guide_d = 4, // PTFE filament guide diameter 30 filament_guide_d = 4, // PTFE filament guide diameter
31 // knob properties 31 // knob properties
32 knob_h = 10, 32 knob_h = 10,
33 knob_bore_l = 4, 33 knob_bore_l = 4,
34 knob_indent_d = 4, 34 knob_indent_d = 4,
35 knob_indents = 12, 35 knob_indents = 12,
36 // spring tensioner 36 // spring tensioner
37 st_nut_d = 9, st_nut_h = 4, 37 st_nut_d = 9, st_nut_h = 4,
38 st_screw_d = 5, 38 st_screw_d = 5,
39 st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width, 39 st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width,
40 40
41 // screw it 41 // screw it
42 mount_screw_d = 3.1, mount_screw_l = 20, 42 mount_screw_d = 3.1, mount_screw_l = 20,
43 mount_screwhead_d=6, mount_screwhead_h=3, 43 mount_screwhead_d=6, mount_screwhead_h=3,
44 idler_screw_d = 3, 44 idler_screw_d = 3,
45 idler_screwhead_d=6, idler_screwhead_h=3, 45 idler_screwhead_d=6, idler_screwhead_h=3,
46 46
47 pf = pushfit_embeddest, 47 pf = pushfit_embeddest,
48 pf_shell = max(3*layer_height,3*extrusion_width), 48 pf_shell = max(3*layer_height,3*extrusion_width),
49 pf_smooth = true, 49 pf_smooth = true,
50 pf_guidelen = 3, // the length of ptfe guide before pushfit
51 50
52 // empty spaces 51 // empty spaces
53 idler_travel = 3, // how far should idler travel when pressed 52 idler_travel = 3, // how far should idler travel when pressed
54 idler_clearance=1, 53 idler_clearance=1,
55 pulley_d_clearance=2, 54 pulley_d_clearance=2,
56 lever_v_clearance=.7, // vertical clearance for the lever 55 lever_v_clearance=.7, // vertical clearance for the lever
57 spring_d_clearance=1, 56 spring_d_clearance=1,
58 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion 57 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion
59 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion 58 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion
60 mount_screw_d_tolerance=.4, 59 mount_screw_d_tolerance=.4,
61 idler_v_tolerance=.5, 60 idler_v_tolerance=.5,
62 knob_bore_d_tolerance=.6, 61 knob_bore_d_tolerance=.6,
63 st_nut_h_tolerance=.2, 62 st_nut_h_tolerance=.2,
64 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ 63 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */
65 st_screw_d_tolerance=.5, 64 st_screw_d_tolerance=.5,
66 65
67 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis. 66 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis.
67 min_xy_shell = 2*extrusion_width,
68 68
69 what="lever", // lever|body|knob|springpad|* 69 what="lever", // lever|body|knob|springpad|*
70 left=false, 70 left=false,
71 vitamins = true, 71 vitamins = true,
72 supports = false, bridges = true, 72 supports = false, bridges = true,
73 tensioner = true, 73 tensioner = true,
74 debug = false 74 debug = false
75) { 75) {
76 fnd = 2*PI; fnr = 2*fnd; 76 fnd = 2*PI; fnr = 2*fnd;
77 77
78 idler_filament_offset = filament_path_d/2; // -filament_offset; 78 idler_filament_offset = filament_path_d/2; // -filament_offset;
79 lever_shell = mount_screwhead_h+0.5; 79 lever_shell = mount_screwhead_h+0.5;
80 lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); 80 lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell);
81 lsd = idler_d-idler_clearance*2; 81 lsd = idler_d-idler_clearance*2;
82 longwing=gearbox_d/2+spring_d/2+lsd/2; 82 longwing=gearbox_d/2+spring_d/2+lsd/2;
83 h_ = (pulley_d+idler_d)/(2*sqrt(2)); 83 h_ = (pulley_d+idler_d)/(2*sqrt(2));
84 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); 84 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) );
85 spring_dl = idler_travel*longwing/ri; 85 spring_dl = idler_travel*longwing/ri;
86 86
87 mount_min_depth = mounthole_min_depth ? mounthole_min_depth : mounthole_depth-1; 87 mount_min_depth = mounthole_min_depth ? mounthole_min_depth : mounthole_depth-1;
88 mount_max_depth = mounthole_max_depth ? mounthole_max_depth : mounthole_depth+1; 88 mount_max_depth = mounthole_max_depth ? mounthole_max_depth : mounthole_depth+1;
89 filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; 89 filament_elevation=protrusion_h+pulley_elevation+teeth_elevation;
90 ls_z = filament_elevation; // leverspace mid-z 90 ls_z = filament_elevation; // leverspace mid-z
91 ls_h = lever_thickness+lever_v_clearance; // leverspace height 91 ls_h = lever_thickness+lever_v_clearance; // leverspace height
@@ -290,68 +290,63 @@ module the_extruder(
290 translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]); 290 translate([0,-pfba,0]) cube(size=[pfbs,pfb2a,pfbl]);
291 cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]); 291 cube(size=[pfbs,filament_elevation,pfbl-filament_elevation+pfba]);
292 mirror([0,1,0]) 292 mirror([0,1,0])
293 cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]); 293 cube(size=[pfbs,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfba]);
294 }//hull 294 }//hull
295 }//translate*/ 295 }//translate*/
296 }//if(pf_smooth) 296 }//if(pf_smooth)
297 }//translate rotate translate rotate translate 297 }//translate rotate translate rotate translate
298 }//union (first child of difference) 298 }//union (first child of difference)
299 299
300 // protrusion 300 // protrusion
301 translate([0,0,-1]) 301 translate([0,0,-1])
302 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); 302 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h));
303 // mount screw holes 303 // mount screw holes
304 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { 304 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) {
305 translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) 305 translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)])
306 mirror([0,0,1]) 306 mirror([0,0,1])
307 cylinder(d=mount_screw_d+mount_screw_d_tolerance, 307 cylinder(d=mount_screw_d+mount_screw_d_tolerance,
308 h=mount_screw_l-mount_depth+1, 308 h=mount_screw_l-mount_depth+1,
309 $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); 309 $fn=fnd*(mount_screw_d+mount_screw_d_tolerance));
310 translate([0,0,mount_screw_l-mount_depth]) 310 translate([0,0,mount_screw_l-mount_depth])
311 cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); 311 cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d);
312 }//for 312 }//for
313 // pushfit 313 // pushfit
314 pf_offset = mount_d/sqrt(2)/2+mount_screw_d;
314 translate([0,0,filament_elevation]) 315 translate([0,0,filament_elevation])
315 rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) 316 rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0])
316 rotate([-90,0,0]) 317 rotate([-90,0,0])
317 translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) 318 translate([0,0,pf_offset])
318 rotate([0,0,180]) { 319 rotate([0,0,180]) {
319 pushfit(pf); 320 pushfit(pf);
320 mirror([0,0,1]) { 321 mirror([0,0,1]) {
321 translate([0,0,-epsilon])
322 teardrop(d=filament_guide_d,h=pf_guidelen+epsilon,angle=225);
323 nl = 3.5; /* TODO: */
324 translate([0,0,pf_guidelen-1])
325 teardrop(d=filament_path_d,h=nl+2,angle=-225);
326 fh = (filament_guide_d-filament_path_d)/2; 322 fh = (filament_guide_d-filament_path_d)/2;
327 union() { 323 fo = pf_offset-(idler_d+idler_clearance)/2-fh;
328 translate([0,0,pf_guidelen+nl]) 324 translate([0,0,-1]) teardrop(d=filament_guide_d,h=fo-extrusion_width+1,angle=225);
329 cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d); 325 translate([0,0,-1]) teardrop(d=filament_path_d,h=gearbox_d/2+1,angle=-225);
330 translate([0,0,pf_guidelen+nl+fh-epsilon]) 326 translate([0,0,fo+epsilon])
331 teardrop(d=filament_guide_d,h=gearbox_d/2,angle=225); 327 cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d);
332 } 328 }//mirror
333 }
334 }//rotate translate rotate translate rotate translate 329 }//rotate translate rotate translate rotate translate
335 // pulley 330 // pulley
336 cylinder(d=pulley_d+pulley_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); 331 cylinder(d=pulley_d+pulley_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance));
337 // leverspace 332 // leverspace
338 hull() for(x=[0,gearbox_d]) 333 hull() for(x=[0,gearbox_d])
339 rotate([0,0,45]) 334 rotate([0,0,45])
340 translate([x,0,ls_z-ls_h/2]) 335 translate([x,0,ls_z-ls_h/2])
341 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); 336 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance));
342 337
343 // idler clearance 338 // idler clearance
344 a=cos(45)*(pulley_d+idler_d)/2; 339 a=cos(45)*(pulley_d+idler_d)/2;
345 b=mount_d/2-a; 340 b=mount_d/2-a;
346 x=sqrt(pow(a,2)+pow(b,2)); 341 x=sqrt(pow(a,2)+pow(b,2));
347 translate([mount_d/2,0,ls_z]) 342 translate([mount_d/2,0,ls_z])
348 intersection() { 343 intersection() {
349 r = x+idler_d/2+idler_clearance; 344 r = x+idler_d/2+idler_clearance;
350 cylinder(r=r,h=ls_h,center=true); 345 cylinder(r=r,h=ls_h,center=true);
351 translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); 346 translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]);
352 } 347 }
353 348
354 // back side cutout 349 // back side cutout
355 // XXX: this is somewhat ugly and potentially bugged, 350 // XXX: this is somewhat ugly and potentially bugged,
356 // but I want to sleep. 351 // but I want to sleep.
357 a0_ = atan( 352 a0_ = atan(