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) (ignore 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
@@ -98,24 +98,26 @@ module the_extruder(
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 }
@@ -151,25 +153,25 @@ module the_extruder(
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() {
@@ -245,25 +247,25 @@ module the_extruder(
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)
@@ -273,25 +275,24 @@ module the_extruder(
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])
@@ -312,25 +313,25 @@ module the_extruder(
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])