8 function selsz(sm,lg) = fdia < 2 ? sm : lg;
9 function usedove() = selsz(true,false);
11 num_arms = selsz(3,4);
14 hubeffrad = selsz(30, 50);
15 hubbigrad = selsz(20, 45);
16 hublwidth = selsz(3, 5);
19 hubaxlerad = selsz(5, 17/2);
20 totalheightfromtower = 240;
21 axletowerfudgebend = 0;
22 axleaxlefudgebend = 3;
25 prongthick=selsz(5,7);
26 prongwidth=selsz(5,7);
30 ratchettoothsmoothr=1;
31 ratchettoothslope=0.75;
33 cupwidth=selsz(40,60);
34 cupheight=selsz(55,75);
45 stalklength=selsz(35,55);
50 overclipcupnextgap=20;
52 hubaxlelen = selsz(25, cupwidth);
64 axlehorizoffset = 12.5;
74 washerthinthick = 0.8;
75 washerverythinthick = 0.4;
76 washerrad = hubaxlerad + 7.5;
77 frictionwasherarmwidth = 3;
78 frictionwasherextrapush = 1.0;
80 ratchetpawl=ratchetstep-ratchettooth-bigslop*2;
82 nondove_armbase = 100;
83 nondove_armhole_x = 60;
84 nondove_armhole_hole = 4;
85 nondove_armhole_support = 7;
86 nondove_armhole_wall = 4;
87 nondove_armhole_slop = 0.5;
88 nondove_armhole_slop_x = 0.5;
90 include <doveclip.scad>
91 include <cliphook.scad>
92 include <filamentteeth.scad>
93 include <axlepin.scad>
95 channelwidth = prongthick + slop;
96 channeldepth = prongwidth + ratchettoothheight;
97 totalwidth = armendwallthick*2 + channelwidth;
98 totalheight = channeldepth + armendbasethick;
99 stalkwidth = prongwidth + prongstalkxwidth;
101 module ArmEnd(length=120){ ////toplevel
103 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
105 DoveClipPairBase(h=doveclipheight);
109 translate([1, -armendwallthick, -armendbasethick])
111 cube([nondove_armbase+1, totalwidth, totalheight]);
112 translate([-nondove_armbase + nondove_armhole_x,
113 -armendwallthick + totalwidth/2,
114 -armendbasethick -1])
115 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
120 translate([0, -armendwallthick, -armendbasethick])
121 cube([length, totalwidth, totalheight]);
122 translate([-1, 0, 0])
123 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
124 translate([-1, 0, ratchettoothheight])
125 cube([length+2, channelwidth, channeldepth+1]);
127 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
128 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
130 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
131 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
135 cube([ratchettooth - ratchettoothsmoothr*2,
136 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
141 module FilamentCupHandle(){
142 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
144 cube([stalklength, stalkwidth, prongthick]);
145 translate([stalklength, stalkwidth/2, 0])
146 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
147 translate([ratchettoothsmoothr, stalkwidth, 0]) {
149 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
150 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
155 ratchettoothheight - ratchettoothsmoothr,
162 module FilamentCupCup(){
163 for (my=[0,1]) mirror([0,my,0]) {
164 translate([0,cupwidth/2,0])
165 cube([cupheight + prongwidth, prongwidth, prongthick]);
169 module FilamentCup() { ////toplevel
173 dy = cupwidth/2 + gapy + overclipcupgap;
174 baselen = dy+cupwidth/2;
176 translate([0, dy, 0])
178 cube([prongwidth, baselen+1, prongthick]);
180 midrad = cupwidth/2 + prongwidth/2;
182 propshift = stalklength - overclipdepth - prongthick + propxshift;
183 proptaken = propshift;
184 echo(midrad, propshift, proptaken);
186 translate([propshift, -1, 0]) {
187 // something is wrong with the y calculation
192 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
194 rotate([0,0, 102 + fdia])
195 FilamentTeeth(fdia=fdia, h=teethh);
197 for (x = [-0.3, -1.3]) {
198 translate([cupheight + overclipcupnextgap*x, baselen + prongthick, 0])
199 rotate([0,0, 12 + fdia])
200 FilamentTeeth(fdia=fdia, h=teethh);
204 module CupSecuringClipSolid(w,d,h1,h2){
205 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
206 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
210 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
211 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
213 CupSecuringClipSolid(w=totalwidth,
214 d=overclipdepth + xdepth,
215 h1=hbase - overclipsmaller,
216 h2=hbase + overclipbigger);
217 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
221 module CupSecuringClip(){ ////toplevel
222 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
225 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
226 translate([-wingswidth/2, -wingsize/2, 0])
227 cube([wingswidth, wingsize, wingthick]);
228 translate([-wingsize/2, -wingswidth/2, 0])
229 cube([wingsize, wingswidth, wingthick]);
231 translate([0,0,-0.1])
232 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
236 module ArmDoveClipPin(){ ////toplevel
237 DoveClipPin(h=doveclipheight);
240 module TowerDoveClipPin(){ ////toplevel
241 DoveClipPin(h=towercliph/2);
244 module Hub(){ ////toplevel
245 axlerad = hubaxlerad + slop;
246 xmin = axlerad+hublwidth/2;
247 xmax = hubbigrad-hublwidth/2;
248 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
249 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
250 nondove_allwidth = nondove_armhole_wall*2 + totalwidth;
254 cylinder($fn=60, h=hublthick, r=hubbigrad);
256 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
258 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
259 for (ang=[0 : 360/num_arms : 359])
263 translate([hubeffrad,0,0])
264 DoveClipPairSane(h=doveclipheight,
265 baseextend = (hubeffrad - DoveClip_depth()
266 - hubbigrad + hublwidth));
267 if (hole>hublwidth && holewidth > 2) {
268 translate([hubbigrad + hublwidth, -holewidth/2, -1])
269 cube([hole, holewidth, hublthick+2]);
276 cube([hubeffrad + nondove_armhole_x
277 + nondove_armhole_hole/2 + nondove_armhole_support,
279 nondove_armhole_wall + totalheight]);
280 translate([hubeffrad - nondove_armhole_slop_x,
282 + nondove_armhole_wall - nondove_armhole_slop,
283 nondove_armhole_wall])
284 cube([nondove_armhole_x + 50,
285 totalwidth + nondove_armhole_slop*2,
287 translate([hubeffrad + nondove_armhole_x, 0, -20])
288 cylinder(r= nondove_armhole_hole/2, h=50, $fn=10);
293 for (ang = [0 : 180/num_arms : 359])
294 rotate([0,0,ang]) rotate([90,0,0]) {
295 translate([0,0,-hublwidth/2])
296 linear_extrude(height=hublwidth)
297 polygon([[xmin,0.05], [xmax,0.05],
298 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
301 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
305 module ArmExtender(){ ////toplevel
306 DoveClipExtender(length=exteffrad-hubeffrad,
311 module FsAxlePin(){ ////toplevel
312 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
315 module Axle(){ ////toplevel
316 pillarswidth = DoveClipPairSane_width(towerclipcount);
318 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
319 translate([-axlehorizoffset, -axlevertheight, 0]) {
320 rotate([0,0,-axletowerfudgebend])
322 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
323 translate([0, DoveClip_depth(), 0])
325 ExtenderPillars(axlevertheight - DoveClip_depth(),
326 pillarswidth, towercliph,
327 pillarw=towerpillarw);
330 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
331 axlerad = hubaxlerad-slop;
332 bump = axlerad * 0.2;
333 shift = axlerad-bump;
337 translate([0, 0, shift]) {
340 translate([-1, 0, 0])
344 h = 1 + axleclearlen + axlepinrad*2 + 2);
345 mirror([1,0,0]) rotate([0,90,0])
346 cylinder(r = axlerad*1.75, h = 3);
349 translate([axlehorizoffset - pillarswidth/2, 0, 0])
352 r = towercliph - shift,
354 translate([-50, -joinbelowallow, -50])
355 cube([100, joinbelowallow+50, 100]);
359 translate([axleclearlen + axlepinrad/2, 0, -25])
360 cylinder(r = axlepinrad + slop, h=50);
363 translate([-50,-50,0]) cube([100,100,100]);
367 module washer(thick){
368 Washer(hubaxlerad, washerrad, thick, slop);
371 module AxleWasher(){ ////toplevel
372 washer(thick=washerthick);
375 module AxleThinWasher(){ ////toplevel
376 washer(thick=washerthinthick);
379 module AxleVeryThinWasher(){ ////toplevel
380 washer(thick=washerverythinthick);
383 module AxleFrictionWasher(){ ////toplevel
385 cylinder(h=washerthick, r=washerrad);
386 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
389 frarmw = frictionwasherarmwidth;
390 frarmpawlr = hublwidth;
391 frarmpawlpush = slop*4 + frictionwasherextrapush;
392 for (ang=[0,180]) rotate([0,0,ang]) {
393 translate([washerrad-1, -frarmw/2, 0])
394 cube([frarmr - washerrad + 1, frarmw, washerthick]);
396 translate([frarmr - frarmpawlr, -50, 0])
397 cube([frarmpawlr, 100, 50]);
399 cylinder(h = 50, r = frarmpawlpush, $fn=36);
404 module TowerExtender(){ ////toplevel
405 l = totalheightfromtower - axlevertheight;
406 echo("TowerExtender",l);
407 DoveClipExtender(length = l,
408 ha = towercliph, hb = towercliph,
409 counta = towerclipcount, countb = towerclipcount,
410 pillarw = towerpillarw);
413 module FilamentCupPair(){ ////toplevel
415 translate([cupheight + prongthick*3,
418 rotate([0,0,180]) FilamentCup();
430 //AxleFrictionWasher();