chiark / gitweb /
filamentclip as trying small
[reprap-play.git] / filamentclip.scad
index 583173c2892569efc9da0445cb12be00e2b506b2..cde81989aaacd67bb8adea35ffe3fb1e8cf1aabc 100644 (file)
 include <cliphook.scad>
 
-rad=12;
 h=3.5;
-w=1.0;
+teethw=1.5;
 
 looprad=2.5;
-loopw=w;
 
 fdia=1.77;
+//fdia=3;
+
+d=0.01;
+
+module FilamentClipTeeth(teethw=teethw,
+                        stembendd=0.5, stembendl=7, teethxl=1.5) {
+  gapw = fdia-stembendd*2;
+  teethbigw = gapw + teethw*2;
+  basew = fdia+teethw*2-stembendd*2;
+  based = basew/3;
 
-module FilamentClipTeeth(based=1.5, basew=4, clipw=0.6) {
-//  for (mirr=[0:1]) {
-//    mirror([0,mirr,0]) {
-//      linear_extrude(height=h) {
-//     translate(0.5, square([
-//      }
-//    }
-//  }
-  extent1=1.5;
-//  jaww=
   translate([-based, -basew/2, 0]) cube([based, basew, h]);
+  difference() {
+    union() {
+      translate([-d, -teethbigw/2, 0])
+       cube([d+stembendl + teethw, teethbigw, h]);
 //  translate([
-  linear_extrude(height=h) {
-    FlatArc(extent1+fdia/2, 0, fdia/2, fdia/2+clipw, $fn=30);
+//  stembigw = fdia + stembend
+//  translate([-d, -stemw, 
+      linear_extrude(height=h) {
+       translate([stembendl-fdia/2, 0]) circle(fdia/2+teethw, $fn=30);
+      }
+    }
+    translate([0,0,-1]) {
+      translate([0,-gapw/2])
+       cube([stembendl+teethxl+1, gapw, h+2]);
+      linear_extrude(height=h+2) {
+       translate([stembendl-fdia/2, 0]) circle(fdia/2, $fn=30);
+      }
+    }
   }
+
+  for (mirr=[0:1]) {
+    mirror([0,mirr,0]) {
+      translate([stembendl + teethw, gapw/2, 0])
+       rotate([0,0,30])
+       cube([teethxl, teethw, h]);
+    }
+  }
+}
+
+module our_ClipHook(ye){
+  ClipHook(h=h, w=w, g=0.6, k=1.5, g=0.6, ye=ye, cupcaph=0.5, cupcapg=0.8);
 }
 
-module FilamentClip() {
-  k=1.5;
-  g=0.6;
+module FilamentClip(w, rad, trans) {
+  loopw=w;
 
-  rotate([0,0,-45]) {
-    translate([0,rad,0]) {
-      ClipHook(h=h, w=w, g=0.6, k=k, g=g, ye=-1.3);
-      rotate([0,0,180]) ClipHook(h=h, w=w, g=g, k=k, ye=0.8);
+  rotate([0,0, trans ? -90 : -70]) {
+    translate([(trans ? 5 : 0), rad - (trans ? 0 : 1.5), 0]) {
+      rotate([0,0,8])
+       our_ClipHook(w=w, ye=-1.3);
+    }
+  }
+
+  rotate([0,0, trans ? -55 : -35]) {
+    translate([(trans ? +1.5 : 0), rad, 0]) {
+      rotate([0,0,180])
+       our_ClipHook(w=w, ye=0.8);
     }
   }
 
   linear_extrude(height=h) {
     assign($fn=80) {
-      FlatArc(0,0, rad-w/2,rad+w/2, 65,379);
+      FlatArc(0,0, rad-w/2,rad+w/2, 80,181);
+      translate([0,-trans,0])
+       FlatArc(0,0, rad-w/2,rad+w/2, 179, trans ? 360 : 350);
     }
     assign($fn=30) {
-      FlatArc(0,rad+looprad+w, looprad,looprad+loopw);
+      rotate([0,0,loopang])
+       FlatArc(0,rad+looprad+w, looprad,looprad+loopw);
+    }
+  }
+
+  if (trans==0) {
+    for (mir=[0,1]) {
+      mirror([mir,0,0])
+       rotate([0,0,-40])
+       translate([rad+w*0.3+teethw*0.3+fdia/2, 0, 0])
+       rotate([0,0,95])
+       FilamentClipTeeth();
+    }
+  } else {
+    for (mir=[0,1]) {
+      mirror([mir,0,0])
+       translate([0, mir ? 0 : -trans, 0])
+       rotate([0,0, mir ? 0 : 180])
+       translate([0,-5,0])
+       rotate([0,0, -10])
+       translate([rad+w*0.3+teethw*0.3+fdia/2, 0, 0])
+       rotate([0,0,95])
+       FilamentClipTeeth();
+    }
+    for (mir=[0,1]) {
+      mirror([mir,0,0])
+       translate([-rad-w/2, -trans-0.1, 0])
+       cube([w, trans+0.2 + (mir ? -11 : 0), h]);
     }
   }
 }
 
-FilamentClip();
-//FilamentClipTeeth();
+//FilamentClip(w=2.5, rad=19, trans=0);
+
+//translate([40,0,0])
+  FilamentClip(w=1.5, rad=6, trans=20);