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, 60);
15 hubbigrad = selsz(20, 50);
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;
89 include <doveclip.scad>
90 include <cliphook.scad>
91 include <filamentteeth.scad>
92 include <axlepin.scad>
94 channelwidth = prongthick + slop;
95 channeldepth = prongwidth + ratchettoothheight;
96 totalwidth = armendwallthick*2 + channelwidth;
97 totalheight = channeldepth + armendbasethick;
98 stalkwidth = prongwidth + prongstalkxwidth;
100 module ArmEnd(length=120){ ////toplevel
102 translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
104 DoveClipPairBase(h=doveclipheight);
108 translate([1, -armendwallthick, -armendbasethick])
110 cube([nondove_armbase+1, totalwidth, totalheight]);
111 translate([-nondove_armbase + nondove_armhole_x,
112 -armendwallthick + totalwidth/2,
113 -armendbasethick -1])
114 cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
119 translate([0, -armendwallthick, -armendbasethick])
120 cube([length, totalwidth, totalheight]);
121 translate([-1, 0, 0])
122 cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
123 translate([-1, 0, ratchettoothheight])
124 cube([length+2, channelwidth, channeldepth+1]);
126 for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
127 translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
129 cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
130 multmatrix([ [ 1, 0, ratchettoothslope, 0 ],
134 cube([ratchettooth - ratchettoothsmoothr*2,
135 channelwidth, ratchettoothheight - ratchettoothsmoothr]);
140 module FilamentCupHandle(){
141 pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
143 cube([stalklength, stalkwidth, prongthick]);
144 translate([stalklength, stalkwidth/2, 0])
145 cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
146 translate([ratchettoothsmoothr, stalkwidth, 0]) {
148 cylinder($fn=20,r=ratchettoothsmoothr, h=1);
149 multmatrix([ [ 1, -ratchettoothslope, 0, 0 ],
154 ratchettoothheight - ratchettoothsmoothr,
161 module FilamentCupCup(){
162 for (my=[0,1]) mirror([0,my,0]) {
163 translate([0,cupwidth/2,0])
164 cube([cupheight + prongwidth, prongwidth, prongthick]);
168 module FilamentCup() { ////toplevel
172 dy = cupwidth/2 + gapy + overclipcupgap;
174 translate([0, dy, 0])
176 translate([0, -1, 0]);
177 cube([prongwidth, dy+1+cupwidth/2, prongthick]);
179 midrad = cupwidth/2 + prongwidth/2;
181 propshift = stalklength - overclipdepth - prongthick + propxshift;
182 proptaken = propshift;
183 echo(midrad, propshift, proptaken);
185 translate([propshift, -1, 0]) {
186 // something is wrong with the y calculation
191 for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
193 rotate([0,0, 102 + fdia])
194 FilamentTeeth(fdia=fdia, h=teethh);
196 for (x = [-0.3, -1.3]) {
197 translate([cupheight + overclipcupnextgap*x, dy+cupwidth/2 + prongthick, 0])
198 rotate([0,0, 12 + fdia])
199 FilamentTeeth(fdia=fdia, h=teethh);
203 module CupSecuringClipSolid(w,d,h1,h2){
204 rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
205 polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
209 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
210 hbase = totalheight + prongstalkxwidth - overcliproundr*2;
212 CupSecuringClipSolid(w=totalwidth,
213 d=overclipdepth + xdepth,
214 h1=hbase - overclipsmaller,
215 h2=hbase + overclipbigger);
216 cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
220 module CupSecuringClip(){ ////toplevel
221 wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
224 CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
225 translate([-wingswidth/2, -wingsize/2, 0])
226 cube([wingswidth, wingsize, wingthick]);
227 translate([-wingsize/2, -wingswidth/2, 0])
228 cube([wingsize, wingswidth, wingthick]);
230 translate([0,0,-0.1])
231 CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
235 module ArmDoveClipPin(){ ////toplevel
236 DoveClipPin(h=doveclipheight);
239 module TowerDoveClipPin(){ ////toplevel
240 DoveClipPin(h=towercliph/2);
243 module Hub(){ ////toplevel
244 axlerad = hubaxlerad + slop;
245 xmin = axlerad+hublwidth/2;
246 xmax = hubbigrad-hublwidth/2;
247 hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
248 holewidth = DoveClipPairSane_width() - hubstemwidth*2;
249 nondove_allwidth = nondove_armhole_wall*2 + totalwidth;
253 cylinder($fn=60, h=hublthick, r=hubbigrad);
255 cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
257 cylinder(h=hubaxlelen, r=axlerad+hublwidth);
258 for (ang=[0 : 360/num_arms : 359])
262 translate([hubeffrad,0,0])
263 DoveClipPairSane(h=doveclipheight,
264 baseextend = (hubeffrad - DoveClip_depth()
265 - hubbigrad + hublwidth));
266 if (hole>hublwidth && holewidth > 2) {
267 translate([hubbigrad + hublwidth, -holewidth/2, -1])
268 cube([hole, holewidth, hublthick+2]);
275 cube([hubeffrad + nondove_armhole_x
276 + nondove_armhole_hole/2 + nondove_armhole_support,
278 nondove_armhole_wall + totalheight]);
279 translate([hubeffrad,
281 + nondove_armhole_wall - nondove_armhole_slop,
282 nondove_armhole_wall])
283 cube([nondove_armhole_x + 50,
284 totalwidth + nondove_armhole_slop*2,
286 translate([hubeffrad + nondove_armhole_x, 0, -20])
287 cylinder(r= nondove_armhole_hole/2, h=50, $fn=10);
292 for (ang = [0 : 180/num_arms : 359])
293 rotate([0,0,ang]) rotate([90,0,0]) {
294 translate([0,0,-hublwidth/2])
295 linear_extrude(height=hublwidth)
296 polygon([[xmin,0.05], [xmax,0.05],
297 [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
300 translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
304 module ArmExtender(){ ////toplevel
305 DoveClipExtender(length=exteffrad-hubeffrad,
310 module FsAxlePin(){ ////toplevel
311 AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
314 module Axle(){ ////toplevel
315 pillarswidth = DoveClipPairSane_width(towerclipcount);
317 rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
318 translate([-axlehorizoffset, -axlevertheight, 0]) {
319 rotate([0,0,-axletowerfudgebend])
321 DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
322 translate([0, DoveClip_depth(), 0])
324 ExtenderPillars(axlevertheight - DoveClip_depth(),
325 pillarswidth, towercliph,
326 pillarw=towerpillarw);
329 axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
330 axlerad = hubaxlerad-slop;
331 bump = axlerad * 0.2;
332 shift = axlerad-bump;
336 translate([0, 0, shift]) {
339 translate([-1, 0, 0])
343 h = 1 + axleclearlen + axlepinrad*2 + 2);
344 mirror([1,0,0]) rotate([0,90,0])
345 cylinder(r = axlerad*1.75, h = 3);
348 translate([axlehorizoffset - pillarswidth/2, 0, 0])
351 r = towercliph - shift,
353 translate([-50, -joinbelowallow, -50])
354 cube([100, joinbelowallow+50, 100]);
358 translate([axleclearlen + axlepinrad/2, 0, -25])
359 cylinder(r = axlepinrad + slop, h=50);
362 translate([-50,-50,0]) cube([100,100,100]);
366 module washer(thick){
367 Washer(hubaxlerad, washerrad, thick, slop);
370 module AxleWasher(){ ////toplevel
371 washer(thick=washerthick);
374 module AxleThinWasher(){ ////toplevel
375 washer(thick=washerthinthick);
378 module AxleVeryThinWasher(){ ////toplevel
379 washer(thick=washerverythinthick);
382 module AxleFrictionWasher(){ ////toplevel
384 cylinder(h=washerthick, r=washerrad);
385 translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
388 frarmw = frictionwasherarmwidth;
389 frarmpawlr = hublwidth;
390 frarmpawlpush = slop*4 + frictionwasherextrapush;
391 for (ang=[0,180]) rotate([0,0,ang]) {
392 translate([washerrad-1, -frarmw/2, 0])
393 cube([frarmr - washerrad + 1, frarmw, washerthick]);
395 translate([frarmr - frarmpawlr, -50, 0])
396 cube([frarmpawlr, 100, 50]);
398 cylinder(h = 50, r = frarmpawlpush, $fn=36);
403 module TowerExtender(){ ////toplevel
404 l = totalheightfromtower - axlevertheight;
405 echo("TowerExtender",l);
406 DoveClipExtender(length = l,
407 ha = towercliph, hb = towercliph,
408 counta = towerclipcount, countb = towerclipcount,
409 pillarw = towerpillarw);
412 module FilamentCupPair(){ ////toplevel
414 translate([cupheight + prongthick*3,
417 rotate([0,0,180]) FilamentCup();
429 //AxleFrictionWasher();