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;
84 include <doveclip.scad>
85 include <cliphook.scad>
86 include <filamentteeth.scad>
87 include <axlepin.scad>
89 channelwidth = prongthick + slop;
90 channeldepth = prongwidth + ratchettoothheight;
91 totalwidth = armendwallthick*2 + channelwidth;
92 totalheight = channeldepth + armendbasethick;
93 stalkwidth = prongwidth + prongstalkxwidth;
95 module ArmEnd(length=120){ ////toplevel
97 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
99 DoveClipPairBase(h=doveclipheight);
103 translate([1, -armendwallthick, -armendbasethick])
105 cube([nondove_armbase+1, totalwidth, totalheight]);
106 translate([-nondove_armbase + nondove_armhole_x,
107 -armendwallthick + totalwidth/2,
108 -armendbasethick -1])
109 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
114 translate([0, -armendwallthick, -armendbasethick])
115 cube([length, totalwidth, totalheight]);
116 translate([-1, 0, 0])
117 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
118 translate([-1, 0, ratchettoothheight])
119 cube([length+2, channelwidth, channeldepth+1]);
121 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
122 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
124 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
125 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
129 cube([ratchettooth - ratchettoothsmoothr*2,
130 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
135 module FilamentCupHandle(){
136 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
138 cube([stalklength, stalkwidth, prongthick]);
139 translate([stalklength, stalkwidth/2, 0])
140 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
141 translate([ratchettoothsmoothr, stalkwidth, 0]) {
143 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
144 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
149 ratchettoothheight - ratchettoothsmoothr,
156 module FilamentCupCup(){
157 for (my=[0,1]) mirror([0,my,0]) {
158 translate([0,cupwidth/2,0])
159 cube([cupheight + prongwidth, prongwidth, prongthick]);
163 module FilamentCup() { ////toplevel
167 dy = cupwidth/2 + gapy + overclipcupgap;
169 translate([0, dy, 0])
171 translate([0, -1, 0]);
172 cube([prongwidth, dy+1+cupwidth/2, prongthick]);
174 midrad = cupwidth/2 + prongwidth/2;
176 propshift = stalklength - overclipdepth - prongthick + propxshift;
177 proptaken = propshift;
178 echo(midrad, propshift, proptaken);
180 translate([propshift, -1, 0]) {
181 // something is wrong with the y calculation
186 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
188 rotate([0,0, 102 + fdia])
189 FilamentTeeth(fdia=fdia, h=teethh);
191 for (x = [-0.3, -1.3]) {
192 translate([cupheight + overclipcupnextgap*x, dy+cupwidth/2 + prongthick, 0])
193 rotate([0,0, 12 + fdia])
194 FilamentTeeth(fdia=fdia, h=teethh);
198 module CupSecuringClipSolid(w,d,h1,h2){
199 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
200 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
204 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
205 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
207 CupSecuringClipSolid(w=totalwidth,
208 d=overclipdepth + xdepth,
209 h1=hbase - overclipsmaller,
210 h2=hbase + overclipbigger);
211 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
215 module CupSecuringClip(){ ////toplevel
216 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
219 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
220 translate([-wingswidth/2, -wingsize/2, 0])
221 cube([wingswidth, wingsize, wingthick]);
222 translate([-wingsize/2, -wingswidth/2, 0])
223 cube([wingsize, wingswidth, wingthick]);
225 translate([0,0,-0.1])
226 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
230 module ArmDoveClipPin(){ ////toplevel
231 DoveClipPin(h=doveclipheight);
234 module TowerDoveClipPin(){ ////toplevel
235 DoveClipPin(h=towercliph/2);
238 module Hub(){ ////toplevel
240 cylinder($fn=60, h=hublthick, r=hubbigrad);
242 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
244 axlerad = hubaxlerad + slop;
246 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
247 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
249 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
250 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
251 for (ang=[0,120,240])
254 translate([hubeffrad,0,0])
255 DoveClipPairSane(h=doveclipheight,
256 baseextend = (hubeffrad - DoveClip_depth()
257 - hubbigrad + hublwidth));
258 if (hole>hublwidth && holewidth > 2) {
259 translate([hubbigrad + hublwidth, -holewidth/2, -1])
260 cube([hole, holewidth, hublthick+2]);
264 xmin = axlerad+hublwidth/2;
265 xmax = hubbigrad-hublwidth/2;
266 for (ang = [0 : 60 : 359])
267 rotate([0,0,ang]) rotate([90,0,0]) {
268 translate([0,0,-hublwidth/2])
269 linear_extrude(height=hublwidth)
270 polygon([[xmin,0.05], [xmax,0.05],
271 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
275 module ArmExtender(){ ////toplevel
276 DoveClipExtender(length=exteffrad-hubeffrad,
281 module FsAxlePin(){ ////toplevel
282 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
285 module Axle(){ ////toplevel
286 pillarswidth = DoveClipPairSane_width(towerclipcount);
288 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
289 translate([-axlehorizoffset, -axlevertheight, 0]) {
290 rotate([0,0,-axletowerfudgebend])
292 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
293 translate([0, DoveClip_depth(), 0])
295 ExtenderPillars(axlevertheight - DoveClip_depth(),
296 pillarswidth, towercliph,
297 pillarw=towerpillarw);
300 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
301 axlerad = hubaxlerad-slop;
302 bump = axlerad * 0.2;
303 shift = axlerad-bump;
307 translate([0, 0, shift]) {
310 translate([-1, 0, 0])
314 h = 1 + axleclearlen + axlepinrad*2 + 2);
315 mirror([1,0,0]) rotate([0,90,0])
316 cylinder(r = axlerad*1.75, h = 3);
319 translate([axlehorizoffset - pillarswidth/2, 0, 0])
322 r = towercliph - shift,
324 translate([-50, -joinbelowallow, -50])
325 cube([100, joinbelowallow+50, 100]);
329 translate([axleclearlen + axlepinrad/2, 0, -25])
330 cylinder(r = axlepinrad + slop, h=50);
333 translate([-50,-50,0]) cube([100,100,100]);
337 module washer(thick){
338 Washer(hubaxlerad, washerrad, thick, slop);
341 module AxleWasher(){ ////toplevel
342 washer(thick=washerthick);
345 module AxleThinWasher(){ ////toplevel
346 washer(thick=washerthinthick);
349 module AxleVeryThinWasher(){ ////toplevel
350 washer(thick=washerverythinthick);
353 module AxleFrictionWasher(){ ////toplevel
355 cylinder(h=washerthick, r=washerrad);
356 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
359 frarmw = frictionwasherarmwidth;
360 frarmpawlr = hublwidth;
361 frarmpawlpush = slop*4 + frictionwasherextrapush;
362 for (ang=[0,180]) rotate([0,0,ang]) {
363 translate([washerrad-1, -frarmw/2, 0])
364 cube([frarmr - washerrad + 1, frarmw, washerthick]);
366 translate([frarmr - frarmpawlr, -50, 0])
367 cube([frarmpawlr, 100, 50]);
369 cylinder(h = 50, r = frarmpawlpush, $fn=36);
374 module TowerExtender(){ ////toplevel
375 l = totalheightfromtower - axlevertheight;
376 echo("TowerExtender",l);
377 DoveClipExtender(length = l,
378 ha = towercliph, hb = towercliph,
379 counta = towerclipcount, countb = towerclipcount,
380 pillarw = towerpillarw);
383 module FilamentCupPair(){ ////toplevel
385 translate([cupheight + prongthick*3,
388 rotate([0,0,180]) FilamentCup();
400 //AxleFrictionWasher();