-rw-r--r-- | another.scad | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/another.scad b/another.scad index b80d0d0..a93d21a 100644 --- a/another.scad +++ b/another.scad | |||
@@ -9,24 +9,25 @@ include <pushfit_data.scad>; | |||
9 | module the_extruder( | 9 | module the_extruder( |
10 | // motor properties | 10 | // motor properties |
11 | gearbox_d = 36, | 11 | gearbox_d = 36, |
12 | mount_d = 28, // the distance between opposite mounting holes | 12 | mount_d = 28, // the distance between opposite mounting holes |
13 | mounthole_depth = 5, | 13 | mounthole_depth = 5, |
14 | protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox | 14 | protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox |
15 | bore_d = 8, bore_l = 17.6, | 15 | bore_d = 8, bore_l = 17.6, |
16 | bore_dd = 7, | 16 | bore_dd = 7, |
17 | // pulley properties | 17 | // pulley properties |
18 | pulley_d = 11.5, pulley_h=10, | 18 | pulley_d = 11.5, pulley_h=10, |
19 | pulley_elevation = 1, // pulley elevation above the protrusion | 19 | pulley_elevation = 1, // pulley elevation above the protrusion |
20 | teeth_elevation = 7.5, // distance from the bottom of the pulley to its teeth | 20 | teeth_elevation = 7.5, // distance from the bottom of the pulley to its teeth |
21 | filament_offset = (8.25-(3.0+3.5)/2) - 11.5/2 + 1.75/2, | ||
21 | // idler properties | 22 | // idler properties |
22 | idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height | 23 | idler_d = 9.5, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height |
23 | // spring properties | 24 | // spring properties |
24 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length | 25 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length |
25 | // filament path properties | 26 | // filament path properties |
26 | filament_d = 1.75, | 27 | filament_d = 1.75, |
27 | filament_path_d = 2, | 28 | filament_path_d = 2, |
28 | filament_guide_d = 4, // PTFE filament guide diameter | 29 | filament_guide_d = 4, // PTFE filament guide diameter |
29 | // knob properties | 30 | // knob properties |
30 | knob_h = 10, | 31 | knob_h = 10, |
31 | knob_bore_l = 4, | 32 | knob_bore_l = 4, |
32 | knob_indent_d = 4, | 33 | knob_indent_d = 4, |
@@ -112,25 +113,25 @@ module the_extruder( | |||
112 | cylinder(d=bore_d,h=bore_l,$fn=30); | 113 | cylinder(d=bore_d,h=bore_l,$fn=30); |
113 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) | 114 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) |
114 | cube([bore_d+2,bore_d/2,bore_l+2]); | 115 | cube([bore_d+2,bore_d/2,bore_l+2]); |
115 | } | 116 | } |
116 | translate([0,0,pulley_elevation]) { | 117 | translate([0,0,pulley_elevation]) { |
117 | cylinder(d=pulley_d,h=pulley_h,$fn=30); | 118 | cylinder(d=pulley_d,h=pulley_h,$fn=30); |
118 | translate([0,0,teeth_elevation]) { | 119 | translate([0,0,teeth_elevation]) { |
119 | place_idler() { | 120 | place_idler() { |
120 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); | 121 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); |
121 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); | 122 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); |
122 | }//place idler | 123 | }//place idler |
123 | // filament path | 124 | // filament path |
124 | rotate([0,0,45]) translate([pulley_d/2,0,0]) { | 125 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) { |
125 | rotate([90,0,0]) cylinder(d=filament_d,h=gearbox_d*2,center=true,$fn=15); | 126 | rotate([90,0,0]) cylinder(d=filament_d,h=gearbox_d*2,center=true,$fn=15); |
126 | rotate([-90,0,0]) | 127 | rotate([-90,0,0]) |
127 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) | 128 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) |
128 | pushfit(pf); | 129 | pushfit(pf); |
129 | } | 130 | } |
130 | }//translate teeth | 131 | }//translate teeth |
131 | }//translate pulley | 132 | }//translate pulley |
132 | }//translate protrusion | 133 | }//translate protrusion |
133 | }//vitamins | 134 | }//vitamins |
134 | 135 | ||
135 | module lever() { | 136 | module lever() { |
136 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { | 137 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { |
@@ -143,30 +144,30 @@ module the_extruder( | |||
143 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 144 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
144 | }//hull | 145 | }//hull |
145 | hull() { | 146 | hull() { |
146 | translate([mount_d/2,0,0]) | 147 | translate([mount_d/2,0,0]) |
147 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 148 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
148 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) | 149 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) |
149 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); | 150 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); |
150 | }//hull | 151 | }//hull |
151 | }//union | 152 | }//union |
152 | 153 | ||
153 | // filament path | 154 | // filament path |
154 | place_idler() { | 155 | place_idler() { |
155 | translate([-idler_d/2,0,0]) rotate([90,0,0]) { | 156 | translate([-idler_d/2+filament_offset,0,0]) rotate([90,0,0]) { |
156 | cylinder(d=filament_path_d,h=3*gearbox_d,center=true,$fn=30); | 157 | cylinder(d=filament_path_d,h=3*gearbox_d,center=true,$fn=30); |
157 | translate([0,-filament_path_d/2/sqrt(2),0]) rotate([0,0,45]) | 158 | translate([0,-filament_path_d/2/sqrt(2),0]) rotate([0,0,45]) |
158 | cube(size=[filament_path_d/2,filament_path_d/2,3*gearbox_d],center=true); | 159 | cube(size=[filament_path_d/2,filament_path_d/2,3*gearbox_d],center=true); |
159 | }//rotate translate | 160 | }//rotate translate |
160 | translate([-idler_d/2,0,0]) | 161 | translate([-idler_d/2+filament_offset,0,0]) |
161 | rotate([90,0,0]) | 162 | rotate([90,0,0]) |
162 | translate([0,0, | 163 | translate([0,0, |
163 | sqrt(2)*(mount_d-pulley_d+lsd)/2 | 164 | sqrt(2)*(mount_d-pulley_d+lsd)/2 |
164 | ]) { | 165 | ]) { |
165 | cylinder(d1=filament_path_d,d2=2*filament_path_d, | 166 | cylinder(d1=filament_path_d,d2=2*filament_path_d, |
166 | h=filament_path_d,$fn=2*filament_path_d*fnd); | 167 | h=filament_path_d,$fn=2*filament_path_d*fnd); |
167 | translate([0,0,filament_path_d-epsilon]) | 168 | translate([0,0,filament_path_d-epsilon]) |
168 | cylinder(d=2*filament_path_d,h=lsd,$fn=2*filament_path_d*fnd); | 169 | cylinder(d=2*filament_path_d,h=lsd,$fn=2*filament_path_d*fnd); |
169 | } | 170 | } |
170 | }//place_idler | 171 | }//place_idler |
171 | 172 | ||
172 | // idler space and mounting hole | 173 | // idler space and mounting hole |
@@ -237,25 +238,25 @@ module the_extruder( | |||
237 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) | 238 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) |
238 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, | 239 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, |
239 | h=hf+epsilon, $fn=fnd*bigd); | 240 | h=hf+epsilon, $fn=fnd*bigd); |
240 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) | 241 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) |
241 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); | 242 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); |
242 | } | 243 | } |
243 | } | 244 | } |
244 | } | 245 | } |
245 | } // translate | 246 | } // translate |
246 | 247 | ||
247 | // pushfit bracket | 248 | // pushfit bracket |
248 | translate([0,0,filament_elevation]) | 249 | translate([0,0,filament_elevation]) |
249 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 250 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
250 | rotate([-90,0,0]) | 251 | rotate([-90,0,0]) |
251 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { | 252 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { |
252 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: | 253 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: |
253 | if(pf_smooth) { | 254 | if(pf_smooth) { |
254 | pfbd = pf_d(pf)+2*pf_shell; | 255 | pfbd = pf_d(pf)+2*pf_shell; |
255 | hull() { | 256 | hull() { |
256 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); | 257 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); |
257 | translate([-epsilon/2,0,0]) { | 258 | translate([-epsilon/2,0,0]) { |
258 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); | 259 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); |
259 | mirror([0,1,0]) | 260 | mirror([0,1,0]) |
260 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); | 261 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); |
261 | }//translate | 262 | }//translate |
@@ -283,25 +284,25 @@ module the_extruder( | |||
283 | // mount screw holes | 284 | // mount screw holes |
284 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { | 285 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { |
285 | translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) | 286 | translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) |
286 | mirror([0,0,1]) | 287 | mirror([0,0,1]) |
287 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 288 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
288 | h=mount_screw_l-mounthole_depth/2+1, | 289 | h=mount_screw_l-mounthole_depth/2+1, |
289 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 290 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
290 | translate([0,0,mount_screw_l-mounthole_depth/2]) | 291 | translate([0,0,mount_screw_l-mounthole_depth/2]) |
291 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); | 292 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); |
292 | }//for | 293 | }//for |
293 | // pushfit | 294 | // pushfit |
294 | translate([0,0,filament_elevation]) | 295 | translate([0,0,filament_elevation]) |
295 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 296 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
296 | rotate([-90,0,0]) | 297 | rotate([-90,0,0]) |
297 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) | 298 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) |
298 | rotate([0,0,180]) { | 299 | rotate([0,0,180]) { |
299 | pushfit(pf); | 300 | pushfit(pf); |
300 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); | 301 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); |
301 | translate([0,-filament_guide_d/2/sqrt(2),0]) | 302 | translate([0,-filament_guide_d/2/sqrt(2),0]) |
302 | rotate([0,0,45]) | 303 | rotate([0,0,45]) |
303 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); | 304 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); |
304 | }//rotate translate rotate translate rotate translate | 305 | }//rotate translate rotate translate rotate translate |
305 | // pulley | 306 | // pulley |
306 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); | 307 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); |
307 | // leverspace | 308 | // leverspace |
@@ -319,25 +320,25 @@ module the_extruder( | |||
319 | r = x+idler_d/2+idler_clearance; | 320 | r = x+idler_d/2+idler_clearance; |
320 | cylinder(r=r,h=ls_h,center=true); | 321 | cylinder(r=r,h=ls_h,center=true); |
321 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); | 322 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); |
322 | } | 323 | } |
323 | 324 | ||
324 | // back side cutout | 325 | // back side cutout |
325 | // XXX: this is somewhat ugly and potentially bugged, | 326 | // XXX: this is somewhat ugly and potentially bugged, |
326 | // but I want to sleep. | 327 | // but I want to sleep. |
327 | a0_ = atan( | 328 | a0_ = atan( |
328 | (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2) | 329 | (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2) |
329 | / | 330 | / |
330 | ( | 331 | ( |
331 | pulley_d/2- | 332 | pulley_d/2+filament_offset- |
332 | (pf_d(pf)+2*pf_shell)/2/cos(30) | 333 | (pf_d(pf)+2*pf_shell)/2/cos(30) |
333 | ) | 334 | ) |
334 | ); | 335 | ); |
335 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); | 336 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); |
336 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); | 337 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); |
337 | translate([0,0,ls_z]) difference() { | 338 | translate([0,0,ls_z]) difference() { |
338 | rotate([0,0,-180+a0]) | 339 | rotate([0,0,-180+a0]) |
339 | rotate_extrude(angle=a1-a0) | 340 | rotate_extrude(angle=a1-a0) |
340 | translate([0,-ls_h/2]) | 341 | translate([0,-ls_h/2]) |
341 | square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, | 342 | square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, |
342 | ls_h]); | 343 | ls_h]); |
343 | translate([-mount_d/2,0,0]) | 344 | translate([-mount_d/2,0,0]) |