chiark / gitweb /
filamentspool: FilamentGuideClipSpacerClip fix
[reprap-play.git] / filamentspool.scad
1 // -*- C -*-
2
3 // filamentspool.scad
4 // 3D design for filament spools to hold coils as supplied by Faberdashery
5 //
6
7 //
8 // Copyright 2012,2013,2016 Ian Jackson
9 //
10 // This work is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // This work is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this work.  If not, see <http://www.gnu.org/licenses/>
22 //
23
24 //
25 // Each spool is a hub with 3 or 4 arms.  Each arm has a cup for
26 // holding the filament.  The effective diameter can be adjusted by
27 // setting the cup into a different seat in the arm.  The cups are
28 // held on with simple clips, so the filement coil can easily be
29 // removed and replaced.
30 //
31 // This file (and its includes) can generate:
32 //
33 //   - Heavy duty 4-armed spool suitable for holding a 100m
34 //     Faberdashery coil on the spool arm of a Lulzbot TAZ-5.
35 //
36 //     Set
37 //           fdia=2.85
38 //           lightduty=false
39 //     And print following parts
40 //            Hub
41 //            ArmEnd x 4
42 //            FilamentCup x 4  (or FilamentCupPair x 2)
43 //            CupSecuringClip x 4
44 //
45 //     You will also need  4 x M4 machine screws and nuts.
46 //
47 //   - Light duty 3-armed spool suitable for up to around 30m
48 //     of Faberdashery 2.85mm PLA.
49 //
50 //     Set
51 //           fdia=2.85
52 //           lightduty=true
53 //     And print following parts
54 //           Hub
55 //           ArmEnd x 3
56 //           FilamentCup x 3  (or FilamentCup + FilamentCupPair)
57 //           CupSecuringClip x 3
58 //           TowerDoveClipPin x 6
59 //
60 //     When assembling, insert one TowerDoveClipPin from each side,
61 //     joining each ArmEnd to the Hub with two TowerDoveClipPins.
62 //     Modest force with pliers is good to seat them properly.
63 //
64 //     (note that the light duty and heavy duty CupSecuringClips
65 //      are slightly different)
66 //
67 // When mounting either spool on the TAZ-5 spool arm, put the `pointy'
68 // end of the hub towards the printer - ie, put put the spool on
69 // `backwards'.  This ensures that the spool's arms will clear the
70 // printer framework.
71 //
72 // For the above, I generally used the Cura `Standard' PLA profile.
73 //
74 //   - Storage arm suitable for screwing to walls, bookshelves,
75 //     etc. (requires non-countersunk M4 screws); will hold two
76 //     heavy duty spools each with a 100m coil.
77 //
78 //     Set
79 //           fdia=2.85
80 //           lightduty=false
81 //     And print one of these, according to taste
82 //            StorageArmLeft
83 //            StorageArmRight
84 //
85 //     NB that the `light duty' version of this is shorter and
86 //     will only take two `light duty' spools.
87 //
88 // For the above, I used the Cura `High detail' PLA profile because
89 // I wanted it pretty, but the `Standard' profile should do fine.
90 //
91 //   - Spool (in many parts) for handing 1.75mm filament, printable
92 //     on, and with parts for mounting on, a Reprappro Huxley.
93
94
95 fdia=2.85; // or 1.75
96 lightduty=false; // or true
97
98
99 slop=0.5;
100 bigslop=slop*2;
101
102 function selsz(sm,lt,lg) = fdia < 2 ? sm : lightduty ? lt : lg;
103 function usedove() = selsz(true,true,false);
104
105 num_arms = selsz(3,3,4);
106
107 channelslop=selsz(slop,0.75,slop);
108
109 exteffrad = 70;
110 hubeffrad = selsz(30, 82, 40);
111 hubbigrad = selsz(20, 38, 38);
112 hublwidth = selsz(3, 2.5, 4);
113 hubstemwidth = 2;
114 hublthick = 10;
115 hubaxlerad = selsz(5, 28/2, 28/2);
116 totalheightfromtower = 240;
117 axletowerfudgebend = 0;
118 axleaxlefudgebend = 3;
119 axlepadlen = 1.0;
120
121 armend_length = 120;
122
123 prongthick=selsz(5,4,5);
124 prongwidth=selsz(5,4,5);
125 prongribwidth=3;
126 prongribheight=selsz(0,0,4);
127 ratchetstep=15;
128 ratchettooth=3;
129 ratchettoothheight=5;
130 ratchettoothsmoothr=1;
131 ratchettoothslope=0.75;
132 overlap=0.5;
133 cupwidth=selsz(40,25,50);
134 cupheight=selsz(55,25,55);
135
136 cupstrong_dx=selsz(0,0,-10);
137
138 propxshift = -6;
139
140 doveclipheight = 10;
141
142 teethh=3;
143 teethgapx=4+fdia;
144
145 prongstalkxwidth=3;
146
147 stalklength=selsz(35,25,55);
148 overclipcupgap=5;
149 overclipdepth=15;
150 overcliproundr=2.0;
151 overclipthick=1.0;
152 overclipcupnextgap=selsz(20,15,20);
153
154 hubaxlelen = selsz(25, 62.5, 77.5);
155 echo(hubaxlelen);
156
157 overclipsmaller=-2.5;
158 overclipbigger=0.0;
159
160 wingspoke=2.5;
161 wingsize=6;
162 wingthick=3;
163
164 armendwallthick=selsz(2.5, 1.8, 2.5);
165 armendbasethick=selsz(1.2, 1.2, 1.2);
166
167 axlehorizoffset = 12.5;
168 axlevertheight = 100;
169 towercliph = 16;
170 towerclipcount = 3;
171 towerpillarw = 5;
172
173 axlepinrad = 2;
174 axlepintabrad = 5;
175
176 washerthick = 1.2;
177 washerthinthick = 0.8;
178 washerverythinthick = 0.4;
179 washerrad = hubaxlerad + 7.5;
180 frictionwasherarmwidth = 3;
181 frictionwasherextrapush = 1.0;
182
183 ratchetpawl=ratchetstep-ratchettooth-bigslop*2;
184
185 nondove_armhole_x = 32;
186 nondove_armhole_hole = 4 + 0.8;
187 nondove_armhole_support = 7;
188 nondove_armhole_wall = 3.2;
189 nondove_armhole_slop = 0.5;
190 nondove_armhole_slop_x = 0.5;
191
192 nondove_armbase = nondove_armhole_x + nondove_armhole_hole/2 +
193   nondove_armhole_support;
194 echo(nondove_armbase);
195
196 include <doveclip.scad>
197 include <cliphook.scad>
198 include <filamentteeth.scad>
199 include <axlepin.scad>
200
201 channelwidth = prongthick + channelslop;
202 channeldepth = prongwidth + ratchettoothheight;
203 totalwidth = armendwallthick*2 + channelwidth;
204 totalheight = channeldepth + armendbasethick;
205 stalkwidth = prongwidth + prongstalkxwidth;
206
207 module ArmEnd(length=armend_length){ ////toplevel
208   if (usedove()) {
209     translate([ratchettoothsmoothr, channelwidth/2, -armendbasethick]) {
210       rotate([0,0,-90])
211         DoveClipPairBase(h=doveclipheight);
212     }
213   } else {
214     difference(){
215       translate([1, -armendwallthick, -armendbasethick])
216         mirror([1,0,0])
217         cube([nondove_armbase+1, totalwidth, totalheight]);
218       translate([-nondove_armbase + nondove_armhole_x,
219                  -armendwallthick + totalwidth/2,
220                  -armendbasethick -1])
221         cylinder(r= nondove_armhole_hole/2, h=totalheight+2, $fn=10);
222     }
223   }
224
225   difference(){
226     translate([0, -armendwallthick, -armendbasethick])
227       cube([length, totalwidth, totalheight]);
228     translate([-1, 0, 0])
229       cube([length+1 - ratchettooth, channelwidth, channeldepth+1]);
230     translate([-1, 0, ratchettoothheight])
231       cube([length+2, channelwidth, channeldepth+1]);
232   }
233   for (dx = [0 : ratchetstep : length - ratchetstep]) translate([dx,0,0]) {
234     translate([ratchettoothsmoothr+0.5, armendwallthick/2, 0]) minkowski(){
235       rotate([90,0,0])
236         cylinder($fn=20, r=ratchettoothsmoothr, h=armendwallthick);
237       multmatrix([      [       1, 0, ratchettoothslope, 0      ],
238                         [       0,      1,      0,      0       ],
239                         [       0,      0,      1,      0       ],
240                         [       0,      0,      0,      1       ]])
241         cube([ratchettooth - ratchettoothsmoothr*2,
242               channelwidth, ratchettoothheight - ratchettoothsmoothr]);
243     }
244   }
245 }
246
247 module FilamentCupHandle(){
248   pawlusewidth = ratchetpawl-ratchettoothsmoothr*2;
249   mirror([0,1,0]) {
250     cube([stalklength, stalkwidth, prongthick]);
251     translate([stalklength, stalkwidth/2, 0])
252       cylinder(r=stalkwidth/2, h=prongthick, $fn=20);
253     translate([ratchettoothsmoothr, stalkwidth, 0]) {
254       minkowski(){
255         cylinder($fn=20,r=ratchettoothsmoothr, h=1);
256         multmatrix([    [       1, -ratchettoothslope, 0, 0     ],
257                         [       0,      1,      0,      0       ],
258                         [       0,      0,      1,      0       ],
259                         [       0,      0,      0,      1       ]])
260           cube([pawlusewidth,
261                 ratchettoothheight - ratchettoothsmoothr,
262                 prongthick - 1]);
263       }
264     }
265   }
266 }
267
268 module FilamentCupCup(){
269   for (my=[0,1]) mirror([0,my,0]) {
270     translate([0, cupwidth/2, 0])
271       cube([cupheight + prongwidth, prongwidth, prongthick]);
272   }
273 }
274
275 module FilamentCup() { ////toplevel
276   FilamentCupHandle();
277
278   gapy = prongwidth;
279   dy = cupwidth/2 + gapy + overclipcupgap;
280   baselen = dy+cupwidth/2;
281
282   translate([0, dy, 0])
283     FilamentCupCup();
284   cube([prongwidth, baselen+1, prongthick]);
285
286   translate([cupstrong_dx, prongwidth, 0]) {
287     cube([prongwidth, baselen-prongwidth, prongthick]);
288     for (y = [0, .33, .67, 1])
289       translate([0, (baselen - prongwidth) * y, 0])
290         cube([-cupstrong_dx + 1, prongwidth, prongthick]);
291   }
292   if (cupstrong_dx != 0) {
293     rotate([0,0,45])
294       translate([-prongwidth*.55, -prongwidth*2.1, 0])
295       cube([prongwidth*(2.65), prongwidth*4.2, prongthick]);
296   }
297
298   translate([0, -0.2, 0])
299     cube([prongribwidth, baselen, prongthick + prongribheight]);
300
301   if (prongribheight > 0) {
302     translate([-prongwidth, baselen, 0])
303       cube([cupheight/2, prongwidth + prongribheight, prongribwidth]);
304   }
305
306   midrad = cupwidth/2 + prongwidth/2;
307
308   propshift = stalklength - overclipdepth - prongthick + propxshift;
309   proptaken = propshift;
310   echo(midrad, propshift, proptaken);
311
312   translate([propshift, -1, 0]) {
313     // something is wrong with the y calculation
314     cube([prongwidth,
315           gapy+2,
316           prongthick]);
317   }
318   for (y = [overclipcupgap, overclipcupgap+overclipcupnextgap]) {
319     translate([cupstrong_dx, y + prongwidth, 0])
320       rotate([0,0, 102 + fdia])
321       FilamentTeeth(fdia=fdia, h=teethh);
322   }
323   for (x = [-0.3, -1.3]) {
324     translate([cupheight + overclipcupnextgap*x, baselen + prongwidth, 0])
325       rotate([0,0, 12 + fdia])
326       FilamentTeeth(fdia=fdia, h=teethh);
327   }      
328 }
329
330 module CupSecuringClipSolid(w,d,h1,h2){
331   rotate([0,-90,0]) translate([0,-h1/2,-w/2]) linear_extrude(height=w) {
332     polygon(points=[[0,0], [d,0], [d,h2], [0,h1]]);
333   }
334 }
335
336 module CupSecuringClipSolidSmooth(xrad=0, xdepth=0){
337   hbase = totalheight + prongstalkxwidth - overcliproundr*2;
338   minkowski(){
339     CupSecuringClipSolid(w=totalwidth,
340                          d=overclipdepth + xdepth,
341                          h1=hbase - overclipsmaller,
342                          h2=hbase + overclipbigger);
343     cylinder($fn=20, h=0.01, r=overcliproundr+xrad);
344   }
345 }
346
347 module CupSecuringClip(){ ////toplevel
348   wingswidth = wingspoke*2 + overclipthick*2 + overcliproundr*2 + totalwidth;
349   difference(){
350     union(){
351       CupSecuringClipSolidSmooth(xrad=overclipthick, xdepth=0);
352       translate([-wingswidth/2, -wingsize/2, 0])
353         cube([wingswidth, wingsize, wingthick]);
354       translate([-wingsize/2, -wingswidth/2, 0])
355         cube([wingsize, wingswidth, wingthick]);
356     }
357     translate([0,0,-0.1])
358       CupSecuringClipSolidSmooth(xrad=0, xdepth=0.2);
359   }
360 }
361
362 module ArmDoveClipPin(){ ////toplevel
363   DoveClipPin(h=doveclipheight);
364 }
365
366 module TowerDoveClipPin(){ ////toplevel
367   DoveClipPin(h=towercliph/2);
368 }
369
370 module Hub(){ ////toplevel
371   axlerad = hubaxlerad + slop;
372   xmin = axlerad+hublwidth/2;
373   xmax = hubbigrad-hublwidth/2;
374   hole = hubeffrad - hubbigrad - DoveClip_depth() - hublwidth*2;
375   holewidth = DoveClipPairSane_width() - hubstemwidth*2;
376   nondove_allwidth = nondove_armhole_wall*2 + totalwidth;
377   difference(){
378     union(){
379       difference(){
380         cylinder($fn=60, h=hublthick, r=hubbigrad);
381         translate([0,0,-1])
382           cylinder($fn=30, h=hublthick+2, r=(hubbigrad-hublwidth));
383       }
384       cylinder(h=hubaxlelen, r=axlerad+hublwidth);
385       for (ang=[0 : 360/num_arms : 359])
386         rotate([0,0,ang]) {
387           if (usedove()){
388             difference() {
389               translate([hubeffrad,0,0])
390                 DoveClipPairSane(h=doveclipheight,
391                                  baseextend = (hubeffrad - DoveClip_depth()
392                                                - hubbigrad + hublwidth));
393               if (hole>hublwidth && holewidth > 2) {
394                 translate([hubbigrad + hublwidth, -holewidth/2, -1])
395                   cube([hole, holewidth, hublthick+2]);
396               }
397             }
398           } else {
399             difference(){
400               translate([0,
401                          -nondove_allwidth/2,
402                          0])
403                 cube([hubeffrad + nondove_armhole_x
404                       + nondove_armhole_hole/2 + nondove_armhole_support,
405                       nondove_allwidth,
406                       nondove_armhole_wall + totalheight]);
407               translate([hubeffrad - nondove_armhole_slop_x,
408                          -nondove_allwidth/2
409                          + nondove_armhole_wall - nondove_armhole_slop,
410                          nondove_armhole_wall])
411                 cube([nondove_armhole_x + 50,
412                       totalwidth + nondove_armhole_slop*2,
413                       totalheight + 1]);
414               translate([hubeffrad + nondove_armhole_x, 0, -20])
415                 cylinder(r= nondove_armhole_hole/2, h=50, $fn=10);
416             }
417           }
418         }
419       for (ang = [0 : 180/num_arms : 359])
420         rotate([0,0,ang]) rotate([90,0,0]) {
421           translate([0,0,-hublwidth/2])
422             linear_extrude(height=hublwidth)
423             polygon([[xmin,0.05], [xmax,0.05],
424                      [xmax,hublthick-0.2], [xmin, hubaxlelen-0.2]]);
425         }
426     }
427     translate([0,0,-1]) cylinder($fn=60, h=hubaxlelen+2, r=axlerad);
428   }
429 }
430
431 module ArmExtender(){ ////toplevel
432   DoveClipExtender(length=exteffrad-hubeffrad,
433                    ha=doveclipheight,
434                    hb=doveclipheight);
435 }
436
437 module FsAxlePin(){ ////toplevel
438   AxlePin(hubaxlerad, washerrad*2, axlepinrad, axlepintabrad, slop);
439 }
440
441 module Axle(){ ////toplevel
442   pillarswidth = DoveClipPairSane_width(towerclipcount);
443
444   rotate([0,0, -( axleaxlefudgebend + atan(slop/hubaxlelen) ) ])
445   translate([-axlehorizoffset, -axlevertheight, 0]) {
446     rotate([0,0,-axletowerfudgebend])
447     rotate([0,0,-90])
448       DoveClipPairSane(h=towercliph, count=towerclipcount, baseextend=3);
449     translate([0, DoveClip_depth(), 0])
450     rotate([0,0,90])
451       ExtenderPillars(axlevertheight - DoveClip_depth(),
452                       pillarswidth, towercliph,
453                       pillarw=towerpillarw);
454   }
455
456   axleclearlen = hubaxlelen + slop*4 + washerthick*2 + axlepadlen;
457   axlerad = hubaxlerad-slop;
458   bump = axlerad * 0.2;
459   shift = axlerad-bump;
460   joinbelowallow = 3;
461
462   intersection(){
463     translate([0, 0, shift]) {
464       difference() {
465         union(){
466           translate([-1, 0, 0])
467             rotate([0,90,0])
468             cylinder($fn=60,
469                      r = axlerad,
470                      h = 1 + axleclearlen + axlepinrad*2 + 2);
471           mirror([1,0,0]) rotate([0,90,0])
472             cylinder(r = axlerad*1.75, h = 3);
473           intersection(){
474             mirror([1,0,0])
475               translate([axlehorizoffset - pillarswidth/2, 0, 0])
476               rotate([0,90,0])
477               cylinder($fn=60,
478                        r = towercliph - shift,
479                        h = pillarswidth);
480             translate([-50, -joinbelowallow, -50])
481               cube([100, joinbelowallow+50, 100]);
482           }
483         }
484         rotate([90,0,0])
485         translate([axleclearlen + axlepinrad/2, 0, -25])
486           cylinder(r = axlepinrad + slop, h=50);
487       }
488     }
489     translate([-50,-50,0]) cube([100,100,100]);
490   }
491 }
492
493 module washer(thick){
494   Washer(hubaxlerad, washerrad, thick, slop);
495 }
496
497 module AxleWasher(){ ////toplevel
498   washer(thick=washerthick);
499 }
500
501 module AxleThinWasher(){ ////toplevel
502   washer(thick=washerthinthick);
503 }
504
505 module AxleVeryThinWasher(){ ////toplevel
506   washer(thick=washerverythinthick);
507 }
508
509 module AxleFrictionWasher(){ ////toplevel
510   difference(){
511     cylinder(h=washerthick, r=washerrad);
512     translate([0,0,-1]) cylinder(h=washerthick+2, r=hubaxlerad+slop);
513   }
514   frarmr = hubbigrad;
515   frarmw = frictionwasherarmwidth;
516   frarmpawlr = hublwidth;
517   frarmpawlpush = slop*4 + frictionwasherextrapush;
518   for (ang=[0,180]) rotate([0,0,ang]) {
519     translate([washerrad-1, -frarmw/2, 0])
520       cube([frarmr - washerrad + 1, frarmw, washerthick]);
521     intersection(){
522       translate([frarmr - frarmpawlr, -50, 0])
523         cube([frarmpawlr, 100, 50]);
524       rotate([0,90,0])
525         cylinder(h = 50, r = frarmpawlpush, $fn=36);
526     }
527   }
528 }
529
530 module TowerExtender(){ ////toplevel
531   l = totalheightfromtower - axlevertheight;
532   echo("TowerExtender",l);
533   DoveClipExtender(length = l,
534                    ha = towercliph, hb = towercliph,
535                    counta = towerclipcount, countb = towerclipcount,
536                    pillarw = towerpillarw);
537 }
538
539 module FilamentCupPair(){ ////toplevel
540   FilamentCup();
541   translate([cupheight + prongthick*3,
542              cupwidth/2*1.7,
543              0])
544     rotate([0,0,180]) FilamentCup();
545 }
546
547 //----- storarm -----
548
549 storarm_hooklen = 8;
550 storarm_hookheight = 5;
551 storarm_thick = 10;
552 storarm_axleslop = 4;
553
554 storarm_base_w = 30;
555 storarm_base_h = 100;
556 storarm_base_d = 15;
557 storarm_base_mind = 2;
558
559 storarm_cope_hubaxle_mk1 = true;
560
561 storarm_screw_hole = 4;
562 storarm_screw_hole_slop = 0.5;
563 storarm_besides_hole = 4;
564
565 storarm_under_hole = 5;
566 storarm_screw_hole_head = 8.8;
567 storarm_screw_hole_head_slop = 1.5;
568
569 // calculated
570
571 storarm_axlerad = hubaxlerad - storarm_axleslop;
572 storarm_mainlen = hubaxlelen*2 + storarm_axleslop
573   + (storarm_cope_hubaxle_mk1 ? 10 : 0);
574 storarm_totlen = storarm_mainlen + storarm_hooklen;
575
576 storarm_mid_off_y = storarm_axlerad;
577
578 storarm_base_off_y = storarm_mid_off_y + storarm_base_h/2;
579
580 module StorageArmDiagPartSide(xmin, xmax){
581   xsz = xmax-xmin;
582   yuse = storarm_thick/2;
583
584   intersection(){
585     translate([xmin-1, -storarm_axlerad, storarm_thick/2])
586       rotate([0,90,0])
587       cylinder(r=storarm_axlerad, h=xsz+2, $fn=60);
588     translate([xmin, -yuse, 0])
589       cube([xsz, yuse, storarm_thick]);
590   }
591 }
592
593 module StorageArmDiagPart(xmin, xmax, shear, adjbot){
594   hull(){
595     StorageArmDiagPartSide(xmin,xmax);
596
597     multmatrix([[1,0,0,0],
598                 [shear,1,0,0],
599                 [0,0,1,0],
600                 [0,0,0,1]])
601       translate([0, -storarm_axlerad*2 + adjbot, 0])
602       mirror([0,1,0])
603       StorageArmDiagPartSide(xmin,xmax);
604   }
605 }
606
607 module StorageArmBaseTemplate(){
608   square([storarm_base_w, storarm_base_h]);
609 }
610
611 module StorageArmAtMountingHoles(){
612   bes = storarm_besides_hole + storarm_screw_hole;
613
614   x0 = bes;
615   x1 = storarm_base_w-bes;
616   y1 = storarm_base_h - bes;
617   y0 = bes;
618
619   for (pos=[ [x0, y1],
620              [x1, y1],
621              [x1, y0] ]) {
622     rotate([0,90,0])
623       translate([pos[0] - storarm_base_w,
624                  pos[1] - storarm_base_off_y, -storarm_base_d])
625       children();
626   }
627 }
628
629 module StorageArmRight(){ ////toplevel
630   shear = storarm_hookheight / (storarm_mainlen/2);
631
632   StorageArmDiagPart(-1, storarm_mainlen/2+1, shear, 0);
633   StorageArmDiagPart(storarm_mainlen/2-1, storarm_mainlen+1, shear/2,
634                      storarm_hookheight/2);
635
636   translate([0, storarm_hookheight, 0])
637     StorageArmDiagPart(storarm_mainlen, storarm_totlen,
638                        shear/2, -storarm_hookheight/2);
639
640   difference(){
641     union(){
642       hull(){
643         translate([-storarm_base_d, -storarm_base_off_y, storarm_base_w])
644           rotate([0,90,0])
645           linear_extrude(height=storarm_base_mind)
646           StorageArmBaseTemplate();
647         StorageArmDiagPart(-1, 0, shear, 0);
648       }
649       StorageArmAtMountingHoles(){
650         cylinder(r= storarm_screw_hole_head/2,
651                  h=10);
652       }
653     }
654     StorageArmAtMountingHoles(){
655       translate([0,0,-1])
656         cylinder(r= (storarm_screw_hole + storarm_screw_hole_slop)/2 ,
657                  h=20);
658       translate([0,0,storarm_under_hole])
659         cylinder(r= (storarm_screw_hole_head + storarm_screw_hole_head_slop)/2,
660                  h=20);
661     }
662   }
663 }
664
665 module StorageArmLeft(){ ////toplevel
666   mirror([1,0,0]) StorageArmRight();
667 }
668
669 module StorArmHoleTest(){ ////toplevel
670   sz = storarm_screw_hole_head + storarm_besides_hole*2;
671   intersection(){
672     StorageArmRight();
673     translate([-50, -storarm_base_off_y, -1])
674       cube([100, sz, sz+1]);
675   }
676 }
677
678
679 //----- filament guide spacer -----
680
681 guide_armdia = 15.0 + 0.75;
682 guide_armwidth = 10.2 + 0.75;
683
684 guidefilclip_outerdia = 22.8;
685
686 guidespacer_prongprotrude = 4;
687 guidespacer_thick = 1.6;
688 guidespacer_len = 15.3 - 0.25;
689
690 // calculated
691
692 guidespacer_wingheight = (guidefilclip_outerdia - guide_armdia)/2;
693
694 module FilamentGuideArmTemplate(extra=0){
695   intersection(){
696     circle(r= (guide_armdia/2) + extra);
697     square(center=true, [guide_armwidth+extra*2,
698                          guide_armdia + extra*2 + 10]);
699   }
700 }
701
702 module FilamentGuideSpacerInnerTemplate(){
703   FilamentGuideArmTemplate();
704   translate([0, -guide_armdia/2])
705     square(center=true, [guide_armwidth - guidespacer_prongprotrude,
706                          guide_armdia]);
707 }
708
709 module FilamentGuideSpacer(){ ////toplevel
710   difference(){
711     union(){
712       linear_extrude(height= guidespacer_len)
713         FilamentGuideArmTemplate(extra= guidespacer_thick);
714       for (angle=[26, 60]) {
715         for (m=[0,1]) {
716           mirror([m,0,0]) {
717             rotate([0,0,angle]) {
718               hull(){
719                 for (t=[[0, guidespacer_wingheight],
720                         [guidespacer_len-1, -guidespacer_wingheight]])
721                   translate([0,0, t[0] + 0.5])
722                     cube([guidespacer_thick,
723                           guide_armdia + guidespacer_thick*2
724                           + t[1]*2,
725                       1],
726                          center=true);
727               }
728             }
729           }
730         }
731       }
732     }
733     translate([0,0,-1])
734       linear_extrude(height= guidespacer_len+5)
735       FilamentGuideSpacerInnerTemplate();
736   }
737 }
738
739
740 module Demo(){
741   translate([-hubeffrad-30,50,0]) Hub();
742   ArmEnd();
743   translate([0,50,0]) FilamentCup();
744 }
745
746 //ArmEnd();
747 //FilamentCup();
748 //FilamentCupPair();
749 //CupSecuringClip();
750 //Hub();
751 //ArmExtender();
752 //Axle();
753 //AxleWasher();
754 //AxlePin();
755 //AxleFrictionWasher();
756 //StorageArmLeft();
757 //StorArmHoleTest();
758 //Demo();