chiark / gitweb /
quacks-ingredients: sort out Tests
[reprap-play.git] / quacks-ingredients.scad
index 54269c9257e3183b2e90ee3a981f6acce366e389..50b38e0f0368befb283d07e3ce156e9eaa34bfc2 100644 (file)
@@ -12,7 +12,6 @@ initial_layer_width = 0.750;
 final_layer_thick = 0.250;
 multicolour_post = 4;
 
-$nspots = 3;
 $spots_absent = false;
 $spots_plusgap = false;
 
@@ -87,20 +86,13 @@ module Token_L5(){
     Token_Spots();
 }
 
-module Demo(){ ////toplevel
-  color("red") { Token_L3(); }
-  color("white") { Token_L1(); Token_L5(); }
-  color("black") { Token_L2(); Token_L4(); }
-}
-
-module Frame(phase) {
+module Frame(phase, base_sz) {
   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(){
@@ -108,7 +100,8 @@ module Frame(phase) {
       square(center=true, sz);
     }
   }
-  translate([-base_sz[0]/2, (phase-3)*(multicolour_post + multicolour_gap)])
+  // Priming tower
+  translate([-base_sz[0]/2, (3-phase)*(multicolour_post + multicolour_gap)])
     linear_extrude(height= zs[phase-1])
     square(multicolour_post);
 }
@@ -120,20 +113,9 @@ module Tests(){
   }
 }
 
-module Test_L1(){ ////toplevel
-  Frame(1); Tests() Token_L1();
-}
-module Test_L2(){ ////toplevel
-  Frame(2); Tests() Token_L2();
-}
-module Test_L3(){ ////toplevel
-  Frame(3); Tests() Token_L3();
-}
-module Test_L4(){ ////toplevel
-  Frame(4); Tests() Token_L4();
-}
-module Test_L5(){ ////toplevel
-  Frame(5); Tests() Token_L5();
+module Tests_L() { ////toplevel
+  Frame($phase, token_dia * [ 6, 1.5 ]);
+  Tests() Token_L();
 }
 
 //Demo();