chiark / gitweb /
commitid-cube-test: X, wip adjust?
[reprap-play.git] / sewing-table.scad.m4
index f2449a8c36fabf177ff27871d0afb0861a9ae284..de3a5aad14990e510c5a0c83b74aa8bd517a6d2e 100644 (file)
@@ -14,7 +14,7 @@ post_dia = 8;
 
 post_shorter = 1;
 
-screw_dia = 2.2;
+$screw_dia = 3.2;
 screw_big_dia = 3.6;
 screw_big_len = 4.0;
 
@@ -151,7 +151,7 @@ module Post(){
        cylinder(r= post_dia/2, h= tile_th + ply_th - post_shorter);
        translate([0,0, tile_th]) {
          cylinder(r= screw_big_dia/2, h= screw_big_len);
-         cylinder(r= screw_dia/2, h= ply_th, $fn=20);
+         cylinder(r= $screw_dia/2, h= ply_th, $fn=20);
        }
       }
     }
@@ -483,6 +483,35 @@ module TestDemo(){ ////toplevel
     TestPiece2();
 }
 
+module PostTestPiece(){ ////toplevel
+  hole_sizes = [2.8, 3.0, 3.1, 3.134, 3.168, 3.2, 3.3, 3.5];
+  nholes = len(hole_sizes)*2;
+  nrows = 4;
+  stride = post_dia*1.5;
+  rect_sz = stride * [ nrows,
+                      ceil(nholes/nrows) ];
+  corners = Rectangle_corners(-stride * 0.5 * [1,1], rect_sz);
+  difference(){
+    union(){
+      TileBase(corners[0], corners[2]);
+      RoundEdge(corners[0], corners[1]);
+      for (i= [ 0: nholes-1 ]) {
+       $screw_dia = hole_sizes[ floor(i/2) ];
+       translate(stride * [ (nrows-1) - (i % nrows),
+                            floor(i / nrows),
+                            0
+                            ]) {
+         Posts([[0,0]]);
+         color("blue")
+           mirror([0,0,1])
+           translate([post_dia/2, -post_dia/2, 1])
+           cube([1, post_dia * (i / nholes), tile_th]);
+       }
+      }
+    }
+  }
+}
+
 module Machine_NewRearProfile(){
   // figures copied out of xfig edit boxes
   // best not to edit the posbox size if poss - just move it