summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-08-31 22:20:06 (UTC)
committer Michael Krelin <hacker@klever.net>2018-08-31 22:20:06 (UTC)
commit875ceca4d231a22423c42d44d8d14e02d3b4ef37 (patch) (unidiff)
treedc2240e3696adcbc41512a7659bf6066a3bd2246
parent428ea05af148a788e379a9b84a31c6322271cf37 (diff)
downloadextrudery-875ceca4d231a22423c42d44d8d14e02d3b4ef37.zip
extrudery-875ceca4d231a22423c42d44d8d14e02d3b4ef37.tar.gz
extrudery-875ceca4d231a22423c42d44d8d14e02d3b4ef37.tar.bz2
body label and thickness as parameters
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad11
1 files changed, 6 insertions, 5 deletions
diff --git a/another.scad b/another.scad
index fcd179e..f01e765 100644
--- a/another.scad
+++ b/another.scad
@@ -57,30 +57,31 @@ module the_extruder(
57 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion 57 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion
58 mount_screw_d_tolerance=.4, 58 mount_screw_d_tolerance=.4,
59 idler_v_tolerance=.5, 59 idler_v_tolerance=.5,
60 knob_bore_d_tolerance=.6, 60 knob_bore_d_tolerance=.6,
61 st_nut_h_tolerance=.2, 61 st_nut_h_tolerance=.2,
62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ 62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */
63 st_screw_d_tolerance=.5, 63 st_screw_d_tolerance=.5,
64 st_split_w_tolerance = .3, 64 st_split_w_tolerance = .3,
65 65
66 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, 67 min_xy_shell = 2*extrusion_width,
68 68
69 body_label = "another", body_label_thickness = 2*layer_height,
70
69 what="lever", // lever|body|knob|springpad|* 71 what="lever", // lever|body|knob|springpad|*
70 left=false, 72 left=false,
71 vitamins = true, 73 vitamins = true,
72 bridges = true, 74 bridges = true,
73 debug = false, 75 debug = false,
74 label = "another"
75) { 76) {
76 fnd = 2*PI; fnr = 2*fnd; 77 fnd = 2*PI; fnr = 2*fnd;
77 function lu(m,k) = m[search([k],m)[0]][1]; 78 function lu(m,k) = m[search([k],m)[0]][1];
78 79
79 pulley_d = lu(pulley,"d"); 80 pulley_d = lu(pulley,"d");
80 pulley_h = lu(pulley,"h"); 81 pulley_h = lu(pulley,"h");
81 teeth_elevation = lu(pulley,"fe"); 82 teeth_elevation = lu(pulley,"fe");
82 filament_offset = lu(pulley,"g")+filament_d/2; 83 filament_offset = lu(pulley,"g")+filament_d/2;
83 pulley_d_clearance = lu(pulley,"ssrc")*2; 84 pulley_d_clearance = lu(pulley,"ssrc")*2;
84 85
85 idler_filament_offset = filament_path_d/2; 86 idler_filament_offset = filament_path_d/2;
86 lever_shell = mount_screwhead_h+0.5; 87 lever_shell = mount_screwhead_h+0.5;
@@ -351,34 +352,34 @@ module the_extruder(
351 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) { 352 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) {
352 cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, 353 cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd,
353 h=hf+epsilon, $fn=fnd*bigd); 354 h=hf+epsilon, $fn=fnd*bigd);
354 translate([0,-(st_split_w+st_split_w_tolerance)/2,0]) 355 translate([0,-(st_split_w+st_split_w_tolerance)/2,0])
355 cube(size=[body_h-ls_z+1,st_split_w+st_split_w_tolerance,fsw+1]); 356 cube(size=[body_h-ls_z+1,st_split_w+st_split_w_tolerance,fsw+1]);
356 }//translate 357 }//translate
357 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) 358 translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon])
358 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); 359 cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd);
359 }//mirror 360 }//mirror
360 }//translate 361 }//translate
361 362
362 // label 363 // label
363 label_thickness = 2*layer_height; 364 if(body_label) let(label=body_label,label_thickness=body_label_thickness) {
364 label_len = len(label); 365 label_thickness = 2*layer_height;
365 if(label_len) { 366 label_len = len(label);
366 labelspace = [gearbox_d/2-mount_screwhead_d/2-min_xy_shell,longwing-(mount_screwhead_d-st_split_w-st_split_w_tolerance)/2-2*min_xy_shell]; 367 labelspace = [gearbox_d/2-mount_screwhead_d/2-min_xy_shell,longwing-(mount_screwhead_d-st_split_w-st_split_w_tolerance)/2-2*min_xy_shell];
367 translate([0,0,body_h-label_thickness]) 368 translate([0,0,body_h-label_thickness])
368 linear_extrude(height=label_thickness+epsilon,convexity=64) 369 linear_extrude(height=label_thickness+epsilon,convexity=64)
369 translate([-mount_screwhead_d/2-min_xy_shell-labelspace.x/2,-longwing+(st_split_w+st_split_w_tolerance)/2+min_xy_shell+labelspace.y/2]) 370 translate([-mount_screwhead_d/2-min_xy_shell-labelspace.x/2,-longwing+(st_split_w+st_split_w_tolerance)/2+min_xy_shell+labelspace.y/2])
370 mirror([left?0:1,0]) 371 mirror([left?0:1,0])
371 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black"); 372 text(text=label,size=labelspace.x/label_len,halign="center",valign="center",font="Arial Black");
372 }//if(label_len) 373 }//if(body_label)
373 374
374 }//difference 375 }//difference
375 376
376 }//body module 377 }//body module
377 378
378 module springpad() { 379 module springpad() {
379 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell; 380 smalld=st_screw_d+st_screw_d_tolerance+min_xy_shell;
380 bigd = spring_d+spring_d_clearance/2; 381 bigd = spring_d+spring_d_clearance/2;
381 hf = (bigd-smalld)/2; 382 hf = (bigd-smalld)/2;
382 h = hf*3.5; 383 h = hf*3.5;
383 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation]) 384 translate([-gearbox_d/2+st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+1,-longwing,filament_elevation])
384 rotate([0,90,0]) difference() { 385 rotate([0,90,0]) difference() {