summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--another.scad8
1 files changed, 6 insertions, 2 deletions
diff --git a/another.scad b/another.scad
index 8334b11..1811584 100644
--- a/another.scad
+++ b/another.scad
@@ -1,268 +1,272 @@
1draft=true; 1draft=true;
2layer_height=0.2; extrusion_width=0.4; 2layer_height=0.2; extrusion_width=0.4;
3epsilon=0.01; 3epsilon=0.01;
4$fs=0.0125; 4$fs=0.0125;
5 5
6use <pushfittery.scad>; 6use <pushfittery.scad>;
7include <pushfit_data.scad>; 7include <pushfit_data.scad>;
8include <pulley_data.scad>; 8include <pulley_data.scad>;
9 9
10module the_extruder( 10module the_extruder(
11 // motor properties 11 // motor properties
12 gearbox_d = 36, 12 gearbox_d = 36,
13 mount_d = 28, // the distance between opposite mounting holes 13 mount_d = 28, // the distance between opposite mounting holes
14 mounthole_depth = 5, 14 mounthole_depth = 5,
15 mounthole_min_depth = 3, mounthole_max_depth = 4, 15 mounthole_min_depth = 3, mounthole_max_depth = 4,
16 protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox 16 protrusion_d = 22, protrusion_h = 2.2, // the dimensions of the protrusion on top of gearbox
17 bore_d = 8, bore_l = 17.6, 17 bore_d = 8, bore_l = 17.6,
18 bore_dd = 7, 18 bore_dd = 7,
19 // pulley properties 19 // pulley properties
20 pulley = pulley_e3d, 20 pulley = pulley_e3d,
21 pulley_elevation = 1, // pulley elevation above the protrusion 21 pulley_elevation = 1, // pulley elevation above the protrusion
22 // idler properties 22 // idler properties
23 idler_d = 10, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height 23 idler_d = 10, idler_h = 4, idler_id = 3,// idler dimensions: outer and inner diameters and height
24 // spring properties 24 // spring properties
25 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
26 // filament path properties 26 // filament path properties
27 filament_d = 1.75, 27 filament_d = 1.75,
28 filament_path_d = 2, 28 filament_path_d = 2,
29 filament_guide_d = 4, // PTFE filament guide diameter 29 filament_guide_d = 4, // PTFE filament guide diameter
30 // knob properties 30 // knob properties
31 knob_h = 10, 31 knob_h = 10,
32 knob_indent_d = 4, 32 knob_indent_d = 4,
33 knob_indents = 12, 33 knob_indents = 12,
34 knob_v_clearance = 1, 34 knob_v_clearance = 1,
35 // spring tensioner 35 // spring tensioner
36 st_nut_d = 9, st_nut_h = 4, 36 st_nut_d = 9, st_nut_h = 4,
37 st_screw_d = 5, 37 st_screw_d = 5, st_screw_l = 16,
38 st_thickshell = 8*extrusion_width, st_thinshell = 2*extrusion_width, 38 st_thickshell = 8*extrusion_width, st_thinshell = 2*extrusion_width,
39 st_split_w = 4*extrusion_width, 39 st_split_w = 4*extrusion_width,
40 40
41 // screw it 41 // screw it
42 mount_screw_d = 3.1, mount_screw_l = 20, 42 mount_screw_d = 3.1, mount_screw_l = 20,
43 mount_screwhead_d=6, mount_screwhead_h=3, 43 mount_screwhead_d=6, mount_screwhead_h=3,
44 idler_screw_d = 3, 44 idler_screw_d = 3,
45 idler_screwhead_d=6, idler_screwhead_h=3, 45 idler_screwhead_d=6, idler_screwhead_h=3,
46 46
47 pf = pushfit_metal, 47 pf = pushfit_metal,
48 pf_shell = max(3*layer_height,3*extrusion_width), 48 pf_shell = max(3*layer_height,3*extrusion_width),
49 49
50 // empty spaces 50 // empty spaces
51 idler_travel = 3, // how far should idler travel when pressed 51 idler_travel = 3, // how far should idler travel when pressed
52 idler_clearance=.5, 52 idler_clearance=.5,
53 pulley_small_d_clearance=.5, 53 pulley_small_d_clearance=.5,
54 lever_v_clearance=.7, // vertical clearance for the lever 54 lever_v_clearance=.7, // vertical clearance for the lever
55 spring_d_clearance=1, 55 spring_d_clearance=1,
56 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion 56 protrusion_tolerance_h=.5, // horizontal tolerance for the motor protrusion
57 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion 57 protrusion_tolerance_v=.5, // vertical tolerance for the motor protrusion
58 mount_screw_d_tolerance=.4, 58 mount_screw_d_tolerance=.4,
59 idler_v_tolerance=.5, 59 idler_v_tolerance=.5,
60 knob_bore_d_tolerance=.8, 60 knob_bore_d_tolerance=.8,
61 st_nut_h_tolerance=.2, 61 st_nut_h_tolerance=.2,
62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */ 62 st_nut_d_tolerance=.2,/* TODO: make it st_nut_w_tolerance */
63 st_screw_d_tolerance=.5, 63 st_screw_d_tolerance=.5,
64 st_split_w_tolerance = .3, 64 st_split_w_tolerance = .3,
65 65
66 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis. 66 min_z_shell = 4*layer_height, // the very minimal shell thickness along z-axis.
67 min_xy_shell = 2*extrusion_width, 67 min_xy_shell = 2*extrusion_width,
68 68
69 body_label = "another", body_label_thickness = layer_height, 69 body_label = "another", body_label_thickness = layer_height,
70 knob_label = "another", knob_label_thickness = 2*layer_height, knob_label_size=undef, 70 knob_label = "another", knob_label_thickness = 2*layer_height, knob_label_size=undef,
71 71
72 what="lever", // lever|body|knob|springpad|* 72 what="lever", // lever|body|knob|springpad|*
73 left=false, 73 left=false,
74 vitamins = true, 74 vitamins = true,
75 bridges = true, 75 bridges = true,
76 debug = false, 76 debug = false,
77) { 77) {
78 fnd = 2*PI; fnr = 2*fnd; 78 fnd = 2*PI; fnr = 2*fnd;
79 function lu(m,k) = m[search([k],m)[0]][1]; 79 function lu(m,k) = m[search([k],m)[0]][1];
80 80
81 pulley_d = lu(pulley,"d"); 81 pulley_d = lu(pulley,"d");
82 pulley_h = lu(pulley,"h"); 82 pulley_h = lu(pulley,"h");
83 teeth_elevation = lu(pulley,"fe"); 83 teeth_elevation = lu(pulley,"fe");
84 filament_offset = lu(pulley,"g")+filament_d/2; 84 filament_offset = lu(pulley,"g")+filament_d/2;
85 pulley_d_clearance = lu(pulley,"ssrc")*2; 85 pulley_d_clearance = lu(pulley,"ssrc")*2;
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; 110 pf_offset = mount_d/sqrt(2)/2+mount_screw_d/2+min_xy_shell;
111 111
112 module teardrop(r,d,h,center=false,angle=45) { 112 module teardrop(r,d,h,center=false,angle=45) {
113 dd = d ? d : (2*r); 113 dd = d ? d : (2*r);
114 $fn = dd*fnd; 114 $fn = dd*fnd;
115 cylinder(d=dd,h=h,center=center); 115 cylinder(d=dd,h=h,center=center);
116 if(angle>0) translate([0,0,center?-h/2:0]) 116 if(angle>0) translate([0,0,center?-h/2:0])
117 rotate([0,0,angle]) 117 rotate([0,0,angle])
118 cube(size=[d/2,d/2,h]); 118 cube(size=[d/2,d/2,h]);
119 } 119 }
120 120
121 module mirrorleft() { 121 module mirrorleft() {
122 mirror([left?0:1,0,0]) children(); 122 mirror([left?0:1,0,0]) children();
123 } 123 }
124 module place_idler() { 124 module place_idler() {
125 rotate([0,0,45]) 125 rotate([0,0,45])
126 translate([(pulley_d+idler_d)/2,0,0]) 126 translate([(pulley_d+idler_d)/2,0,0])
127 children(); 127 children();
128 } 128 }
129 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) { 129 module finger_indent(d=lever_thickness,depth/*=1*/,r/*=15*/) {
130 if(depth) { 130 if(depth) {
131 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth); 131 hh = (-4*pow(depth,2)+pow(d,2))/(8*depth);
132 rr = depth+hh; 132 rr = depth+hh;
133 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr); 133 translate([0,0,hh]) sphere(r=rr,$fn=fnr*rr);
134 }else if(r) { 134 }else if(r) {
135 hh=sqrt(pow(r,2)-pow(d,2)/4); 135 hh=sqrt(pow(r,2)-pow(d,2)/4);
136 translate([0,0,hh]) sphere(r=r,$fn=fnr*r); 136 translate([0,0,hh]) sphere(r=r,$fn=fnr*r);
137 } 137 }
138 } 138 }
139 139
140 % if(vitamins) mirrorleft() { 140 % if(vitamins) mirrorleft() {
141 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);
142 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])
143 cylinder(d=mount_screw_d,h=20,$fn=30); 143 cylinder(d=mount_screw_d,h=20,$fn=30);
144 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);
145 translate([0,0,protrusion_h]) { 145 translate([0,0,protrusion_h]) {
146 difference() { 146 difference() {
147 cylinder(d=bore_d,h=bore_l,$fn=30); 147 cylinder(d=bore_d,h=bore_l,$fn=30);
148 translate([-bore_d/2-1,bore_dd-bore_d/2,-1]) 148 translate([-bore_d/2-1,bore_dd-bore_d/2,-1])
149 cube([bore_d+2,bore_d/2,bore_l+2]); 149 cube([bore_d+2,bore_d/2,bore_l+2]);
150 } 150 }
151 translate([0,0,pulley_elevation]) { 151 translate([0,0,pulley_elevation]) {
152 cylinder(d=pulley_d,h=pulley_h,$fn=30); 152 cylinder(d=pulley_d,h=pulley_h,$fn=30);
153 translate([0,0,teeth_elevation]) { 153 translate([0,0,teeth_elevation]) {
154 place_idler() { 154 place_idler() {
155 cylinder(d=idler_d,h=idler_h,center=true,$fn=30); 155 cylinder(d=idler_d,h=idler_h,center=true,$fn=30);
156 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);
157 }//place idler 157 }//place idler
158 // filament path 158 // filament path
159 rotate([0,0,45]) { 159 rotate([0,0,45]) {
160 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]) {
161 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); 161 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15);
162 }//rotate translate 162 }//rotate translate
163 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]) {
164 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15); 164 cylinder(d=filament_d,h=gearbox_d,center=false,$fn=15);
165 translate([0,0,pf_offset]) 165 translate([0,0,pf_offset])
166 pushfit(pf); 166 pushfit(pf);
167 }//rotate translate 167 }//rotate translate
168 }//rotate 168 }//rotate
169 }//translate teeth 169 }//translate teeth
170 }//translate pulley 170 }//translate pulley
171 }//translate protrusion 171 }//translate protrusion
172 }//vitamins 172 // spring tensioner screw
173 translate([-gearbox_d/2,-longwing,ls_z])
174 rotate([0,90,0])
175 cylinder(d=st_screw_d,h=st_screw_l);
176 }//mirrorleft if(vitamins)
173 177
174 module lever() { 178 module lever() {
175 translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) { 179 translate([0,0,protrusion_h+pulley_elevation+teeth_elevation]) {
176 difference() { 180 difference() {
177 union() { 181 union() {
178 hull() { 182 hull() {
179 place_idler() 183 place_idler()
180 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 184 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
181 translate([mount_d/2,0,0]) 185 translate([mount_d/2,0,0])
182 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 186 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
183 }//hull 187 }//hull
184 hull() { 188 hull() {
185 translate([mount_d/2,0,0]) 189 translate([mount_d/2,0,0])
186 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60); 190 cylinder(d=lsd,h=lever_thickness,center=true,$fn=60);
187 translate([mount_d/2,-longwing,0]) rotate([0,90,0]) 191 translate([mount_d/2,-longwing,0]) rotate([0,90,0])
188 cylinder(d=lever_thickness,h=lsd,center=true,$fn=60); 192 cylinder(d=lever_thickness,h=lsd,center=true,$fn=60);
189 }//hull 193 }//hull
190 }//union 194 }//union
191 195
192 // filament path 196 // filament path
193 place_idler() 197 place_idler()
194 translate([-idler_d/2-idler_filament_offset,0,0]) 198 translate([-idler_d/2-idler_filament_offset,0,0])
195 rotate([90,0,0]) { 199 rotate([90,0,0]) {
196 mirror([0,1,0]) 200 mirror([0,1,0])
197 teardrop(d=filament_path_d,h=3*gearbox_d,center=true); 201 teardrop(d=filament_path_d,h=3*gearbox_d,center=true);
198 translate([0,0, 202 translate([0,0,
199 sqrt(2)*(mount_d-pulley_d+lsd)/2 203 sqrt(2)*(mount_d-pulley_d+lsd)/2
200 ]) { 204 ]) {
201 cylinder(d1=filament_path_d,d2=2*filament_path_d, 205 cylinder(d1=filament_path_d,d2=2*filament_path_d,
202 h=filament_path_d,$fn=2*filament_path_d*fnd); 206 h=filament_path_d,$fn=2*filament_path_d*fnd);
203 translate([0,0,filament_path_d-epsilon]) 207 translate([0,0,filament_path_d-epsilon])
204 cylinder(d=2*filament_path_d,h=lsd*sqrt(2),$fn=2*filament_path_d*fnd); 208 cylinder(d=2*filament_path_d,h=lsd*sqrt(2),$fn=2*filament_path_d*fnd);
205 }//translate 209 }//translate
206 }//rotate translate place_idler 210 }//rotate translate place_idler
207 211
208 // idler space and mounting hole 212 // idler space and mounting hole
209 place_idler() { 213 place_idler() {
210 cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60); 214 cylinder(d=idler_d+idler_clearance*2,h=idler_h+idler_v_tolerance,center=true,$fn=60);
211 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30); 215 cylinder(d=idler_screw_d,h=lever_thickness+2,center=true,$fn=30);
212 translate([0,0,lever_thickness/2-idler_screwhead_h]) 216 translate([0,0,lever_thickness/2-idler_screwhead_h])
213 cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d); 217 cylinder(d=idler_screwhead_d,h=idler_screwhead_h+1,$fn=fnd*idler_screwhead_d);
214 } 218 }
215 // mounting screw hole 219 // mounting screw hole
216 translate([mount_d/2,0,0]) 220 translate([mount_d/2,0,0])
217 cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d); 221 cylinder(d=mount_screw_d+mount_screw_d_tolerance,h=lever_thickness+2,center=true,$fn=fnd*mount_screw_d);
218 222
219 // lever end 223 // lever end
220 translate([mount_d/2,0,0]) rotate([0,90,0]) { 224 translate([mount_d/2,0,0]) rotate([0,90,0]) {
221 translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15); 225 translate([0,-longwing,lsd/2]) finger_indent(d=lever_thickness-1,r=15);
222 translate([0,-longwing,0]) 226 translate([0,-longwing,0])
223 mirror([0,0,1]) 227 mirror([0,0,1])
224 difference() { 228 difference() {
225 cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance)); 229 cylinder(d=spring_d+spring_d_clearance,h=lsd,$fn=fnd*(spring_d+spring_d_clearance));
226 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4); 230 sphere(d=spring_d*3/4,$fn=fnd*spring_d*3/4);
227 } 231 }
228 }//rotate-translate 232 }//rotate-translate
229 }//difference 233 }//difference
230 // bridging patch 234 // bridging patch
231 if(bridges) place_idler() 235 if(bridges) place_idler()
232 translate([0,0,lever_thickness/2-mount_screwhead_h]) 236 translate([0,0,lever_thickness/2-mount_screwhead_h])
233 mirror([0,0,1]) 237 mirror([0,0,1])
234 cylinder(d=mount_screwhead_d,h=layer_height); 238 cylinder(d=mount_screwhead_d,h=layer_height);
235 }//translate 239 }//translate
236 }//lever module 240 }//lever module
237 241
238 module body() { 242 module body() {
239 difference() { 243 difference() {
240 union() { 244 union() {
241 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d); 245 cylinder(d=gearbox_d,h=body_h,$fn=fnd*gearbox_d);
242 // spring tensioner part 246 // spring tensioner part
243 translate([-gearbox_d/2,0,0]) hull() { 247 translate([-gearbox_d/2,0,0]) hull() {
244 translate([0,-longwing,ls_z]) 248 translate([0,-longwing,ls_z])
245 rotate([0,90,0]) 249 rotate([0,90,0])
246 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness); 250 cylinder(d=lever_thickness,h=fsw,$fn=fnd*lever_thickness);
247 hh=body_h-ls_z; 251 hh=body_h-ls_z;
248 translate([0,0,ls_z]) 252 translate([0,0,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]); 253 mirror([0,1,0]) cube(size=[fsw,longwing+(st_split_w+st_split_w_tolerance)/2+st_thickshell,body_h-ls_z]);
250 hhh=ls_z; 254 hhh=ls_z;
251 translate([0,0,0]) 255 translate([0,0,0])
252 mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]); 256 mirror([0,1,0]) cube(size=[fsw,longwing-hhh+lever_thickness/sqrt(2),hhh+lever_thickness/2]);
253 }//hull translate 257 }//hull translate
254 258
255 // pushfit bracket 259 // pushfit bracket
256 translate([0,0,filament_elevation]) 260 translate([0,0,filament_elevation])
257 rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0]) 261 rotate([0,0,45]) translate([pulley_d/2+filament_offset,0,0])
258 rotate([-90,0,0]) 262 rotate([-90,0,0])
259 translate([0,0,pf_offset-gearbox_d/2/*TODO:*/]) { 263 translate([0,0,pf_offset-gearbox_d/2/*TODO:*/]) {
260 pfbl = pf_h(pf)+gearbox_d/2; //TODO: 264 pfbl = pf_h(pf)+gearbox_d/2; //TODO:
261 pfbd = pf_d(pf)+2*pf_shell; 265 pfbd = pf_d(pf)+2*pf_shell;
262 hull() { 266 hull() {
263 cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd); 267 cylinder(d=pfbd,h=pfbl,$fn=pfbd*fnd);
264 translate([-epsilon/2,0,0]) { 268 translate([-epsilon/2,0,0]) {
265 cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]); 269 cube(size=[epsilon,filament_elevation,pfbl-filament_elevation+pfbd/2]);
266 mirror([0,1,0]) 270 mirror([0,1,0])
267 cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]); 271 cube(size=[epsilon,body_h-filament_elevation,pfbl-body_h+filament_elevation+pfbd/2]);
268 }//translate 272 }//translate