-rw-r--r-- | another.scad | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/another.scad b/another.scad index 0d67286..8334b11 100644 --- a/another.scad +++ b/another.scad | |||
@@ -102,16 +102,18 @@ module the_extruder( | |||
102 | mount_max_depth = mounthole_max_depth ? mounthole_max_depth : mounthole_depth+1; | 102 | mount_max_depth = mounthole_max_depth ? mounthole_max_depth : mounthole_depth+1; |
103 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; | 103 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; |
104 | ls_z = filament_elevation; // leverspace mid-z | 104 | ls_z = filament_elevation; // leverspace mid-z |
105 | ls_h = lever_thickness+lever_v_clearance; // leverspace height | 105 | ls_h = lever_thickness+lever_v_clearance; // leverspace height |
106 | mount_depth = mount_screw_l - (ls_z+ls_h/2+min_z_shell); | 106 | mount_depth = mount_screw_l - (ls_z+ls_h/2+min_z_shell); |
107 | body_h = max(protrusion_h+bore_l,mount_screw_l-mount_depth+mount_screwhead_h+min_z_shell,ls_z*2); | 107 | body_h = max(protrusion_h+bore_l,mount_screw_l-mount_depth+mount_screwhead_h+min_z_shell,ls_z*2); |
108 | echo("mount depth",mount_depth); | 108 | echo("mount depth",mount_depth); |
109 | 109 | ||
110 | pf_offset = mount_d/sqrt(2)/2+mount_screw_d/2+min_xy_shell; | ||
111 | |||
110 | module teardrop(r,d,h,center=false,angle=45) { | 112 | module teardrop(r,d,h,center=false,angle=45) { |
111 | dd = d ? d : (2*r); | 113 | dd = d ? d : (2*r); |
112 | $fn = dd*fnd; | 114 | $fn = dd*fnd; |
113 | cylinder(d=dd,h=h,center=center); | 115 | cylinder(d=dd,h=h,center=center); |
114 | if(angle>0) translate([0,0,center?-h/2:0]) | 116 | if(angle>0) translate([0,0,center?-h/2:0]) |
115 | rotate([0,0,angle]) | 117 | rotate([0,0,angle]) |
116 | cube(size=[d/2,d/2,h]); | 118 | cube(size=[d/2,d/2,h]); |
117 | } | 119 | } |
@@ -155,17 +157,17 @@ module the_extruder( | |||
155 | }//place idler | 157 | }//place idler |
156 | // filament path | 158 | // filament path |
157 | rotate([0,0,45]) { | 159 | rotate([0,0,45]) { |
158 | translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) { | 160 | translate([pulley_d/2-idler_filament_offset,0,0]) rotate([90,0,0]) { |
159 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); | 161 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); |
160 | }//rotate translate | 162 | }//rotate translate |
161 | translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) { | 163 | translate([pulley_d/2+filament_offset,0,0]) rotate([-90,0,0]) { |
162 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); | 164 | cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); |
163 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) | 165 | translate([0,0,pf_offset]) |
164 | pushfit(pf); | 166 | pushfit(pf); |
165 | }//rotate translate | 167 | }//rotate translate |
166 | }//rotate | 168 | }//rotate |
167 | }//translate teeth | 169 | }//translate teeth |
168 | }//translate pulley | 170 | }//translate pulley |
169 | }//translate protrusion | 171 | }//translate protrusion |
170 | }//vitamins | 172 | }//vitamins |
171 | 173 | ||
@@ -249,17 +251,17 @@ module the_extruder( | |||
249 | translate([0,0,0]) | 251 | translate([0,0,0]) |
250 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); | 252 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); |
251 | }//hull translate | 253 | }//hull translate |
252 | 254 | ||
253 | // pushfit bracket | 255 | // pushfit bracket |
254 | translate([0,0,filament_elevation]) | 256 | translate([0,0,filament_elevation]) |
255 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 257 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
256 | rotate([-90,0,0]) | 258 | rotate([-90,0,0]) |
257 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) { | 259 | translate([0,0,pf_offset-gearbox_d/2/*TODO:*/]) { |
258 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: | 260 | pfbl = pf_h(pf)+gearbox_d/2; //TODO: |
259 | pfbd = pf_d(pf)+2*pf_shell; | 261 | pfbd = pf_d(pf)+2*pf_shell; |
260 | hull() { | 262 | hull() { |
261 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); | 263 | cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); |
262 | translate([-epsilon/2,0,0]) { | 264 | translate([-epsilon/2,0,0]) { |
263 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); | 265 | cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); |
264 | mirror([0,1,0]) | 266 | mirror([0,1,0]) |
265 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); | 267 | cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); |
@@ -277,17 +279,16 @@ module the_extruder( | |||
277 | mirror([0,0,1]) | 279 | mirror([0,0,1]) |
278 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 280 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
279 | h=mount_screw_l-mount_depth+1, | 281 | h=mount_screw_l-mount_depth+1, |
280 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 282 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
281 | translate([0,0,mount_screw_l-mount_depth]) | 283 | translate([0,0,mount_screw_l-mount_depth]) |
282 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); | 284 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); |
283 | }//for | 285 | }//for |
284 | // pushfit | 286 | // pushfit |
285 | pf_offset = mount_d/sqrt(2)/2+mount_screw_d; | ||
286 | translate([0,0,filament_elevation]) | 287 | translate([0,0,filament_elevation]) |
287 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) | 288 | rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) |
288 | rotate([-90,0,0]) | 289 | rotate([-90,0,0]) |
289 | translate([0,0,pf_offset]) | 290 | translate([0,0,pf_offset]) |
290 | rotate([0,0,180]) { | 291 | rotate([0,0,180]) { |
291 | pushfit(pf); | 292 | pushfit(pf); |
292 | mirror([0,0,1]) { | 293 | mirror([0,0,1]) { |
293 | fh = 1.5* (filament_guide_d-filament_path_d)/2; | 294 | fh = 1.5* (filament_guide_d-filament_path_d)/2; |
@@ -316,17 +317,17 @@ module the_extruder( | |||
316 | rotate_extrude(angle=-135+max(atan(2*fsw/gearbox_d-1),atan(gearbox_d/mount_d-1))) | 317 | rotate_extrude(angle=-135+max(atan(2*fsw/gearbox_d-1),atan(gearbox_d/mount_d-1))) |
317 | square([gearbox_d/2+1,ls_h]); | 318 | square([gearbox_d/2+1,ls_h]); |
318 | } | 319 | } |
319 | 320 | ||
320 | // back side cutout | 321 | // back side cutout |
321 | // XXX: this is somewhat ugly and potentially bugged, | 322 | // XXX: this is somewhat ugly and potentially bugged, |
322 | // but I want to sleep. | 323 | // but I want to sleep. |
323 | a0_ = atan( | 324 | a0_ = atan( |
324 | (mount_d/sqrt(2)/2+mount_screw_d+pf_h(pf)+gearbox_d/2) | 325 | (pf_offset+pf_h(pf)+gearbox_d/2) |
325 | / | 326 | / |
326 | ( | 327 | ( |
327 | pulley_d/2+filament_offset- | 328 | pulley_d/2+filament_offset- |
328 | (pf_d(pf)+2*pf_shell)/2/cos(30) | 329 | (pf_d(pf)+2*pf_shell)/2/cos(30) |
329 | ) | 330 | ) |
330 | ); | 331 | ); |
331 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); | 332 | a0 = -135 + ( (a0_>0) ? a0_ : 180+a0_ ); |
332 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); | 333 | a1 = atan((longwing-lever_thickness/2)/(gearbox_d/2)); |