author | Michael Krelin <hacker@klever.net> | 2018-08-10 10:40:52 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2018-08-10 10:40:52 (UTC) |
commit | 83611090e9424595714c8fe041a1b8a4d2d36925 (patch) (unidiff) | |
tree | d9a2e522304f403d0608474a432c6ba0a92c82c7 | |
parent | 1a3981f4d4c89ec470a9ccef4564d166e4603ba3 (diff) | |
download | extrudery-83611090e9424595714c8fe041a1b8a4d2d36925.zip extrudery-83611090e9424595714c8fe041a1b8a4d2d36925.tar.gz extrudery-83611090e9424595714c8fe041a1b8a4d2d36925.tar.bz2 |
added funnel to catch filament on input
-rw-r--r-- | another.scad | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/another.scad b/another.scad index 7e8a45f..342d70c 100644 --- a/another.scad +++ b/another.scad | |||
@@ -24,261 +24,273 @@ module the_extruder( | |||
24 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length | 24 | spring_d = 10, spring_lc = 9.6, // spring diameter and compressed length |
25 | // filament path properties | 25 | // filament path properties |
26 | filament_d = 1.75, | 26 | filament_d = 1.75, |
27 | filament_path_d = 2, | 27 | filament_path_d = 2, |
28 | filament_guide_d = 4, // PTFE filament guide diameter | 28 | filament_guide_d = 4, // PTFE filament guide diameter |
29 | // knob properties | 29 | // knob properties |
30 | knob_h = 10, | 30 | knob_h = 10, |
31 | knob_bore_l = 4, | 31 | knob_bore_l = 4, |
32 | knob_indent_d = 4, | 32 | knob_indent_d = 4, |
33 | knob_indents = 12, | 33 | knob_indents = 12, |
34 | // spring tensioner | 34 | // spring tensioner |
35 | st_nut_d = 9, st_nut_h = 4, | 35 | st_nut_d = 9, st_nut_h = 4, |
36 | st_screw_d = 5, | 36 | st_screw_d = 5, |
37 | st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width, | 37 | st_thickshell = 8*extrusion_width, st_thinshell = 4*extrusion_width, |
38 | 38 | ||
39 | // screw it | 39 | // screw it |
40 | mount_screw_d = 3.1, mount_screw_l = 20, | 40 | mount_screw_d = 3.1, mount_screw_l = 20, |
41 | mount_screwhead_d=6, mount_screwhead_h=3, | 41 | mount_screwhead_d=6, mount_screwhead_h=3, |
42 | idler_screw_d = 3, | 42 | idler_screw_d = 3, |
43 | idler_screwhead_d=6, idler_screwhead_h=3, | 43 | idler_screwhead_d=6, idler_screwhead_h=3, |
44 | 44 | ||
45 | pf = pushfit_embeddest, | 45 | pf = pushfit_embeddest, |
46 | 46 | ||
47 | // empty spaces | 47 | // empty spaces |
48 | idler_travel = 3, // how far should idler travel when pressed | 48 | idler_travel = 3, // how far should idler travel when pressed |
49 | idler_clearance=1, | 49 | idler_clearance=1, |
50 | pulley_clearance=2, | 50 | pulley_clearance=2, |
51 | lever_v_clearance=.7, // vertical clearance for the lever | 51 | lever_v_clearance=.7, // vertical clearance for the lever |
52 | spring_d_clearance=1, | 52 | spring_d_clearance=1, |
53 | protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion | 53 | protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion |
54 | protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion | 54 | protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion |
55 | mount_screw_d_tolerance=.4, | 55 | mount_screw_d_tolerance=.4, |
56 | idler_v_tolerance=.5, | 56 | idler_v_tolerance=.5, |
57 | knob_bore_d_tolerance=.6, | 57 | knob_bore_d_tolerance=.6, |
58 | st_nut_h_tolerance=.2, | 58 | st_nut_h_tolerance=.2, |
59 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ | 59 | st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ |
60 | st_screw_d_tolerance=.3, | 60 | st_screw_d_tolerance=.3, |
61 | 61 | ||
62 | what="lever", // lever|body|knob|springpad|* | 62 | what="lever", // lever|body|knob|springpad|* |
63 | left=false, | 63 | left=false, |
64 | vitamins = true, | 64 | vitamins = true, |
65 | supports = false, bridges = true, | 65 | supports = false, bridges = true, |
66 | tensioner = true, | 66 | tensioner = true, |
67 | debug = false | 67 | debug = false |
68 | ) { | 68 | ) { |
69 | fnd = 2*PI; fnr = 2*fnd; | 69 | fnd = 2*PI; fnr = 2*fnd; |
70 | 70 | ||
71 | lever_shell = mount_screwhead_h+0.5; | 71 | lever_shell = mount_screwhead_h+0.5; |
72 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); | 72 | lever_thickness=max(spring_d+spring_d_clearance+layer_height*8,idler_h+idler_v_tolerance+2*lever_shell); |
73 | lsd = idler_d-idler_clearance*2; | 73 | lsd = idler_d-idler_clearance*2; |
74 | longwing=gearbox_d/2+spring_d/2+lsd/2; | 74 | longwing=gearbox_d/2+spring_d/2+lsd/2; |
75 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); | 75 | h_ = (pulley_d+idler_d)/(2*sqrt(2)); |
76 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); | 76 | ri = sqrt( pow(h_,2) + pow(mount_d/2-h_,2) ); |
77 | spring_dl = idler_travel*longwing/ri; | 77 | spring_dl = idler_travel*longwing/ri; |
78 | 78 | ||
79 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; | 79 | filament_elevation=protrusion_h+pulley_elevation+teeth_elevation; |
80 | ls_z = filament_elevation; // leverspace mid-z | 80 | ls_z = filament_elevation; // leverspace mid-z |
81 | body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2); | 81 | body_h = max(protrusion_h+bore_l,mount_screw_l-mounthole_depth/2+mount_screwhead_h,ls_z*2); |
82 | ls_h = lever_thickness+lever_v_clearance; // leverspace height | 82 | ls_h = lever_thickness+lever_v_clearance; // leverspace height |
83 | 83 | ||
84 | module mirrorleft() { | 84 | module mirrorleft() { |
85 | mirror([left?0:1,0,0]) children(); | 85 | mirror([left?0:1,0,0]) children(); |
86 | } | 86 | } |
87 | module place_idler() { | 87 | module place_idler() { |
88 | rotate([0,0,45]) | 88 | rotate([0,0,45]) |
89 | translate([(pulley_d+idler_d)/2,0,0]) | 89 | translate([(pulley_d+idler_d)/2,0,0]) |
90 | children(); | 90 | children(); |
91 | } | 91 | } |
92 | module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { | 92 | module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { |
93 | if(depth) { | 93 | if(depth) { |
94 | hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); | 94 | hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); |
95 | rr = depth+hh; | 95 | rr = depth+hh; |
96 | translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); | 96 | translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); |
97 | }else if(r) { | 97 | }else if(r) { |
98 | hh=sqrt(pow(r,2)-pow(d,2)/4); | 98 | hh=sqrt(pow(r,2)-pow(d,2)/4); |
99 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); | 99 | translate([0,0,hh]) sphere(r=r,$fn=fnr*r); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | % if(vitamins) mirrorleft() { | 103 | % if(vitamins) mirrorleft() { |
104 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); | 104 | translate([0,0,-epsilon]) mirror([0,0,1]) cylinder(d=gearbox_d,h=1,$fn=60); |
105 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) | 105 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) |
106 | cylinder(d=mount_screw_d,h=20,$fn=30); | 106 | cylinder(d=mount_screw_d,h=20,$fn=30); |
107 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); | 107 | translate([0,0,-epsilon]) cylinder(d=protrusion_d,h=protrusion_h,$fn=30); |
108 | translate([0,0,protrusion_h]) { | 108 | translate([0,0,protrusion_h]) { |
109 | difference() { | 109 | difference() { |
110 | cylinder(d=bore_d,h=bore_l,$fn=30); | 110 | cylinder(d=bore_d,h=bore_l,$fn=30); |
111 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) | 111 | translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) |
112 | cube([bore_d+2,bore_d/2,bore_l+2]); | 112 | cube([bore_d+2,bore_d/2,bore_l+2]); |
113 | } | 113 | } |
114 | translate([0,0,pulley_elevation]) { | 114 | translate([0,0,pulley_elevation]) { |
115 | cylinder(d=pulley_d,h=pulley_h,$fn=30); | 115 | cylinder(d=pulley_d,h=pulley_h,$fn=30); |
116 | translate([0,0,teeth_elevation]) { | 116 | translate([0,0,teeth_elevation]) { |
117 | place_idler() { | 117 | place_idler() { |
118 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); | 118 | cylinder(d=idler_d,h=idler_h,center=true,$fn=30); |
119 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); | 119 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); |
120 | }//place idler | 120 | }//place idler |
121 | // filament path | 121 | // filament path |
122 | rotate([0,0,45]) translate([(pulley_d-filament_path_d)/2,0,0]) { | 122 | rotate([0,0,45]) translate([(pulley_d-filament_path_d)/2,0,0]) { |
123 | rotate([90,0,0]) cylinder(d=filament_d,h=gearbox_d*2,center=true,$fn=15); | 123 | rotate([90,0,0]) cylinder(d=filament_d,h=gearbox_d*2,center=true,$fn=15); |
124 | rotate([-90,0,0]) | 124 | rotate([-90,0,0]) |
125 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) | 125 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d]) |
126 | pushfit(pf); | 126 | pushfit(pf); |
127 | } | 127 | } |
128 | }//translate teeth | 128 | }//translate teeth |
129 | }//translate pulley | 129 | }//translate pulley |
130 | }//translate protrusion | 130 | }//translate protrusion |
131 | }//vitamins | 131 | }//vitamins |
132 | 132 | ||
133 | module lever() { | 133 | module lever() { |
134 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { | 134 | translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { |
135 | difference() { | 135 | difference() { |
136 | union() { | 136 | union() { |
137 | hull() { | 137 | hull() { |
138 | place_idler() | 138 | place_idler() |
139 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 139 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
140 | translate([mount_d/2,0,0]) | 140 | translate([mount_d/2,0,0]) |
141 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 141 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
142 | }//hull | 142 | }//hull |
143 | hull() { | 143 | hull() { |
144 | translate([mount_d/2,0,0]) | 144 | translate([mount_d/2,0,0]) |
145 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); | 145 | cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); |
146 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) | 146 | translate([mount_d/2,-longwing,0]) rotate([0,90,0]) |
147 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); | 147 | cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); |
148 | }//hull | 148 | }//hull |
149 | }//union | 149 | }//union |
150 | 150 | ||
151 | // filament path | 151 | // filament path |
152 | place_idler() translate([-(idler_d+filament_path_d)/2,0,0]) rotate([90,0,0]) { | 152 | place_idler() { |
153 | cylinder(d=filament_path_d,h=3*gearbox_d,center=true,$fn=30); | 153 | translate([-(idler_d+filament_path_d)/2,0,0]) rotate([90,0,0]) { |
154 | translate([0,-filament_path_d/2/sqrt(2),0]) rotate([0,0,45]) | 154 | cylinder(d=filament_path_d,h=3*gearbox_d,center=true,$fn=30); |
155 | cube(size=[filament_path_d/2,filament_path_d/2,3*gearbox_d],center=true); | 155 | translate([0,-filament_path_d/2/sqrt(2),0]) rotate([0,0,45]) |
156 | } | 156 | cube(size=[filament_path_d/2,filament_path_d/2,3*gearbox_d],center=true); |
157 | }//rotate translate | ||
158 | translate([-(idler_d+filament_path_d)/2,0,0]) | ||
159 | rotate([90,0,0]) | ||
160 | translate([0,0, | ||
161 | sqrt(2)*(mount_d-pulley_d+filament_path_d+lsd)/2 | ||
162 | ]) { | ||
163 | cylinder(d1=filament_path_d,d2=2*filament_path_d, | ||
164 | h=filament_path_d,$fn=2*filament_path_d*fnd); | ||
165 | translate([0,0,filament_path_d-epsilon]) | ||
166 | cylinder(d=2*filament_path_d,h=lsd,$fn=2*filament_path_d*fnd); | ||
167 | } | ||
168 | }//place_idler | ||
157 | 169 | ||
158 | // idler space and mounting hole | 170 | // idler space and mounting hole |
159 | place_idler() { | 171 | place_idler() { |
160 | difference() { | 172 | difference() { |
161 | cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); | 173 | cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); |
162 | if(supports) for(y=[-lsd/2+extrusion_width:(lsd-2*extrusion_width)/3:lsd/2-extrusion_width]) | 174 | if(supports) for(y=[-lsd/2+extrusion_width:(lsd-2*extrusion_width)/3:lsd/2-extrusion_width]) |
163 | translate([-lsd/2-1,y-extrusion_width/2,-idler_h/2-idler_v_tolerance/2-1]) | 175 | translate([-lsd/2-1,y-extrusion_width/2,-idler_h/2-idler_v_tolerance/2-1]) |
164 | cube(size=[lsd+2,extrusion_width,idler_h+idler_v_tolerance+2]); | 176 | cube(size=[lsd+2,extrusion_width,idler_h+idler_v_tolerance+2]); |
165 | } | 177 | } |
166 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); | 178 | cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); |
167 | translate([0,0,lever_thickness/2-idler_screwhead_h]) | 179 | translate([0,0,lever_thickness/2-idler_screwhead_h]) |
168 | cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d); | 180 | cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d); |
169 | } | 181 | } |
170 | // mounting screw hole | 182 | // mounting screw hole |
171 | translate([mount_d/2,0,0]) | 183 | translate([mount_d/2,0,0]) |
172 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d); | 184 | cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d); |
173 | 185 | ||
174 | // lever end | 186 | // lever end |
175 | translate([mount_d/2,0,0]) rotate([0,90,0]) { | 187 | translate([mount_d/2,0,0]) rotate([0,90,0]) { |
176 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); | 188 | translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); |
177 | translate([0,-longwing,0]) | 189 | translate([0,-longwing,0]) |
178 | mirror([0,0,1]) | 190 | mirror([0,0,1]) |
179 | difference() { | 191 | difference() { |
180 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); | 192 | cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); |
181 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); | 193 | sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); |
182 | } | 194 | } |
183 | }//rotate-translate | 195 | }//rotate-translate |
184 | }//difference | 196 | }//difference |
185 | // bridging patch | 197 | // bridging patch |
186 | if(bridges) place_idler() | 198 | if(bridges) place_idler() |
187 | translate([0,0,lever_thickness/2-mount_screwhead_h]) | 199 | translate([0,0,lever_thickness/2-mount_screwhead_h]) |
188 | mirror([0,0,1]) | 200 | mirror([0,0,1]) |
189 | cylinder(d=mount_screwhead_d,h=layer_height); | 201 | cylinder(d=mount_screwhead_d,h=layer_height); |
190 | }//translate | 202 | }//translate |
191 | }//lever module | 203 | }//lever module |
192 | 204 | ||
193 | module body() { | 205 | module body() { |
194 | difference() { | 206 | difference() { |
195 | union() { | 207 | union() { |
196 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); | 208 | cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); |
197 | // finger and spring support | 209 | // finger and spring support |
198 | fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc; | 210 | fsw = gearbox_d-(gearbox_d-mount_d)/2-spring_lc; |
199 | translate([-gearbox_d/2,0,0]) difference() { | 211 | translate([-gearbox_d/2,0,0]) difference() { |
200 | union() { | 212 | union() { |
201 | hull() { | 213 | hull() { |
202 | translate([0,-longwing,ls_z]) | 214 | translate([0,-longwing,ls_z]) |
203 | rotate([0,90,0]) | 215 | rotate([0,90,0]) |
204 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); | 216 | cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); |
205 | hh=body_h-ls_z; | 217 | hh=body_h-ls_z; |
206 | translate([0,0,ls_z-lever_thickness/2]) | 218 | translate([0,0,ls_z-lever_thickness/2]) |
207 | mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]); | 219 | mirror([0,1,0]) cube(size=[fsw,longwing-hh+lever_thickness/sqrt(2),hh+lever_thickness/2]); |
208 | hhh=ls_z; | 220 | hhh=ls_z; |
209 | translate([0,0,0]) | 221 | translate([0,0,0]) |
210 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); | 222 | mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); |
211 | } | 223 | } |
212 | } | 224 | } |
213 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { | 225 | translate([0,-longwing,ls_z]) rotate([0,-90,0]) { |
214 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { | 226 | if(!tensioner) finger_indent(d=lever_thickness-1,r=15); else { |
215 | mirror([0,0,1]) { | 227 | mirror([0,0,1]) { |
216 | translate([0,0,st_thickshell]) | 228 | translate([0,0,st_thickshell]) |
217 | hull() for(o=[0,spring_d]) translate([0,-o,0]) | 229 | hull() for(o=[0,spring_d]) translate([0,-o,0]) |
218 | rotate([0,0,30]) | 230 | rotate([0,0,30]) |
219 | cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); | 231 | cylinder(d=st_nut_d+st_nut_d_tolerance,h=st_nut_h+st_nut_h_tolerance,$fn=6); |
220 | translate([0,0,-1]) cylinder(d=st_screw_d+st_screw_d_tolerance,h=fsw+2,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); | 232 | translate([0,0,-1]) cylinder(d=st_screw_d+st_screw_d_tolerance,h=fsw+2,$fn=fnd*(st_screw_d+st_screw_d_tolerance)); |
221 | bigd = spring_d+spring_d_clearance; | 233 | bigd = spring_d+spring_d_clearance; |
222 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; | 234 | hf = (bigd-st_screw_d-st_screw_d_tolerance)/2; |
223 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) | 235 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell-epsilon]) |
224 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, | 236 | cylinder(d1=st_screw_d+st_screw_d_tolerance,d2=bigd, |
225 | h=hf+epsilon, $fn=fnd*bigd); | 237 | h=hf+epsilon, $fn=fnd*bigd); |
226 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) | 238 | translate([0,0,st_thickshell+st_nut_h+st_nut_h_tolerance+st_thinshell+hf-epsilon]) |
227 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); | 239 | cylinder(d=bigd,h=fsw+1,$fn=fnd*bigd); |
228 | } | 240 | } |
229 | } | 241 | } |
230 | } | 242 | } |
231 | } // translate | 243 | } // translate |
232 | 244 | ||
233 | // pushfit bracket | 245 | // pushfit bracket |
234 | translate([0,0,filament_elevation]) | 246 | translate([0,0,filament_elevation]) |
235 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 247 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
236 | rotate([-90,0,0]) | 248 | rotate([-90,0,0]) |
237 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) | 249 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d-gearbox_d/2/*TODO:*/]) |
238 | cylinder(r=min(body_h-filament_elevation,filament_elevation)/sin(60)-epsilon,h=pf_h(pf)+gearbox_d/2/*TODO:*/,$fn=6); | 250 | cylinder(r=min(body_h-filament_elevation,filament_elevation)/sin(60)-epsilon,h=pf_h(pf)+gearbox_d/2/*TODO:*/,$fn=6); |
239 | }//union (first child of difference) | 251 | }//union (first child of difference) |
240 | 252 | ||
241 | // protrusion | 253 | // protrusion |
242 | translate([0,0,-1]) | 254 | translate([0,0,-1]) |
243 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); | 255 | cylinder(d=protrusion_d+protrusion_tolerance_h,h=protrusion_h+protrusion_tolerance_v+1,$fn=fnd*(protrusion_d+protrusion_tolerance_h)); |
244 | // mount screw holes | 256 | // mount screw holes |
245 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { | 257 | for(zr=[0:90:359]) rotate([0,0,zr]) translate([mount_d/2,0,0]) { |
246 | translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) | 258 | translate([0,0,mount_screw_l-mounthole_depth/2-(bridges?layer_height:-epsilon)]) |
247 | mirror([0,0,1]) | 259 | mirror([0,0,1]) |
248 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, | 260 | cylinder(d=mount_screw_d+mount_screw_d_tolerance, |
249 | h=mount_screw_l-mounthole_depth/2+1, | 261 | h=mount_screw_l-mounthole_depth/2+1, |
250 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); | 262 | $fn=fnd*(mount_screw_d+mount_screw_d_tolerance)); |
251 | translate([0,0,mount_screw_l-mounthole_depth/2]) | 263 | translate([0,0,mount_screw_l-mounthole_depth/2]) |
252 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); | 264 | cylinder(d=mount_screwhead_d,h=body_h+1,$fn=fnd*mount_screwhead_d); |
253 | }//for | 265 | }//for |
254 | // pushfit | 266 | // pushfit |
255 | translate([0,0,filament_elevation]) | 267 | translate([0,0,filament_elevation]) |
256 | rotate([0,0,45]) translate([pulley_d/2,0,0]) | 268 | rotate([0,0,45]) translate([pulley_d/2,0,0]) |
257 | rotate([-90,0,0]) | 269 | rotate([-90,0,0]) |
258 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) | 270 | translate([0,0,mount_d/sqrt(2)/2+mount_screw_d+epsilon]) |
259 | rotate([0,0,180]) { | 271 | rotate([0,0,180]) { |
260 | pushfit(pf); | 272 | pushfit(pf); |
261 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); | 273 | cylinder(d=filament_guide_d,h=gearbox_d,center=true,$fn=fnd*filament_guide_d); |
262 | translate([0,-filament_guide_d/2/sqrt(2),0]) | 274 | translate([0,-filament_guide_d/2/sqrt(2),0]) |
263 | rotate([0,0,45]) | 275 | rotate([0,0,45]) |
264 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); | 276 | cube(size=[filament_guide_d/2,filament_guide_d/2,gearbox_d],center=true); |
265 | }//rotate translate rotate translate rotate translate | 277 | }//rotate translate rotate translate rotate translate |
266 | // pulley | 278 | // pulley |
267 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); | 279 | cylinder(d=pulley_d+pulley_clearance,h=body_h+1,$fn=fnd*(pulley_d+pulley_clearance)); |
268 | // leverspace | 280 | // leverspace |
269 | hull() for(x=[0,gearbox_d]) | 281 | hull() for(x=[0,gearbox_d]) |
270 | rotate([0,0,45]) | 282 | rotate([0,0,45]) |
271 | translate([x,0,ls_z-ls_h/2]) | 283 | translate([x,0,ls_z-ls_h/2]) |
272 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); | 284 | cylinder(d=idler_d+idler_clearance,h=ls_h,$fn=fnd*(idler_d+idler_clearance)); |
273 | 285 | ||
274 | // idler clearance | 286 | // idler clearance |
275 | a=cos(45)*(pulley_d+idler_d)/2; | 287 | a=cos(45)*(pulley_d+idler_d)/2; |
276 | b=mount_d/2-a; | 288 | b=mount_d/2-a; |
277 | x=sqrt(pow(a,2)+pow(b,2)); | 289 | x=sqrt(pow(a,2)+pow(b,2)); |
278 | translate([mount_d/2,0,ls_z]) | 290 | translate([mount_d/2,0,ls_z]) |
279 | intersection() { | 291 | intersection() { |
280 | r = x+idler_d/2+idler_clearance; | 292 | r = x+idler_d/2+idler_clearance; |
281 | cylinder(r=r,h=ls_h,center=true); | 293 | cylinder(r=r,h=ls_h,center=true); |
282 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); | 294 | translate([-r-1,0,-ls_h/2-1]) cube(size=[2*r+2,r+1,ls_h+2]); |
283 | } | 295 | } |
284 | 296 | ||