summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2018-09-01 11:29:30 (UTC)
committer Michael Krelin <hacker@klever.net>2018-09-01 11:29:30 (UTC)
commit8dd62c375a2df44eaa42a4ac58905f15d4b17cca (patch) (unidiff)
tree8367f583086adf69cd40eba8cdda9e61a9ef4936
parent3c20c090273e3f87fc3d0e50d031400f57aff238 (diff)
downloadextrudery-8dd62c375a2df44eaa42a4ac58905f15d4b17cca.zip
extrudery-8dd62c375a2df44eaa42a4ac58905f15d4b17cca.tar.gz
extrudery-8dd62c375a2df44eaa42a4ac58905f15d4b17cca.tar.bz2
move pushfit a tiny bit closer
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--another.scad9
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
@@ -86,48 +86,50 @@ module the_extruder(
86 86
87 idler_filament_offset = filament_path_d/2; 87 idler_filament_offset = filament_path_d/2;
88 lever_shell = mount_screwhead_h+0.5; 88 lever_shell = mount_screwhead_h+0.5;
89 lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); 89 lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell);
90 lsd = idler_d-idler_clearance*2; // the diameter of lever thingie 90 lsd = idler_d-idler_clearance*2; // the diameter of lever thingie
91 longwing=(mount_d+mount_screw_d+mount_screw_d_tolerance+spring_d+spring_d_clearance)/2+min_xy_shell; 91 longwing=(mount_d+mount_screw_d+mount_screw_d_tolerance+spring_d+spring_d_clearance)/2+min_xy_shell;
92 shortwing = let(a=mount_d/2,c=(pulley_d+idler_d)/2/sqrt(2)) 92 shortwing = let(a=mount_d/2,c=(pulley_d+idler_d)/2/sqrt(2))
93 sqrt(c*c+pow(a-c,2)); 93 sqrt(c*c+pow(a-c,2));
94 longwing_travel = idler_travel*longwing/shortwing; 94 longwing_travel = idler_travel*longwing/shortwing;
95 h_ = (pulley_d+idler_d)/(2*sqrt(2)); 95 h_ = (pulley_d+idler_d)/(2*sqrt(2));
96 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); 96 ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) );
97 spring_dl = idler_travel*longwing/ri; 97 spring_dl = idler_travel*longwing/ri;
98 // finger and spring support 98 // finger and spring support
99 fsw = gearbox_d-(gearbox_d-mount_d)/2-max(spring_lc,longwing_travel+(gearbox_d-mount_d)/2); 99 fsw = gearbox_d-(gearbox_d-mount_d)/2-max(spring_lc,longwing_travel+(gearbox_d-mount_d)/2);
100 100
101 mount_min_depth = mounthole_min_depth ? mounthole_min_depth : mounthole_depth-1; 101 mount_min_depth = mounthole_min_depth ? mounthole_min_depth : mounthole_depth-1;
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 }
118 120
119 module mirrorleft() { 121 module mirrorleft() {
120 mirror([left?0:1,0,0]) children(); 122 mirror([left?0:1,0,0]) children();
121 } 123 }
122 module place_idler() { 124 module place_idler() {
123 rotate([0,0,45]) 125 rotate([0,0,45])
124 translate([(pulley_d+idler_d)/2,0,0]) 126 translate([(pulley_d+idler_d)/2,0,0])
125 children(); 127 children();
126 } 128 }
127 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { 129 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) {
128 if(depth) { 130 if(depth) {
129 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); 131 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth);
130 rr = depth+hh; 132 rr = depth+hh;
131 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); 133 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr);
132 }else if(r) { 134 }else if(r) {
133 hh=sqrt(pow(r,2)-pow(d,2)/4); 135 hh=sqrt(pow(r,2)-pow(d,2)/4);
@@ -139,49 +141,49 @@ module the_extruder(
139 translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); 141 translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60);
140 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) 142 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0])
141 cylinder(d=mount_screw_d,h=20,$fn=30); 143 cylinder(d=mount_screw_d,h=20,$fn=30);
142 translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); 144 translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30);
143 translate([0,0,protrusion_h]) { 145 translate([0,0,protrusion_h]) {
144 difference() { 146 difference() {
145 cylinder(d=bore_d,h=bore_l,$fn=30); 147 cylinder(d=bore_d,h=bore_l,$fn=30);
146 translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) 148 translate([-bore_d/2-1,bore_dd-bore_d/2,-1])
147 cube([bore_d+2,bore_d/2,bore_l+2]); 149 cube([bore_d+2,bore_d/2,bore_l+2]);
148 } 150 }
149 translate([0,0,pulley_elevation]) { 151 translate([0,0,pulley_elevation]) {
150 cylinder(d=pulley_d,h=pulley_h,$fn=30); 152 cylinder(d=pulley_d,h=pulley_h,$fn=30);
151 translate([0,0,teeth_elevation]) { 153 translate([0,0,teeth_elevation]) {
152 place_idler() { 154 place_idler() {
153 cylinder(d=idler_d,h=idler_h,center=true,$fn=30); 155 cylinder(d=idler_d,h=idler_h,center=true,$fn=30);
154 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); 156 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30);
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
172 module lever() { 174 module lever() {
173 translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { 175 translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) {
174 difference() { 176 difference() {
175 union() { 177 union() {
176 hull() { 178 hull() {
177 place_idler() 179 place_idler()
178 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 180 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
179 translate([mount_d/2,0,0]) 181 translate([mount_d/2,0,0])
180 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 182 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
181 }//hull 183 }//hull
182 hull() { 184 hull() {
183 translate([mount_d/2,0,0]) 185 translate([mount_d/2,0,0])
184 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 186 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
185 translate([mount_d/2,-longwing,0]) rotate([0,90,0]) 187 translate([mount_d/2,-longwing,0]) rotate([0,90,0])
186 cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); 188 cylinder(d=lever_thickness,h=lsd,center=true,$fn=60);
187 }//hull 189 }//hull
@@ -233,116 +235,115 @@ module the_extruder(
233 }//translate 235 }//translate
234 }//lever module 236 }//lever module
235 237
236 module body() { 238 module body() {
237 difference() { 239 difference() {
238 union() { 240 union() {
239 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); 241 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d);
240 // spring tensioner part 242 // spring tensioner part
241 translate([-gearbox_d/2,0,0]) hull() { 243 translate([-gearbox_d/2,0,0]) hull() {
242 translate([0,-longwing,ls_z]) 244 translate([0,-longwing,ls_z])
243 rotate([0,90,0]) 245 rotate([0,90,0])
244 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); 246 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness);
245 hh=body_h-ls_z; 247 hh=body_h-ls_z;
246 translate([0,0,ls_z]) 248 translate([0,0,ls_z])
247 mirror([0,1,0]) cube(size=[fsw,longwing+(st_split_w+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]); 249 mirror([0,1,0]) cube(size=[fsw,longwing+(st_split_w+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]);
248 hhh=ls_z; 250 hhh=ls_z;
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]);
266 }//translate 268 }//translate
267 }//hull 269 }//hull
268 }//translate rotate translate rotate translate 270 }//translate rotate translate rotate translate
269 }//union (first child of difference) 271 }//union (first child of difference)
270 272
271 // protrusion 273 // protrusion
272 translate([0,0,-1]) 274 translate([0,0,-1])
273 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); 275 cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h));
274 // mount screw holes 276 // mount screw holes
275 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { 277 for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) {
276 translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)]) 278 translate([0,0,mount_screw_l-mount_depth-(bridges?layer_height:-epsilon)])
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;
294 fo = pf_offset -filament_path_d /*(idler_d+idler_clearance)/2*/-fh; 295 fo = pf_offset -filament_path_d /*(idler_d+idler_clearance)/2*/-fh;
295 translate([0,0,-1]) teardrop(d=filament_guide_d,h=fo/2,angle=225); 296 translate([0,0,-1]) teardrop(d=filament_guide_d,h=fo/2,angle=225);
296 translate([0,0,-1]) teardrop(d=filament_path_d,h=gearbox_d/2+1,angle=-225); 297 translate([0,0,-1]) teardrop(d=filament_path_d,h=gearbox_d/2+1,angle=-225);
297 translate([0,0,fo+epsilon]) 298 translate([0,0,fo+epsilon])
298 cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d); 299 cylinder(d1=filament_path_d,d2=filament_guide_d,h=fh,$fn=fnd*filament_guide_d);
299 }//mirror 300 }//mirror
300 }//rotate translate rotate translate rotate translate 301 }//rotate translate rotate translate rotate translate
301 // pulley 302 // pulley
302 cylinder(d=pulley_d+pulley_small_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance)); 303 cylinder(d=pulley_d+pulley_small_d_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_d_clearance));
303 cylinder(d=pulley_d+pulley_d_clearance,ls_z-max(idler_h,filament_guide_d)/2,$fn=fnd*(pulley_d+pulley_d_clearance)); 304 cylinder(d=pulley_d+pulley_d_clearance,ls_z-max(idler_h,filament_guide_d)/2,$fn=fnd*(pulley_d+pulley_d_clearance));
304 305
305 translate([0,0,ls_z-ls_h/2]) { 306 translate([0,0,ls_z-ls_h/2]) {
306 // idler travel 307 // idler travel
307 translate([mount_d/2,0,0]) 308 translate([mount_d/2,0,0])
308 rotate([0,0,45]) 309 rotate([0,0,45])
309 rotate_extrude(angle=90,$fn=fnr*(shortwing+(idler_d+idler_clearance)/2)) 310 rotate_extrude(angle=90,$fn=fnr*(shortwing+(idler_d+idler_clearance)/2))
310 square([shortwing+(idler_d+idler_clearance)/2,ls_h]); 311 square([shortwing+(idler_d+idler_clearance)/2,ls_h]);
311 // idler itself 312 // idler itself
312 place_idler() 313 place_idler()
313 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); 314 cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance));
314 // lever space 315 // lever space
315 rotate([0,0,45]) 316 rotate([0,0,45])
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));
333 translate([0,0,ls_z]) difference() { 334 translate([0,0,ls_z]) difference() {
334 rotate([0,0,-180+a0]) 335 rotate([0,0,-180+a0])
335 rotate_extrude(angle=a1-a0) 336 rotate_extrude(angle=a1-a0)
336 translate([0,-ls_h/2]) 337 translate([0,-ls_h/2])
337 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1, 338 square([sqrt(pow(gearbox_d/2,2)+pow(longwing-lever_thickness/2,2))+1,
338 ls_h]); 339 ls_h]);
339 translate([-mount_d/2,0,0]) 340 translate([-mount_d/2,0,0])
340 cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d)); 341 cylinder(d=gearbox_d-mount_d,h=ls_h+2,center=true,$fn=fnd*(gearbox_d-mount_d));
341 }//difference translate 342 }//difference translate
342 343
343 // spring tensioner 344 // spring tensioner
344 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) { 345 translate([-gearbox_d/2,-longwing,ls_z]) rotate([0,-90,0]) {
345 mirror([0,0,1]) { 346 mirror([0,0,1]) {
346 translate([0,0,st_thickshell]) 347 translate([0,0,st_thickshell])
347 hull() for(o=[0,spring_d]) translate([0,-o,0]) 348 hull() for(o=[0,spring_d]) translate([0,-o,0])
348 rotate([0,0,30]) 349 rotate([0,0,30])