chiark / gitweb /
pull-cord-keeper: fiddlings
[reprap-play.git] / pull-cord-keeper.scad
index 115ca91d010402029e1a20a1a7d6f8c8282d4bbf..fe2493dfd71c698c0bd92c8db0440b1503324915 100644 (file)
@@ -11,6 +11,17 @@ blockwidth = hcentredist*2 + 6;
 
 height = 20;
 
+ziglen = hcentredist/2;
+
+feedxgap = 5;
+feedzgap = 5;
+ribsgap = 1;
+
+ribdepth = 3;
+ribheight = 4;
+
+blockoverlapcnr = 5;
+
 module Oval(centredist, rad) {
   hull() {
     translate([-centredist/2,0,0]) circle(r=rad);
@@ -32,8 +43,79 @@ module Hoop(){
 }
 
 module Positive(){
-  linear_extrude(height=20)
+  translate([0,0, -height/2])
+    linear_extrude(height=20)
     Hoop();
 }
 
-Positive();
+module Ribs(){
+  imax = ceil(height*2 / ribheight);
+  for (i=[-imax:imax]) {
+    hull(){
+      translate([-ribdepth/2,
+                ribheight*i,
+                0])
+       polygon([[0,          0],
+                [ribdepth, -ribheight],
+                [ribdepth, +ribheight]]);
+      translate([50, 0])
+       square([1, height*2], center=true);
+    }
+  }
+}          
+
+module Division(cutmore) {
+  mirror([0,0,1]) {
+    translate([0, 0, -cutmore*feedzgap/2]) {
+      translate([-ziglen + -cutmore*feedxgap/2, -100, 0])
+       cube([100, 100, 50]);
+    }
+  }
+  translate([blockwidth/2 - blockoverlapcnr, -50, -50])
+    cube([100, 100, 100]);
+
+  translate([50,
+            hinnerrad/2 + houterrad/2 + blockdepth/2 + -cutmore*ribsgap,
+            0])
+    rotate([-90,0,90])
+    linear_extrude(height=100)
+    Ribs();
+}
+
+module SDemo(){
+  //difference(){
+  %  Positive();
+  //  Division(0);
+  //}
+  Division(-1);
+}
+
+module A(){
+  difference(){
+    Positive();
+    Division(+1);
+  }
+}
+
+module B(){
+  intersection(){
+    Positive();
+    Division(-1);
+  }
+}
+
+module Demo(){
+  color("red") A();
+  color("blue") B();
+}
+
+//Ribs();
+//Demo();
+
+//A();
+//B();
+//%Division(+1);
+
+//Hoop();
+
+Demo();