9 function selsz(sm,lt,lg) = fdia < 2 ? sm : lightduty ? lt : lg;
10 function usedove() = selsz(true,false,false);
12 num_arms = selsz(3,4,4);
15 hubeffrad = selsz(30, 40, 40);
16 hubbigrad = selsz(20, 38, 38);
17 hublwidth = selsz(3, 4, 4);
20 hubaxlerad = selsz(5, 28/2, 28/2);
21 totalheightfromtower = 240;
22 axletowerfudgebend = 0;
23 axleaxlefudgebend = 3;
28 prongthick=selsz(5,5,5);
29 prongwidth=selsz(5,5,5);
31 prongribheight=selsz(0,4,4);
35 ratchettoothsmoothr=1;
36 ratchettoothslope=0.75;
38 cupwidth=selsz(40,50,50);
39 cupheight=selsz(55,55,55);
41 cupstrong_dx=selsz(0,-10,-10);
52 stalklength=selsz(35,55,55);
57 overclipcupnextgap=selsz(20,20,20);
59 hubaxlelen = selsz(25, 87.5, 87.5);
69 armendwallthick=selsz(2.5, 2.5, 2.5);
70 armendbasethick=selsz(1.2, 1.2, 1.2);
72 axlehorizoffset = 12.5;
82 washerthinthick = 0.8;
83 washerverythinthick = 0.4;
84 washerrad = hubaxlerad + 7.5;
85 frictionwasherarmwidth = 3;
86 frictionwasherextrapush = 1.0;
88 ratchetpawl=ratchetstep-ratchettooth-bigslop*2;
90 nondove_armhole_x = 32;
91 nondove_armhole_hole = 4 + 0.8;
92 nondove_armhole_support = 7;
93 nondove_armhole_wall = 3.2;
94 nondove_armhole_slop = 0.5;
95 nondove_armhole_slop_x = 0.5;
97 nondove_armbase = nondove_armhole_x + nondove_armhole_hole/2 +
98 nondove_armhole_support;
99 echo(nondove_armbase);
101 include <doveclip.scad>
102 include <cliphook.scad>
103 include <filamentteeth.scad>
104 include <axlepin.scad>
106 channelwidth = prongthick + slop;
107 channeldepth = prongwidth + ratchettoothheight;
108 totalwidth = armendwallthick*2 + channelwidth;
109 totalheight = channeldepth + armendbasethick;
110 stalkwidth = prongwidth + prongstalkxwidth;
112 module ArmEnd(length=armend_length){ ////toplevel
114 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
116 DoveClipPairBase(h=doveclipheight);
120 translate([1, -armendwallthick, -armendbasethick])
122 cube([nondove_armbase+1, totalwidth, totalheight]);
123 translate([-nondove_armbase + nondove_armhole_x,
124 -armendwallthick + totalwidth/2,
125 -armendbasethick -1])
126 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
131 translate([0, -armendwallthick, -armendbasethick])
132 cube([length, totalwidth, totalheight]);
133 translate([-1, 0, 0])
134 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
135 translate([-1, 0, ratchettoothheight])
136 cube([length+2, channelwidth, channeldepth+1]);
138 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
139 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
141 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
142 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
146 cube([ratchettooth - ratchettoothsmoothr*2,
147 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
152 module FilamentCupHandle(){
153 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
155 cube([stalklength, stalkwidth, prongthick]);
156 translate([stalklength, stalkwidth/2, 0])
157 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
158 translate([ratchettoothsmoothr, stalkwidth, 0]) {
160 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
161 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
166 ratchettoothheight - ratchettoothsmoothr,
173 module FilamentCupCup(){
174 for (my=[0,1]) mirror([0,my,0]) {
175 translate([0, cupwidth/2, 0])
176 cube([cupheight + prongwidth, prongwidth, prongthick]);
180 module FilamentCup() { ////toplevel
184 dy = cupwidth/2 + gapy + overclipcupgap;
185 baselen = dy+cupwidth/2;
187 translate([0, dy, 0])
189 cube([prongwidth, baselen+1, prongthick]);
191 translate([cupstrong_dx, prongwidth, 0]) {
192 cube([prongwidth, baselen-prongwidth, prongthick]);
193 for (y = [0, .33, .67, 1])
194 translate([0, (baselen - prongwidth) * y, 0])
195 cube([-cupstrong_dx + 1, prongwidth, prongthick]);
197 if (cupstrong_dx != 0) {
199 translate([-prongwidth*.55, -prongwidth*2.1, 0])
200 cube([prongwidth*(2.65), prongwidth*4.2, prongthick]);
203 translate([0, -0.2, 0])
204 cube([prongribwidth, baselen, prongthick + prongribheight]);
206 if (prongribheight > 0) {
207 translate([-prongwidth, baselen, 0])
208 cube([cupheight/2, prongwidth + prongribheight, prongribwidth]);
211 midrad = cupwidth/2 + prongwidth/2;
213 propshift = stalklength - overclipdepth - prongthick + propxshift;
214 proptaken = propshift;
215 echo(midrad, propshift, proptaken);
217 translate([propshift, -1, 0]) {
218 // something is wrong with the y calculation
223 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
224 translate([cupstrong_dx, y + prongwidth, 0])
225 rotate([0,0, 102 + fdia])
226 FilamentTeeth(fdia=fdia, h=teethh);
228 for (x = [-0.3, -1.3]) {
229 translate([cupheight + overclipcupnextgap*x, baselen + prongwidth, 0])
230 rotate([0,0, 12 + fdia])
231 FilamentTeeth(fdia=fdia, h=teethh);
235 module CupSecuringClipSolid(w,d,h1,h2){
236 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
237 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
241 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
242 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
244 CupSecuringClipSolid(w=totalwidth,
245 d=overclipdepth + xdepth,
246 h1=hbase - overclipsmaller,
247 h2=hbase + overclipbigger);
248 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
252 module CupSecuringClip(){ ////toplevel
253 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
256 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
257 translate([-wingswidth/2, -wingsize/2, 0])
258 cube([wingswidth, wingsize, wingthick]);
259 translate([-wingsize/2, -wingswidth/2, 0])
260 cube([wingsize, wingswidth, wingthick]);
262 translate([0,0,-0.1])
263 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
267 module ArmDoveClipPin(){ ////toplevel
268 DoveClipPin(h=doveclipheight);
271 module TowerDoveClipPin(){ ////toplevel
272 DoveClipPin(h=towercliph/2);
275 module Hub(){ ////toplevel
276 axlerad = hubaxlerad + slop;
277 xmin = axlerad+hublwidth/2;
278 xmax = hubbigrad-hublwidth/2;
279 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
280 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
281 nondove_allwidth = nondove_armhole_wall*2 + totalwidth;
285 cylinder($fn=60, h=hublthick, r=hubbigrad);
287 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
289 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
290 for (ang=[0 : 360/num_arms : 359])
294 translate([hubeffrad,0,0])
295 DoveClipPairSane(h=doveclipheight,
296 baseextend = (hubeffrad - DoveClip_depth()
297 - hubbigrad + hublwidth));
298 if (hole>hublwidth && holewidth > 2) {
299 translate([hubbigrad + hublwidth, -holewidth/2, -1])
300 cube([hole, holewidth, hublthick+2]);
308 cube([hubeffrad + nondove_armhole_x
309 + nondove_armhole_hole/2 + nondove_armhole_support,
311 nondove_armhole_wall + totalheight]);
312 translate([hubeffrad - nondove_armhole_slop_x,
314 + nondove_armhole_wall - nondove_armhole_slop,
315 nondove_armhole_wall])
316 cube([nondove_armhole_x + 50,
317 totalwidth + nondove_armhole_slop*2,
319 translate([hubeffrad + nondove_armhole_x, 0, -20])
320 cylinder(r= nondove_armhole_hole/2, h=50, $fn=10);
324 for (ang = [0 : 180/num_arms : 359])
325 rotate([0,0,ang]) rotate([90,0,0]) {
326 translate([0,0,-hublwidth/2])
327 linear_extrude(height=hublwidth)
328 polygon([[xmin,0.05], [xmax,0.05],
329 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
332 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
336 module ArmExtender(){ ////toplevel
337 DoveClipExtender(length=exteffrad-hubeffrad,
342 module FsAxlePin(){ ////toplevel
343 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
346 module Axle(){ ////toplevel
347 pillarswidth = DoveClipPairSane_width(towerclipcount);
349 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
350 translate([-axlehorizoffset, -axlevertheight, 0]) {
351 rotate([0,0,-axletowerfudgebend])
353 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
354 translate([0, DoveClip_depth(), 0])
356 ExtenderPillars(axlevertheight - DoveClip_depth(),
357 pillarswidth, towercliph,
358 pillarw=towerpillarw);
361 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
362 axlerad = hubaxlerad-slop;
363 bump = axlerad * 0.2;
364 shift = axlerad-bump;
368 translate([0, 0, shift]) {
371 translate([-1, 0, 0])
375 h = 1 + axleclearlen + axlepinrad*2 + 2);
376 mirror([1,0,0]) rotate([0,90,0])
377 cylinder(r = axlerad*1.75, h = 3);
380 translate([axlehorizoffset - pillarswidth/2, 0, 0])
383 r = towercliph - shift,
385 translate([-50, -joinbelowallow, -50])
386 cube([100, joinbelowallow+50, 100]);
390 translate([axleclearlen + axlepinrad/2, 0, -25])
391 cylinder(r = axlepinrad + slop, h=50);
394 translate([-50,-50,0]) cube([100,100,100]);
398 module washer(thick){
399 Washer(hubaxlerad, washerrad, thick, slop);
402 module AxleWasher(){ ////toplevel
403 washer(thick=washerthick);
406 module AxleThinWasher(){ ////toplevel
407 washer(thick=washerthinthick);
410 module AxleVeryThinWasher(){ ////toplevel
411 washer(thick=washerverythinthick);
414 module AxleFrictionWasher(){ ////toplevel
416 cylinder(h=washerthick, r=washerrad);
417 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
420 frarmw = frictionwasherarmwidth;
421 frarmpawlr = hublwidth;
422 frarmpawlpush = slop*4 + frictionwasherextrapush;
423 for (ang=[0,180]) rotate([0,0,ang]) {
424 translate([washerrad-1, -frarmw/2, 0])
425 cube([frarmr - washerrad + 1, frarmw, washerthick]);
427 translate([frarmr - frarmpawlr, -50, 0])
428 cube([frarmpawlr, 100, 50]);
430 cylinder(h = 50, r = frarmpawlpush, $fn=36);
435 module TowerExtender(){ ////toplevel
436 l = totalheightfromtower - axlevertheight;
437 echo("TowerExtender",l);
438 DoveClipExtender(length = l,
439 ha = towercliph, hb = towercliph,
440 counta = towerclipcount, countb = towerclipcount,
441 pillarw = towerpillarw);
444 module FilamentCupPair(){ ////toplevel
446 translate([cupheight + prongthick*3,
449 rotate([0,0,180]) FilamentCup();
453 translate([-hubeffrad-30,50,0]) Hub();
455 translate([0,50,0]) FilamentCup();
467 //AxleFrictionWasher();