9 function selsz(sm,lt,lg) = fdia < 2 ? sm : lightduty ? lt : lg;
10 function usedove() = selsz(true,true,false);
12 num_arms = selsz(3,3,4);
14 channelslop=selsz(slop,0.75,slop);
17 hubeffrad = selsz(30, 82, 40);
18 hubbigrad = selsz(20, 38, 38);
19 hublwidth = selsz(3, 2.5, 4);
22 hubaxlerad = selsz(5, 28/2, 28/2);
23 totalheightfromtower = 240;
24 axletowerfudgebend = 0;
25 axleaxlefudgebend = 3;
30 prongthick=selsz(5,4,5);
31 prongwidth=selsz(5,4,5);
33 prongribheight=selsz(0,0,4);
37 ratchettoothsmoothr=1;
38 ratchettoothslope=0.75;
40 cupwidth=selsz(40,25,50);
41 cupheight=selsz(55,25,55);
43 cupstrong_dx=selsz(0,0,-10);
54 stalklength=selsz(35,25,55);
59 overclipcupnextgap=selsz(20,15,20);
61 hubaxlelen = selsz(25, 62.5, 77.5);
71 armendwallthick=selsz(2.5, 1.8, 2.5);
72 armendbasethick=selsz(1.2, 1.2, 1.2);
74 axlehorizoffset = 12.5;
84 washerthinthick = 0.8;
85 washerverythinthick = 0.4;
86 washerrad = hubaxlerad + 7.5;
87 frictionwasherarmwidth = 3;
88 frictionwasherextrapush = 1.0;
90 ratchetpawl=ratchetstep-ratchettooth-bigslop*2;
92 nondove_armhole_x = 32;
93 nondove_armhole_hole = 4 + 0.8;
94 nondove_armhole_support = 7;
95 nondove_armhole_wall = 3.2;
96 nondove_armhole_slop = 0.5;
97 nondove_armhole_slop_x = 0.5;
99 nondove_armbase = nondove_armhole_x + nondove_armhole_hole/2 +
100 nondove_armhole_support;
101 echo(nondove_armbase);
103 include <doveclip.scad>
104 include <cliphook.scad>
105 include <filamentteeth.scad>
106 include <axlepin.scad>
108 channelwidth = prongthick + channelslop;
109 channeldepth = prongwidth + ratchettoothheight;
110 totalwidth = armendwallthick*2 + channelwidth;
111 totalheight = channeldepth + armendbasethick;
112 stalkwidth = prongwidth + prongstalkxwidth;
114 module ArmEnd(length=armend_length){ ////toplevel
116 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
118 DoveClipPairBase(h=doveclipheight);
122 translate([1, -armendwallthick, -armendbasethick])
124 cube([nondove_armbase+1, totalwidth, totalheight]);
125 translate([-nondove_armbase + nondove_armhole_x,
126 -armendwallthick + totalwidth/2,
127 -armendbasethick -1])
128 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
133 translate([0, -armendwallthick, -armendbasethick])
134 cube([length, totalwidth, totalheight]);
135 translate([-1, 0, 0])
136 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
137 translate([-1, 0, ratchettoothheight])
138 cube([length+2, channelwidth, channeldepth+1]);
140 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
141 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
143 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
144 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
148 cube([ratchettooth - ratchettoothsmoothr*2,
149 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
154 module FilamentCupHandle(){
155 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
157 cube([stalklength, stalkwidth, prongthick]);
158 translate([stalklength, stalkwidth/2, 0])
159 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
160 translate([ratchettoothsmoothr, stalkwidth, 0]) {
162 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
163 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
168 ratchettoothheight - ratchettoothsmoothr,
175 module FilamentCupCup(){
176 for (my=[0,1]) mirror([0,my,0]) {
177 translate([0, cupwidth/2, 0])
178 cube([cupheight + prongwidth, prongwidth, prongthick]);
182 module FilamentCup() { ////toplevel
186 dy = cupwidth/2 + gapy + overclipcupgap;
187 baselen = dy+cupwidth/2;
189 translate([0, dy, 0])
191 cube([prongwidth, baselen+1, prongthick]);
193 translate([cupstrong_dx, prongwidth, 0]) {
194 cube([prongwidth, baselen-prongwidth, prongthick]);
195 for (y = [0, .33, .67, 1])
196 translate([0, (baselen - prongwidth) * y, 0])
197 cube([-cupstrong_dx + 1, prongwidth, prongthick]);
199 if (cupstrong_dx != 0) {
201 translate([-prongwidth*.55, -prongwidth*2.1, 0])
202 cube([prongwidth*(2.65), prongwidth*4.2, prongthick]);
205 translate([0, -0.2, 0])
206 cube([prongribwidth, baselen, prongthick + prongribheight]);
208 if (prongribheight > 0) {
209 translate([-prongwidth, baselen, 0])
210 cube([cupheight/2, prongwidth + prongribheight, prongribwidth]);
213 midrad = cupwidth/2 + prongwidth/2;
215 propshift = stalklength - overclipdepth - prongthick + propxshift;
216 proptaken = propshift;
217 echo(midrad, propshift, proptaken);
219 translate([propshift, -1, 0]) {
220 // something is wrong with the y calculation
225 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
226 translate([cupstrong_dx, y + prongwidth, 0])
227 rotate([0,0, 102 + fdia])
228 FilamentTeeth(fdia=fdia, h=teethh);
230 for (x = [-0.3, -1.3]) {
231 translate([cupheight + overclipcupnextgap*x, baselen + prongwidth, 0])
232 rotate([0,0, 12 + fdia])
233 FilamentTeeth(fdia=fdia, h=teethh);
237 module CupSecuringClipSolid(w,d,h1,h2){
238 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
239 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
243 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
244 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
246 CupSecuringClipSolid(w=totalwidth,
247 d=overclipdepth + xdepth,
248 h1=hbase - overclipsmaller,
249 h2=hbase + overclipbigger);
250 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
254 module CupSecuringClip(){ ////toplevel
255 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
258 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
259 translate([-wingswidth/2, -wingsize/2, 0])
260 cube([wingswidth, wingsize, wingthick]);
261 translate([-wingsize/2, -wingswidth/2, 0])
262 cube([wingsize, wingswidth, wingthick]);
264 translate([0,0,-0.1])
265 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
269 module ArmDoveClipPin(){ ////toplevel
270 DoveClipPin(h=doveclipheight);
273 module TowerDoveClipPin(){ ////toplevel
274 DoveClipPin(h=towercliph/2);
277 module Hub(){ ////toplevel
278 axlerad = hubaxlerad + slop;
279 xmin = axlerad+hublwidth/2;
280 xmax = hubbigrad-hublwidth/2;
281 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
282 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
283 nondove_allwidth = nondove_armhole_wall*2 + totalwidth;
287 cylinder($fn=60, h=hublthick, r=hubbigrad);
289 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
291 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
292 for (ang=[0 : 360/num_arms : 359])
296 translate([hubeffrad,0,0])
297 DoveClipPairSane(h=doveclipheight,
298 baseextend = (hubeffrad - DoveClip_depth()
299 - hubbigrad + hublwidth));
300 if (hole>hublwidth && holewidth > 2) {
301 translate([hubbigrad + hublwidth, -holewidth/2, -1])
302 cube([hole, holewidth, hublthick+2]);
310 cube([hubeffrad + nondove_armhole_x
311 + nondove_armhole_hole/2 + nondove_armhole_support,
313 nondove_armhole_wall + totalheight]);
314 translate([hubeffrad - nondove_armhole_slop_x,
316 + nondove_armhole_wall - nondove_armhole_slop,
317 nondove_armhole_wall])
318 cube([nondove_armhole_x + 50,
319 totalwidth + nondove_armhole_slop*2,
321 translate([hubeffrad + nondove_armhole_x, 0, -20])
322 cylinder(r= nondove_armhole_hole/2, h=50, $fn=10);
326 for (ang = [0 : 180/num_arms : 359])
327 rotate([0,0,ang]) rotate([90,0,0]) {
328 translate([0,0,-hublwidth/2])
329 linear_extrude(height=hublwidth)
330 polygon([[xmin,0.05], [xmax,0.05],
331 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
334 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
338 module ArmExtender(){ ////toplevel
339 DoveClipExtender(length=exteffrad-hubeffrad,
344 module FsAxlePin(){ ////toplevel
345 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
348 module Axle(){ ////toplevel
349 pillarswidth = DoveClipPairSane_width(towerclipcount);
351 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
352 translate([-axlehorizoffset, -axlevertheight, 0]) {
353 rotate([0,0,-axletowerfudgebend])
355 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
356 translate([0, DoveClip_depth(), 0])
358 ExtenderPillars(axlevertheight - DoveClip_depth(),
359 pillarswidth, towercliph,
360 pillarw=towerpillarw);
363 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
364 axlerad = hubaxlerad-slop;
365 bump = axlerad * 0.2;
366 shift = axlerad-bump;
370 translate([0, 0, shift]) {
373 translate([-1, 0, 0])
377 h = 1 + axleclearlen + axlepinrad*2 + 2);
378 mirror([1,0,0]) rotate([0,90,0])
379 cylinder(r = axlerad*1.75, h = 3);
382 translate([axlehorizoffset - pillarswidth/2, 0, 0])
385 r = towercliph - shift,
387 translate([-50, -joinbelowallow, -50])
388 cube([100, joinbelowallow+50, 100]);
392 translate([axleclearlen + axlepinrad/2, 0, -25])
393 cylinder(r = axlepinrad + slop, h=50);
396 translate([-50,-50,0]) cube([100,100,100]);
400 module washer(thick){
401 Washer(hubaxlerad, washerrad, thick, slop);
404 module AxleWasher(){ ////toplevel
405 washer(thick=washerthick);
408 module AxleThinWasher(){ ////toplevel
409 washer(thick=washerthinthick);
412 module AxleVeryThinWasher(){ ////toplevel
413 washer(thick=washerverythinthick);
416 module AxleFrictionWasher(){ ////toplevel
418 cylinder(h=washerthick, r=washerrad);
419 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
422 frarmw = frictionwasherarmwidth;
423 frarmpawlr = hublwidth;
424 frarmpawlpush = slop*4 + frictionwasherextrapush;
425 for (ang=[0,180]) rotate([0,0,ang]) {
426 translate([washerrad-1, -frarmw/2, 0])
427 cube([frarmr - washerrad + 1, frarmw, washerthick]);
429 translate([frarmr - frarmpawlr, -50, 0])
430 cube([frarmpawlr, 100, 50]);
432 cylinder(h = 50, r = frarmpawlpush, $fn=36);
437 module TowerExtender(){ ////toplevel
438 l = totalheightfromtower - axlevertheight;
439 echo("TowerExtender",l);
440 DoveClipExtender(length = l,
441 ha = towercliph, hb = towercliph,
442 counta = towerclipcount, countb = towerclipcount,
443 pillarw = towerpillarw);
446 module FilamentCupPair(){ ////toplevel
448 translate([cupheight + prongthick*3,
451 rotate([0,0,180]) FilamentCup();
454 //----- storarm -----
457 storarm_hookheight = 5;
459 storarm_axleslop = 4;
462 storarm_base_h = 100;
464 storarm_base_mind = 2;
466 storarm_cope_hubaxle_mk1 = true;
468 storarm_screw_hole = 4;
469 storarm_screw_hole_slop = 0.5;
470 storarm_besides_hole = 4;
472 storarm_under_hole = 5;
473 storarm_screw_hole_head = 8.8;
474 storarm_screw_hole_head_slop = 1.5;
478 storarm_axlerad = hubaxlerad - storarm_axleslop;
479 storarm_mainlen = hubaxlelen*2 + storarm_axleslop
480 + (storarm_cope_hubaxle_mk1 ? 10 : 0);
481 storarm_totlen = storarm_mainlen + storarm_hooklen;
483 storarm_mid_off_y = storarm_axlerad;
485 storarm_base_off_y = storarm_mid_off_y + storarm_base_h/2;
487 module StorageArmDiagPartSide(xmin, xmax){
489 yuse = storarm_thick/2;
492 translate([xmin-1, -storarm_axlerad, storarm_thick/2])
494 cylinder(r=storarm_axlerad, h=xsz+2, $fn=60);
495 translate([xmin, -yuse, 0])
496 cube([xsz, yuse, storarm_thick]);
500 module StorageArmDiagPart(xmin, xmax, shear, adjbot){
502 StorageArmDiagPartSide(xmin,xmax);
504 multmatrix([[1,0,0,0],
508 translate([0, -storarm_axlerad*2 + adjbot, 0])
510 StorageArmDiagPartSide(xmin,xmax);
514 module StorageArmBaseTemplate(){
515 square([storarm_base_w, storarm_base_h]);
518 module StorageArmAtMountingHoles(){
519 bes = storarm_besides_hole + storarm_screw_hole;
522 x1 = storarm_base_w-bes;
523 y1 = storarm_base_h - bes;
530 translate([pos[0] - storarm_base_w,
531 pos[1] - storarm_base_off_y, -storarm_base_d])
536 module StorageArmRight(){ ////toplevel
537 shear = storarm_hookheight / (storarm_mainlen/2);
539 StorageArmDiagPart(-1, storarm_mainlen/2+1, shear, 0);
540 StorageArmDiagPart(storarm_mainlen/2-1, storarm_mainlen+1, shear/2,
541 storarm_hookheight/2);
543 translate([0, storarm_hookheight, 0])
544 StorageArmDiagPart(storarm_mainlen, storarm_totlen,
545 shear/2, -storarm_hookheight/2);
550 translate([-storarm_base_d, -storarm_base_off_y, storarm_base_w])
552 linear_extrude(height=storarm_base_mind)
553 StorageArmBaseTemplate();
554 StorageArmDiagPart(-1, 0, shear, 0);
556 StorageArmAtMountingHoles(){
557 cylinder(r= storarm_screw_hole_head/2,
561 StorageArmAtMountingHoles(){
563 cylinder(r= (storarm_screw_hole + storarm_screw_hole_slop)/2 ,
565 translate([0,0,storarm_under_hole])
566 cylinder(r= (storarm_screw_hole_head + storarm_screw_hole_head_slop)/2,
572 module StorageArmLeft(){ ////toplevel
573 mirror([1,0,0]) StorageArmRight();
576 module StorArmHoleTest(){ ////toplevel
577 sz = storarm_screw_hole_head + storarm_besides_hole*2;
580 translate([-50, -storarm_base_off_y, -1])
581 cube([100, sz, sz+1]);
587 translate([-hubeffrad-30,50,0]) Hub();
589 translate([0,50,0]) FilamentCup();
601 //AxleFrictionWasher();