4 lightduty=false; // or true
10 function selsz(sm,lt,lg) = fdia < 2 ? sm : lightduty ? lt : lg;
11 function usedove() = selsz(true,true,false);
13 num_arms = selsz(3,3,4);
15 channelslop=selsz(slop,0.75,slop);
18 hubeffrad = selsz(30, 82, 40);
19 hubbigrad = selsz(20, 38, 38);
20 hublwidth = selsz(3, 2.5, 4);
23 hubaxlerad = selsz(5, 28/2, 28/2);
24 totalheightfromtower = 240;
25 axletowerfudgebend = 0;
26 axleaxlefudgebend = 3;
31 prongthick=selsz(5,4,5);
32 prongwidth=selsz(5,4,5);
34 prongribheight=selsz(0,0,4);
38 ratchettoothsmoothr=1;
39 ratchettoothslope=0.75;
41 cupwidth=selsz(40,25,50);
42 cupheight=selsz(55,25,55);
44 cupstrong_dx=selsz(0,0,-10);
55 stalklength=selsz(35,25,55);
60 overclipcupnextgap=selsz(20,15,20);
62 hubaxlelen = selsz(25, 62.5, 77.5);
72 armendwallthick=selsz(2.5, 1.8, 2.5);
73 armendbasethick=selsz(1.2, 1.2, 1.2);
75 axlehorizoffset = 12.5;
85 washerthinthick = 0.8;
86 washerverythinthick = 0.4;
87 washerrad = hubaxlerad + 7.5;
88 frictionwasherarmwidth = 3;
89 frictionwasherextrapush = 1.0;
91 ratchetpawl=ratchetstep-ratchettooth-bigslop*2;
93 nondove_armhole_x = 32;
94 nondove_armhole_hole = 4 + 0.8;
95 nondove_armhole_support = 7;
96 nondove_armhole_wall = 3.2;
97 nondove_armhole_slop = 0.5;
98 nondove_armhole_slop_x = 0.5;
100 nondove_armbase = nondove_armhole_x + nondove_armhole_hole/2 +
101 nondove_armhole_support;
102 echo(nondove_armbase);
104 include <doveclip.scad>
105 include <cliphook.scad>
106 include <filamentteeth.scad>
107 include <axlepin.scad>
109 channelwidth = prongthick + channelslop;
110 channeldepth = prongwidth + ratchettoothheight;
111 totalwidth = armendwallthick*2 + channelwidth;
112 totalheight = channeldepth + armendbasethick;
113 stalkwidth = prongwidth + prongstalkxwidth;
115 module ArmEnd(length=armend_length){ ////toplevel
117 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
119 DoveClipPairBase(h=doveclipheight);
123 translate([1, -armendwallthick, -armendbasethick])
125 cube([nondove_armbase+1, totalwidth, totalheight]);
126 translate([-nondove_armbase + nondove_armhole_x,
127 -armendwallthick + totalwidth/2,
128 -armendbasethick -1])
129 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
134 translate([0, -armendwallthick, -armendbasethick])
135 cube([length, totalwidth, totalheight]);
136 translate([-1, 0, 0])
137 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
138 translate([-1, 0, ratchettoothheight])
139 cube([length+2, channelwidth, channeldepth+1]);
141 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
142 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
144 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
145 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
149 cube([ratchettooth - ratchettoothsmoothr*2,
150 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
155 module FilamentCupHandle(){
156 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
158 cube([stalklength, stalkwidth, prongthick]);
159 translate([stalklength, stalkwidth/2, 0])
160 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
161 translate([ratchettoothsmoothr, stalkwidth, 0]) {
163 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
164 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
169 ratchettoothheight - ratchettoothsmoothr,
176 module FilamentCupCup(){
177 for (my=[0,1]) mirror([0,my,0]) {
178 translate([0, cupwidth/2, 0])
179 cube([cupheight + prongwidth, prongwidth, prongthick]);
183 module FilamentCup() { ////toplevel
187 dy = cupwidth/2 + gapy + overclipcupgap;
188 baselen = dy+cupwidth/2;
190 translate([0, dy, 0])
192 cube([prongwidth, baselen+1, prongthick]);
194 translate([cupstrong_dx, prongwidth, 0]) {
195 cube([prongwidth, baselen-prongwidth, prongthick]);
196 for (y = [0, .33, .67, 1])
197 translate([0, (baselen - prongwidth) * y, 0])
198 cube([-cupstrong_dx + 1, prongwidth, prongthick]);
200 if (cupstrong_dx != 0) {
202 translate([-prongwidth*.55, -prongwidth*2.1, 0])
203 cube([prongwidth*(2.65), prongwidth*4.2, prongthick]);
206 translate([0, -0.2, 0])
207 cube([prongribwidth, baselen, prongthick + prongribheight]);
209 if (prongribheight > 0) {
210 translate([-prongwidth, baselen, 0])
211 cube([cupheight/2, prongwidth + prongribheight, prongribwidth]);
214 midrad = cupwidth/2 + prongwidth/2;
216 propshift = stalklength - overclipdepth - prongthick + propxshift;
217 proptaken = propshift;
218 echo(midrad, propshift, proptaken);
220 translate([propshift, -1, 0]) {
221 // something is wrong with the y calculation
226 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
227 translate([cupstrong_dx, y + prongwidth, 0])
228 rotate([0,0, 102 + fdia])
229 FilamentTeeth(fdia=fdia, h=teethh);
231 for (x = [-0.3, -1.3]) {
232 translate([cupheight + overclipcupnextgap*x, baselen + prongwidth, 0])
233 rotate([0,0, 12 + fdia])
234 FilamentTeeth(fdia=fdia, h=teethh);
238 module CupSecuringClipSolid(w,d,h1,h2){
239 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
240 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
244 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
245 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
247 CupSecuringClipSolid(w=totalwidth,
248 d=overclipdepth + xdepth,
249 h1=hbase - overclipsmaller,
250 h2=hbase + overclipbigger);
251 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
255 module CupSecuringClip(){ ////toplevel
256 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
259 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
260 translate([-wingswidth/2, -wingsize/2, 0])
261 cube([wingswidth, wingsize, wingthick]);
262 translate([-wingsize/2, -wingswidth/2, 0])
263 cube([wingsize, wingswidth, wingthick]);
265 translate([0,0,-0.1])
266 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
270 module ArmDoveClipPin(){ ////toplevel
271 DoveClipPin(h=doveclipheight);
274 module TowerDoveClipPin(){ ////toplevel
275 DoveClipPin(h=towercliph/2);
278 module Hub(){ ////toplevel
279 axlerad = hubaxlerad + slop;
280 xmin = axlerad+hublwidth/2;
281 xmax = hubbigrad-hublwidth/2;
282 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
283 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
284 nondove_allwidth = nondove_armhole_wall*2 + totalwidth;
288 cylinder($fn=60, h=hublthick, r=hubbigrad);
290 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
292 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
293 for (ang=[0 : 360/num_arms : 359])
297 translate([hubeffrad,0,0])
298 DoveClipPairSane(h=doveclipheight,
299 baseextend = (hubeffrad - DoveClip_depth()
300 - hubbigrad + hublwidth));
301 if (hole>hublwidth && holewidth > 2) {
302 translate([hubbigrad + hublwidth, -holewidth/2, -1])
303 cube([hole, holewidth, hublthick+2]);
311 cube([hubeffrad + nondove_armhole_x
312 + nondove_armhole_hole/2 + nondove_armhole_support,
314 nondove_armhole_wall + totalheight]);
315 translate([hubeffrad - nondove_armhole_slop_x,
317 + nondove_armhole_wall - nondove_armhole_slop,
318 nondove_armhole_wall])
319 cube([nondove_armhole_x + 50,
320 totalwidth + nondove_armhole_slop*2,
322 translate([hubeffrad + nondove_armhole_x, 0, -20])
323 cylinder(r= nondove_armhole_hole/2, h=50, $fn=10);
327 for (ang = [0 : 180/num_arms : 359])
328 rotate([0,0,ang]) rotate([90,0,0]) {
329 translate([0,0,-hublwidth/2])
330 linear_extrude(height=hublwidth)
331 polygon([[xmin,0.05], [xmax,0.05],
332 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
335 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
339 module ArmExtender(){ ////toplevel
340 DoveClipExtender(length=exteffrad-hubeffrad,
345 module FsAxlePin(){ ////toplevel
346 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
349 module Axle(){ ////toplevel
350 pillarswidth = DoveClipPairSane_width(towerclipcount);
352 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
353 translate([-axlehorizoffset, -axlevertheight, 0]) {
354 rotate([0,0,-axletowerfudgebend])
356 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
357 translate([0, DoveClip_depth(), 0])
359 ExtenderPillars(axlevertheight - DoveClip_depth(),
360 pillarswidth, towercliph,
361 pillarw=towerpillarw);
364 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
365 axlerad = hubaxlerad-slop;
366 bump = axlerad * 0.2;
367 shift = axlerad-bump;
371 translate([0, 0, shift]) {
374 translate([-1, 0, 0])
378 h = 1 + axleclearlen + axlepinrad*2 + 2);
379 mirror([1,0,0]) rotate([0,90,0])
380 cylinder(r = axlerad*1.75, h = 3);
383 translate([axlehorizoffset - pillarswidth/2, 0, 0])
386 r = towercliph - shift,
388 translate([-50, -joinbelowallow, -50])
389 cube([100, joinbelowallow+50, 100]);
393 translate([axleclearlen + axlepinrad/2, 0, -25])
394 cylinder(r = axlepinrad + slop, h=50);
397 translate([-50,-50,0]) cube([100,100,100]);
401 module washer(thick){
402 Washer(hubaxlerad, washerrad, thick, slop);
405 module AxleWasher(){ ////toplevel
406 washer(thick=washerthick);
409 module AxleThinWasher(){ ////toplevel
410 washer(thick=washerthinthick);
413 module AxleVeryThinWasher(){ ////toplevel
414 washer(thick=washerverythinthick);
417 module AxleFrictionWasher(){ ////toplevel
419 cylinder(h=washerthick, r=washerrad);
420 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
423 frarmw = frictionwasherarmwidth;
424 frarmpawlr = hublwidth;
425 frarmpawlpush = slop*4 + frictionwasherextrapush;
426 for (ang=[0,180]) rotate([0,0,ang]) {
427 translate([washerrad-1, -frarmw/2, 0])
428 cube([frarmr - washerrad + 1, frarmw, washerthick]);
430 translate([frarmr - frarmpawlr, -50, 0])
431 cube([frarmpawlr, 100, 50]);
433 cylinder(h = 50, r = frarmpawlpush, $fn=36);
438 module TowerExtender(){ ////toplevel
439 l = totalheightfromtower - axlevertheight;
440 echo("TowerExtender",l);
441 DoveClipExtender(length = l,
442 ha = towercliph, hb = towercliph,
443 counta = towerclipcount, countb = towerclipcount,
444 pillarw = towerpillarw);
447 module FilamentCupPair(){ ////toplevel
449 translate([cupheight + prongthick*3,
452 rotate([0,0,180]) FilamentCup();
455 //----- storarm -----
458 storarm_hookheight = 5;
460 storarm_axleslop = 4;
463 storarm_base_h = 100;
465 storarm_base_mind = 2;
467 storarm_cope_hubaxle_mk1 = true;
469 storarm_screw_hole = 4;
470 storarm_screw_hole_slop = 0.5;
471 storarm_besides_hole = 4;
473 storarm_under_hole = 5;
474 storarm_screw_hole_head = 8.8;
475 storarm_screw_hole_head_slop = 1.5;
479 storarm_axlerad = hubaxlerad - storarm_axleslop;
480 storarm_mainlen = hubaxlelen*2 + storarm_axleslop
481 + (storarm_cope_hubaxle_mk1 ? 10 : 0);
482 storarm_totlen = storarm_mainlen + storarm_hooklen;
484 storarm_mid_off_y = storarm_axlerad;
486 storarm_base_off_y = storarm_mid_off_y + storarm_base_h/2;
488 module StorageArmDiagPartSide(xmin, xmax){
490 yuse = storarm_thick/2;
493 translate([xmin-1, -storarm_axlerad, storarm_thick/2])
495 cylinder(r=storarm_axlerad, h=xsz+2, $fn=60);
496 translate([xmin, -yuse, 0])
497 cube([xsz, yuse, storarm_thick]);
501 module StorageArmDiagPart(xmin, xmax, shear, adjbot){
503 StorageArmDiagPartSide(xmin,xmax);
505 multmatrix([[1,0,0,0],
509 translate([0, -storarm_axlerad*2 + adjbot, 0])
511 StorageArmDiagPartSide(xmin,xmax);
515 module StorageArmBaseTemplate(){
516 square([storarm_base_w, storarm_base_h]);
519 module StorageArmAtMountingHoles(){
520 bes = storarm_besides_hole + storarm_screw_hole;
523 x1 = storarm_base_w-bes;
524 y1 = storarm_base_h - bes;
531 translate([pos[0] - storarm_base_w,
532 pos[1] - storarm_base_off_y, -storarm_base_d])
537 module StorageArmRight(){ ////toplevel
538 shear = storarm_hookheight / (storarm_mainlen/2);
540 StorageArmDiagPart(-1, storarm_mainlen/2+1, shear, 0);
541 StorageArmDiagPart(storarm_mainlen/2-1, storarm_mainlen+1, shear/2,
542 storarm_hookheight/2);
544 translate([0, storarm_hookheight, 0])
545 StorageArmDiagPart(storarm_mainlen, storarm_totlen,
546 shear/2, -storarm_hookheight/2);
551 translate([-storarm_base_d, -storarm_base_off_y, storarm_base_w])
553 linear_extrude(height=storarm_base_mind)
554 StorageArmBaseTemplate();
555 StorageArmDiagPart(-1, 0, shear, 0);
557 StorageArmAtMountingHoles(){
558 cylinder(r= storarm_screw_hole_head/2,
562 StorageArmAtMountingHoles(){
564 cylinder(r= (storarm_screw_hole + storarm_screw_hole_slop)/2 ,
566 translate([0,0,storarm_under_hole])
567 cylinder(r= (storarm_screw_hole_head + storarm_screw_hole_head_slop)/2,
573 module StorageArmLeft(){ ////toplevel
574 mirror([1,0,0]) StorageArmRight();
577 module StorArmHoleTest(){ ////toplevel
578 sz = storarm_screw_hole_head + storarm_besides_hole*2;
581 translate([-50, -storarm_base_off_y, -1])
582 cube([100, sz, sz+1]);
588 translate([-hubeffrad-30,50,0]) Hub();
590 translate([0,50,0]) FilamentCup();
602 //AxleFrictionWasher();