8 function selsz(sm,lg) = fdia < 2 ? sm : lg;
9 function usedove() = selsz(true,false);
19 totalheightfromtower = 240;
20 axletowerfudgebend = 0;
21 axleaxlefudgebend = 3;
24 prongthick=selsz(5,7);
25 prongwidth=selsz(5,7);
29 ratchettoothsmoothr=1;
30 ratchettoothslope=0.75;
32 cupwidth=selsz(40,60);
33 cupheight=selsz(55,75);
44 stalklength=selsz(35,55);
49 overclipcupnextgap=20;
61 axlehorizoffset = 12.5;
71 washerthinthick = 0.8;
72 washerverythinthick = 0.4;
73 washerrad = hubaxlerad + 7.5;
74 frictionwasherarmwidth = 3;
75 frictionwasherextrapush = 1.0;
77 ratchetpawl=ratchetstep-ratchettooth-bigslop*2;
79 nondove_armbase = 100;
80 nondove_armhole_x = 60;
81 nondove_armhole_hole = 4;
83 include <doveclip.scad>
84 include <cliphook.scad>
85 include <filamentteeth.scad>
86 include <axlepin.scad>
88 channelwidth = prongthick + slop;
89 channeldepth = prongwidth + ratchettoothheight;
90 totalwidth = armendwallthick*2 + channelwidth;
91 totalheight = channeldepth + armendbasethick;
92 stalkwidth = prongwidth + prongstalkxwidth;
94 module ArmEnd(length=120){ ////toplevel
96 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
98 DoveClipPairBase(h=doveclipheight);
102 translate([1, -armendwallthick, -armendbasethick])
104 cube([nondove_armbase+1, totalwidth, totalheight]);
105 translate([-nondove_armbase + nondove_armhole_x,
106 -armendwallthick + totalwidth/2,
107 -armendbasethick -1])
108 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
113 translate([0, -armendwallthick, -armendbasethick])
114 cube([length, totalwidth, totalheight]);
115 translate([-1, 0, 0])
116 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
117 translate([-1, 0, ratchettoothheight])
118 cube([length+2, channelwidth, channeldepth+1]);
120 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
121 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
123 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
124 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
128 cube([ratchettooth - ratchettoothsmoothr*2,
129 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
134 module FilamentCupHandle(){
135 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
137 cube([stalklength, stalkwidth, prongthick]);
138 translate([stalklength, stalkwidth/2, 0])
139 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
140 translate([ratchettoothsmoothr, stalkwidth, 0]) {
142 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
143 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
148 ratchettoothheight - ratchettoothsmoothr,
155 module FilamentCupCup(){
156 for (my=[0,1]) mirror([0,my,0]) {
157 translate([0,cupwidth/2,0])
158 cube([cupheight + prongwidth, prongwidth, prongthick]);
162 module FilamentCup() { ////toplevel
166 dy = cupwidth/2 + gapy + overclipcupgap;
168 translate([0, dy, 0])
170 translate([0, -1, 0]);
171 cube([prongwidth, dy+1+cupwidth/2, prongthick]);
173 midrad = cupwidth/2 + prongwidth/2;
175 propshift = stalklength - overclipdepth - prongthick + propxshift;
176 proptaken = propshift;
177 echo(midrad, propshift, proptaken);
179 translate([propshift, -1, 0]) {
180 // something is wrong with the y calculation
185 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
187 rotate([0,0, 102 + fdia])
188 FilamentTeeth(fdia=fdia, h=teethh);
190 for (x = [-0.3, -1.3]) {
191 translate([cupheight + overclipcupnextgap*x, dy+cupwidth/2 + prongthick, 0])
192 rotate([0,0, 12 + fdia])
193 FilamentTeeth(fdia=fdia, h=teethh);
197 module CupSecuringClipSolid(w,d,h1,h2){
198 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
199 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
203 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
204 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
206 CupSecuringClipSolid(w=totalwidth,
207 d=overclipdepth + xdepth,
208 h1=hbase - overclipsmaller,
209 h2=hbase + overclipbigger);
210 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
214 module CupSecuringClip(){ ////toplevel
215 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
218 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
219 translate([-wingswidth/2, -wingsize/2, 0])
220 cube([wingswidth, wingsize, wingthick]);
221 translate([-wingsize/2, -wingswidth/2, 0])
222 cube([wingsize, wingswidth, wingthick]);
224 translate([0,0,-0.1])
225 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
229 module ArmDoveClipPin(){ ////toplevel
230 DoveClipPin(h=doveclipheight);
233 module TowerDoveClipPin(){ ////toplevel
234 DoveClipPin(h=towercliph/2);
237 module Hub(){ ////toplevel
239 cylinder($fn=60, h=hublthick, r=hubbigrad);
241 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
243 axlerad = hubaxlerad + slop;
245 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
246 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
248 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
249 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
250 for (ang=[0,120,240])
253 translate([hubeffrad,0,0])
254 DoveClipPairSane(h=doveclipheight,
255 baseextend = (hubeffrad - DoveClip_depth()
256 - hubbigrad + hublwidth));
257 if (hole>hublwidth && holewidth > 2) {
258 translate([hubbigrad + hublwidth, -holewidth/2, -1])
259 cube([hole, holewidth, hublthick+2]);
263 xmin = axlerad+hublwidth/2;
264 xmax = hubbigrad-hublwidth/2;
265 for (ang = [0 : 60 : 359])
266 rotate([0,0,ang]) rotate([90,0,0]) {
267 translate([0,0,-hublwidth/2])
268 linear_extrude(height=hublwidth)
269 polygon([[xmin,0.05], [xmax,0.05],
270 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
274 module ArmExtender(){ ////toplevel
275 DoveClipExtender(length=exteffrad-hubeffrad,
280 module FsAxlePin(){ ////toplevel
281 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
284 module Axle(){ ////toplevel
285 pillarswidth = DoveClipPairSane_width(towerclipcount);
287 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
288 translate([-axlehorizoffset, -axlevertheight, 0]) {
289 rotate([0,0,-axletowerfudgebend])
291 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
292 translate([0, DoveClip_depth(), 0])
294 ExtenderPillars(axlevertheight - DoveClip_depth(),
295 pillarswidth, towercliph,
296 pillarw=towerpillarw);
299 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
300 axlerad = hubaxlerad-slop;
301 bump = axlerad * 0.2;
302 shift = axlerad-bump;
306 translate([0, 0, shift]) {
309 translate([-1, 0, 0])
313 h = 1 + axleclearlen + axlepinrad*2 + 2);
314 mirror([1,0,0]) rotate([0,90,0])
315 cylinder(r = axlerad*1.75, h = 3);
318 translate([axlehorizoffset - pillarswidth/2, 0, 0])
321 r = towercliph - shift,
323 translate([-50, -joinbelowallow, -50])
324 cube([100, joinbelowallow+50, 100]);
328 translate([axleclearlen + axlepinrad/2, 0, -25])
329 cylinder(r = axlepinrad + slop, h=50);
332 translate([-50,-50,0]) cube([100,100,100]);
336 module washer(thick){
337 Washer(hubaxlerad, washerrad, thick, slop);
340 module AxleWasher(){ ////toplevel
341 washer(thick=washerthick);
344 module AxleThinWasher(){ ////toplevel
345 washer(thick=washerthinthick);
348 module AxleVeryThinWasher(){ ////toplevel
349 washer(thick=washerverythinthick);
352 module AxleFrictionWasher(){ ////toplevel
354 cylinder(h=washerthick, r=washerrad);
355 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
358 frarmw = frictionwasherarmwidth;
359 frarmpawlr = hublwidth;
360 frarmpawlpush = slop*4 + frictionwasherextrapush;
361 for (ang=[0,180]) rotate([0,0,ang]) {
362 translate([washerrad-1, -frarmw/2, 0])
363 cube([frarmr - washerrad + 1, frarmw, washerthick]);
365 translate([frarmr - frarmpawlr, -50, 0])
366 cube([frarmpawlr, 100, 50]);
368 cylinder(h = 50, r = frarmpawlpush, $fn=36);
373 module TowerExtender(){ ////toplevel
374 l = totalheightfromtower - axlevertheight;
375 echo("TowerExtender",l);
376 DoveClipExtender(length = l,
377 ha = towercliph, hb = towercliph,
378 counta = towerclipcount, countb = towerclipcount,
379 pillarw = towerpillarw);
382 module FilamentCupPair(){ ////toplevel
384 translate([cupheight + prongthick*3,
387 rotate([0,0,180]) FilamentCup();
399 //AxleFrictionWasher();