+//----- filament guide spacer -----
+
+guide_armdia = 15.0;
+guide_armwidth = 10.2;
+guide_armcorelen = 15.3;
+
+guidefilclip_outerdia = 22.8;
+
+guidespacer_armslop = 0.75;
+guidespacer_armlenslop = 0.75;
+
+guidespacer_prongprotrude = 4;
+guidespacer_thick = 1.6;
+
+// calculated
+
+guidespacer_armdia = guide_armdia + guidespacer_armslop;
+guidespacer_armwidth = guide_armwidth + guidespacer_armslop;
+guidespacer_len = guide_armcorelen + guidespacer_armlenslop;
+
+guidespacer_wingheight = (guidefilclip_outerdia - guidespacer_armdia)/2;
+
+module FilamentGuideArmTemplate(extra=0){
+ intersection(){
+ circle(r= (guidespacer_armdia/2) + extra);
+ square(center=true, [guidespacer_armwidth+extra*2,
+ guidespacer_armdia + extra*2 + 10]);
+ }
+}
+
+module FilamentGuideSpacerInnerTemplate(){
+ FilamentGuideArmTemplate();
+ translate([0, -guidespacer_armdia/2])
+ square(center=true, [guidespacer_armwidth - guidespacer_prongprotrude,
+ guidespacer_armdia]);
+}
+
+module FilamentGuideSpacer(){ ////toplevel
+ difference(){
+ union(){
+ linear_extrude(height= guidespacer_len)
+ FilamentGuideArmTemplate(extra= guidespacer_thick);
+ for (angle=[26, 60]) {
+ for (m=[0,1]) {
+ mirror([m,0,0]) {
+ rotate([0,0,angle]) {
+ hull(){
+ for (t=[[0, guidespacer_wingheight],
+ [guidespacer_len-1, -guidespacer_wingheight]])
+ translate([0,0, t[0] + 0.5])
+ cube([guidespacer_thick, guidespacer_armdia + t[1]*2,
+ 1],
+ center=true);
+ }
+ }
+ }
+ }
+ }
+ }
+ translate([0,0,-1])
+ linear_extrude(height= guidespacer_len+5)
+ FilamentGuideSpacerInnerTemplate();
+ }
+}
+
+
+//----- replacement filament guide arm for TAZ-5 -----
+
+guidearm_armslop = 0.25;
+guidearm_armlenslop = 0.25;
+
+guidearm_hookprotr = 4;
+guidearm_hookprotrflat = 1;
+guidearm_hookslope = 0.3;
+
+guidearm_totallen = 60;
+
+guidearm_screwplatesz = 12;
+guidearm_screwplateth = 4;
+guidearm_screwhole = 4 + 0.5;
+
+guidearm_bendlen = 50;
+guidearm_bendslot = 5;
+
+// calculated
+
+guidearm_armdia = guide_armdia - guidearm_armslop;
+guidearm_armwidth = guide_armwidth - guidearm_armslop;
+guidearm_armcorelen = guide_armcorelen + guidearm_armlenslop;
+
+guidearm_base_z0 = -(guidearm_totallen - guidearm_armcorelen);
+
+guidearm_realbendlen = min(guidearm_bendlen,
+ guidearm_totallen - guidearm_screwplateth - 0.1);
+
+module FilamentGuideArmStop(h){
+ for (ts=[-1,+1]) {
+ translate([ts * guidearm_hookprotr, 0,0])
+ cylinder(r=guidearm_armdia/2, h);
+ }
+}
+
+module FilamentGuideArmShaftPositive(){
+ r = guidearm_armdia/2;
+
+ translate([0,0, guidearm_base_z0+1])
+ cylinder(r=r, h= guidearm_totallen);
+ translate([0,0, guidearm_armcorelen]){
+ hull(){
+ FilamentGuideArmStop(guidearm_hookprotrflat);
+ translate([0,0, guidearm_hookprotr/guidearm_hookslope])
+ cylinder(r=r, h=guidearm_hookprotrflat);
+ }
+ }
+}
+
+module FilamentGuideArmBase(){
+ translate([0,0, guidearm_base_z0]){
+ difference(){
+ translate([0,0, guidearm_screwplateth/2])
+ cube(center=true,
+ [guidearm_armdia + guidearm_screwplatesz*2,
+ guidearm_armwidth,
+ guidearm_screwplateth]);
+ for (ts=[-1,+1]) {
+ translate([ts * (guidearm_armdia/2 + guidearm_screwplatesz/2),
+ 0,
+ -20])
+ cylinder(r= guidearm_screwhole/2, h=40);
+ }
+ }
+ }
+}
+
+module FilamentGuideArm(){ ///toplevel
+ intersection(){
+ difference(){
+ FilamentGuideArmShaftPositive();
+ translate([-guidearm_bendslot/2,
+ -50,
+ -guidearm_realbendlen + guidearm_armcorelen])
+ cube([guidearm_bendslot,
+ 100,
+ guidearm_realbendlen + 100]);
+ }
+ cube(center=true,
+ [guidearm_armdia*2,
+ guidearm_armwidth,
+ guidearm_totallen*3]);
+ }
+ FilamentGuideArmBase();
+}
+
+