8 function selsz(sm,lg) = fdia < 2 ? sm : lg;
9 function usedove() = selsz(true,false);
12 hubeffrad = selsz(30, 60);
13 hubbigrad = selsz(20, 50);
14 hublwidth = selsz(3, 5);
17 hubaxlerad = selsz(5, 17/2);
18 totalheightfromtower = 240;
19 axletowerfudgebend = 0;
20 axleaxlefudgebend = 3;
23 prongthick=selsz(5,7);
24 prongwidth=selsz(5,7);
28 ratchettoothsmoothr=1;
29 ratchettoothslope=0.75;
31 cupwidth=selsz(40,60);
32 cupheight=selsz(55,75);
43 stalklength=selsz(35,55);
48 overclipcupnextgap=20;
50 hubaxlelen = selsz(25, cupwidth);
62 axlehorizoffset = 12.5;
72 washerthinthick = 0.8;
73 washerverythinthick = 0.4;
74 washerrad = hubaxlerad + 7.5;
75 frictionwasherarmwidth = 3;
76 frictionwasherextrapush = 1.0;
78 ratchetpawl=ratchetstep-ratchettooth-bigslop*2;
80 nondove_armbase = 100;
81 nondove_armhole_x = 60;
82 nondove_armhole_hole = 4;
83 nondove_armhole_support = 7;
84 nondove_armhole_wall = 4;
85 nondove_armhole_slop = 0.5;
87 include <doveclip.scad>
88 include <cliphook.scad>
89 include <filamentteeth.scad>
90 include <axlepin.scad>
92 channelwidth = prongthick + slop;
93 channeldepth = prongwidth + ratchettoothheight;
94 totalwidth = armendwallthick*2 + channelwidth;
95 totalheight = channeldepth + armendbasethick;
96 stalkwidth = prongwidth + prongstalkxwidth;
98 module ArmEnd(length=120){ ////toplevel
100 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
102 DoveClipPairBase(h=doveclipheight);
106 translate([1, -armendwallthick, -armendbasethick])
108 cube([nondove_armbase+1, totalwidth, totalheight]);
109 translate([-nondove_armbase + nondove_armhole_x,
110 -armendwallthick + totalwidth/2,
111 -armendbasethick -1])
112 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
117 translate([0, -armendwallthick, -armendbasethick])
118 cube([length, totalwidth, totalheight]);
119 translate([-1, 0, 0])
120 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
121 translate([-1, 0, ratchettoothheight])
122 cube([length+2, channelwidth, channeldepth+1]);
124 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
125 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
127 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
128 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
132 cube([ratchettooth - ratchettoothsmoothr*2,
133 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
138 module FilamentCupHandle(){
139 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
141 cube([stalklength, stalkwidth, prongthick]);
142 translate([stalklength, stalkwidth/2, 0])
143 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
144 translate([ratchettoothsmoothr, stalkwidth, 0]) {
146 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
147 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
152 ratchettoothheight - ratchettoothsmoothr,
159 module FilamentCupCup(){
160 for (my=[0,1]) mirror([0,my,0]) {
161 translate([0,cupwidth/2,0])
162 cube([cupheight + prongwidth, prongwidth, prongthick]);
166 module FilamentCup() { ////toplevel
170 dy = cupwidth/2 + gapy + overclipcupgap;
172 translate([0, dy, 0])
174 translate([0, -1, 0]);
175 cube([prongwidth, dy+1+cupwidth/2, prongthick]);
177 midrad = cupwidth/2 + prongwidth/2;
179 propshift = stalklength - overclipdepth - prongthick + propxshift;
180 proptaken = propshift;
181 echo(midrad, propshift, proptaken);
183 translate([propshift, -1, 0]) {
184 // something is wrong with the y calculation
189 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
191 rotate([0,0, 102 + fdia])
192 FilamentTeeth(fdia=fdia, h=teethh);
194 for (x = [-0.3, -1.3]) {
195 translate([cupheight + overclipcupnextgap*x, dy+cupwidth/2 + prongthick, 0])
196 rotate([0,0, 12 + fdia])
197 FilamentTeeth(fdia=fdia, h=teethh);
201 module CupSecuringClipSolid(w,d,h1,h2){
202 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
203 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
207 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
208 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
210 CupSecuringClipSolid(w=totalwidth,
211 d=overclipdepth + xdepth,
212 h1=hbase - overclipsmaller,
213 h2=hbase + overclipbigger);
214 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
218 module CupSecuringClip(){ ////toplevel
219 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
222 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
223 translate([-wingswidth/2, -wingsize/2, 0])
224 cube([wingswidth, wingsize, wingthick]);
225 translate([-wingsize/2, -wingswidth/2, 0])
226 cube([wingsize, wingswidth, wingthick]);
228 translate([0,0,-0.1])
229 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
233 module ArmDoveClipPin(){ ////toplevel
234 DoveClipPin(h=doveclipheight);
237 module TowerDoveClipPin(){ ////toplevel
238 DoveClipPin(h=towercliph/2);
241 module Hub(){ ////toplevel
242 axlerad = hubaxlerad + slop;
243 xmin = axlerad+hublwidth/2;
244 xmax = hubbigrad-hublwidth/2;
245 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
246 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
247 nondove_allwidth = nondove_armhole_wall*2 + totalwidth;
251 cylinder($fn=60, h=hublthick, r=hubbigrad);
253 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
255 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
256 for (ang=[0,120,240])
260 translate([hubeffrad,0,0])
261 DoveClipPairSane(h=doveclipheight,
262 baseextend = (hubeffrad - DoveClip_depth()
263 - hubbigrad + hublwidth));
264 if (hole>hublwidth && holewidth > 2) {
265 translate([hubbigrad + hublwidth, -holewidth/2, -1])
266 cube([hole, holewidth, hublthick+2]);
273 cube([hubeffrad + nondove_armhole_x
274 + nondove_armhole_hole/2 + nondove_armhole_support,
276 nondove_armhole_wall + totalheight]);
277 translate([hubeffrad,
279 + nondove_armhole_wall - nondove_armhole_slop,
280 nondove_armhole_wall])
281 cube([nondove_armhole_x + 50,
282 totalwidth + nondove_armhole_slop*2,
284 translate([hubeffrad + nondove_armhole_x, 0, -20])
285 cylinder(r= nondove_armhole_hole/2, h=50, $fn=10);
290 for (ang = [0 : 60 : 359])
291 rotate([0,0,ang]) rotate([90,0,0]) {
292 translate([0,0,-hublwidth/2])
293 linear_extrude(height=hublwidth)
294 polygon([[xmin,0.05], [xmax,0.05],
295 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
298 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
302 module ArmExtender(){ ////toplevel
303 DoveClipExtender(length=exteffrad-hubeffrad,
308 module FsAxlePin(){ ////toplevel
309 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
312 module Axle(){ ////toplevel
313 pillarswidth = DoveClipPairSane_width(towerclipcount);
315 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
316 translate([-axlehorizoffset, -axlevertheight, 0]) {
317 rotate([0,0,-axletowerfudgebend])
319 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
320 translate([0, DoveClip_depth(), 0])
322 ExtenderPillars(axlevertheight - DoveClip_depth(),
323 pillarswidth, towercliph,
324 pillarw=towerpillarw);
327 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
328 axlerad = hubaxlerad-slop;
329 bump = axlerad * 0.2;
330 shift = axlerad-bump;
334 translate([0, 0, shift]) {
337 translate([-1, 0, 0])
341 h = 1 + axleclearlen + axlepinrad*2 + 2);
342 mirror([1,0,0]) rotate([0,90,0])
343 cylinder(r = axlerad*1.75, h = 3);
346 translate([axlehorizoffset - pillarswidth/2, 0, 0])
349 r = towercliph - shift,
351 translate([-50, -joinbelowallow, -50])
352 cube([100, joinbelowallow+50, 100]);
356 translate([axleclearlen + axlepinrad/2, 0, -25])
357 cylinder(r = axlepinrad + slop, h=50);
360 translate([-50,-50,0]) cube([100,100,100]);
364 module washer(thick){
365 Washer(hubaxlerad, washerrad, thick, slop);
368 module AxleWasher(){ ////toplevel
369 washer(thick=washerthick);
372 module AxleThinWasher(){ ////toplevel
373 washer(thick=washerthinthick);
376 module AxleVeryThinWasher(){ ////toplevel
377 washer(thick=washerverythinthick);
380 module AxleFrictionWasher(){ ////toplevel
382 cylinder(h=washerthick, r=washerrad);
383 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
386 frarmw = frictionwasherarmwidth;
387 frarmpawlr = hublwidth;
388 frarmpawlpush = slop*4 + frictionwasherextrapush;
389 for (ang=[0,180]) rotate([0,0,ang]) {
390 translate([washerrad-1, -frarmw/2, 0])
391 cube([frarmr - washerrad + 1, frarmw, washerthick]);
393 translate([frarmr - frarmpawlr, -50, 0])
394 cube([frarmpawlr, 100, 50]);
396 cylinder(h = 50, r = frarmpawlpush, $fn=36);
401 module TowerExtender(){ ////toplevel
402 l = totalheightfromtower - axlevertheight;
403 echo("TowerExtender",l);
404 DoveClipExtender(length = l,
405 ha = towercliph, hb = towercliph,
406 counta = towerclipcount, countb = towerclipcount,
407 pillarw = towerpillarw);
410 module FilamentCupPair(){ ////toplevel
412 translate([cupheight + prongthick*3,
415 rotate([0,0,180]) FilamentCup();
427 //AxleFrictionWasher();