chiark / gitweb /
pull-cord-keeper: Add RoundEdges
[reprap-play.git] / pull-cord-keeper.scad
index 258e3e87d6389a6fdf41087a67a774b712fa89cd..b23ac47c30a2f2faa6578ea9b755467154662221 100644 (file)
@@ -11,6 +11,8 @@ blockwidth = hcentredist*2 + 6;
 
 height = 20;
 
+roundedgedia = 7.5;
+
 ziglen = hcentredist/2;
 
 feedxgap = 5;
@@ -24,6 +26,8 @@ backxgap = 1;
 
 blockoverlapcnr = 5;
 
+screwholedia = 4 + 0.5;
+
 module Oval(centredist, rad) {
   hull() {
     translate([-centredist/2,0,0]) circle(r=rad);
@@ -31,10 +35,20 @@ module Oval(centredist, rad) {
   }
 }  
 
+module VExtrude(){
+  translate([0,0, -height/2])
+    linear_extrude(height=20)
+    children(0);
+}
+
+module OuterOval(){
+  Oval(hcentredist, houterrad);
+}
+
 module Hoop(){
   difference(){
     hull(){
-      Oval(hcentredist, houterrad);
+      OuterOval();
       translate([0, (blockdepth + hoopthick)/2 + hinnerrad])
        square([blockwidth,
                blockdepth + hoopthick],
@@ -44,10 +58,34 @@ module Hoop(){
   }
 }
 
+module RoundEdges(){
+  intersection(){
+    VExtrude()
+      OuterOval();
+
+    for (xi=[-1,1]) {
+      for (yi=[-1,1]) {
+       translate([xi * (hcentredist/2 + hinnerrad),
+                  houterrad,
+                  yi * (height/2 - roundedgedia / 4 * sqrt(2))])
+         rotate([90,0,0])
+         cylinder(r=roundedgedia/2, h=houterrad*2, $fn=20);
+      }
+    }
+  }
+}
+
 module Positive(){
-  translate([0,0, -height/2])
-    linear_extrude(height=20)
-    Hoop();
+  difference(){
+    VExtrude()
+      Hoop();
+
+    rotate([90,0,0])
+      translate([0,0,-50])
+      cylinder(r=screwholedia/2, h=100);
+  }
+
+  RoundEdges();
 }
 
 module Ribs(){