chiark / gitweb /
quacks-ingredients: ready for test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Feb 2020 16:28:25 +0000 (16:28 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Feb 2020 16:28:25 +0000 (16:28 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
quacks-ingredients.scad

index f8024e35ec67864576dc021757398e4af187bc71..7c873e2584686d8f9158a53cc23b7db355c9ff83 100644 (file)
@@ -8,8 +8,9 @@ thick = 1.5;
 
 multicolour_gap = 0.15; // each side
 initial_layer_thick = 0.400;
-//initial_layer_width = 0.750;
+initial_layer_width = 0.750;
 final_layer_thick = 0.250;
+multicolour_post = 4;
 
 $nspots = 3;
 $spots_absent = false;
@@ -95,6 +96,26 @@ module Demo(){ ////toplevel
   color("black") { Token_L2(); Token_L4(); }
 }
 
+module Frame(phase) {
+  zs = [ initial_layer_thick,
+        initial_layer_thick,
+        thick,
+        thick,
+        thick ];
+
+  base_sz = token_dia * [ 6, 1.5 ];
+  sz = base_sz + phase * initial_layer_width * 2 * [1,1];
+  linear_extrude(height= initial_layer_thick) {
+    difference(){
+      square(center=true, sz + initial_layer_width * 2 * [1,1]);
+      square(center=true, sz);
+    }
+  }
+  translate([-base_sz[0]/2, (phase-3)*(multicolour_post + multicolour_gap)])
+    linear_extrude(height= zs[phase-1])
+    square(multicolour_post);
+}
+
 module Tests(){
   for ($nspots = [1,2,3,4]) {
     translate(($nspots - 2) * (token_dia + 3) * [1,0])
@@ -103,19 +124,19 @@ module Tests(){
 }
 
 module Test_L1(){ ////toplevel
-  Tests() Token_L1();
+  Frame(1); Tests() Token_L1();
 }
 module Test_L2(){ ////toplevel
-  Tests() Token_L2();
+  Frame(2); Tests() Token_L2();
 }
 module Test_L3(){ ////toplevel
-  Tests() Token_L3();
+  Frame(3); Tests() Token_L3();
 }
 module Test_L4(){ ////toplevel
-  Tests() Token_L4();
+  Frame(4); Tests() Token_L4();
 }
 module Test_L5(){ ////toplevel
-  Tests() Token_L5();
+  Frame(5); Tests() Token_L5();
 }
 
 //Demo();