chiark / gitweb /
sewing-table: Tile11 wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 May 2017 22:26:56 +0000 (23:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 May 2017 22:26:56 +0000 (23:26 +0100)
sewing-table.scad.m4

index 8b69b445499503991010b0295de2ce8ca08be2c4..0990ad1980afff4cbb485c8ca964816e4fb0db3f 100644 (file)
@@ -35,7 +35,7 @@ cutout_l_end_curve = 1;
 
 cutout_tile01_y = 170 - 147;
 cutout_tile11_x = 22 + cutout_l_end_curve;
-cutout_tile11_y = cutout_l_end_curve - cutout_tile01_y;
+cutout_tile11_y = cutout_l_end_y - cutout_tile01_y;
 
 // calculated
 
@@ -301,6 +301,9 @@ module TestDemo(){ ////toplevel
   translate([ +thehd[0] + demo_slop, 0 ])
     TestPiece2();
 }
+
+module Machine(){
+}
   
 function Rectangle_corners(c0, sz) =
   // returns the corners of a rectangle from c0 to c0+sz
@@ -318,6 +321,8 @@ function Rectangle_corners2posts(c) =
 
 module Rectangle_TileBase(c) { TileBase(c[0], c[2]); }
 
+function Posts_interpolate_one(c0,c1) = [c0, (c0+c1)/2, c1];
+
 m4_dnl   R_EDGE(c,ix)
 m4_dnl        c is from Rectangle_corners and
 m4_dnl        ix is a corner number
@@ -365,9 +370,34 @@ module Tile12(){ ////toplevel
   RoundCornerAdd(rcs);
 }
 
+module Tile11(){ ////toplevel
+  sz = [250,250];
+  c0 = [0,0];
+  c = Rectangle_corners(c0, sz);
+  cnr_posts = Rectangle_corners2posts(c);
+  posts = concat(
+                Posts_interpolate_one(cnr_posts[0],
+                                      cnr_posts[1] - [cutout_tile11_x, 0]),
+                [ cnr_posts[1] + [0, cutout_tile11_y],
+                  cnr_posts[2],
+                  cnr_posts[3]
+                  ]);
+  difference(){
+    union(){
+      Rectangle_TileBase(c);
+      Posts(posts);
+      RoundEdge(R_EDGE(c,2));
+      InterlockEdge(R_EDGE(c,3));
+    }
+    Machine();
+    InterlockEdge(R_EDGE(c,0), 1);
+  }
+}    
+
 module Demo(){ ////toplevel
   translate(demo_slop*[-2,1]) color("blue") Tile12();
   translate(demo_slop*[-2,0]) color("red")  Tile02();
+  translate(demo_slop*[-2,1]) color("orange") Tile11();
 }
   
 //TestPiece1();