chiark / gitweb /
quacks-ingredients: actual frame wip
[reprap-play.git] / quacks-ingredients.scad
index 5afdd19569f2e554955f41e9d0af5257006b7bba..912da965762ba840b1a5db66deaf90577f59c447 100644 (file)
@@ -1,23 +1,29 @@
 // -*- C -*-
 
-token_dia = 21;
+token_dia = 20;
 spot_dia = 4.5;
 spot_gap = spot_dia / 3.0;
 
-thick = 1.5;
+thick = 3.0;
 
-multicolour_gap = 0.15; // each side
+multicolour_gap = 0.075; // each side
 initial_layer_thick = 0.400;
 initial_layer_width = 0.750;
-final_layer_thick = 0.250;
+final_layer_thick = 0.500;
 multicolour_post = 4;
 
-$spots_absent = false;
-$spots_plusgap = false;
-
 $fs=0.1;
 $fa=1;
 
+// calculated
+
+token_pitch = token_dia + 3;
+
+// autoadjusted
+
+$spots_absent = false;
+$spots_plusgap = false;
+
 module Spots_Extrude_Lower(){
   d = $spots_plusgap ? 1 : 0;
   translate([0,0,-d])
@@ -86,14 +92,13 @@ module Token_L5(){
     Token_Spots();
 }
 
-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(){
@@ -102,20 +107,24 @@ module Frame(phase) {
     }
   }
   // Priming tower
-  translate([-base_sz[0]/2, (3-phase)*(multicolour_post + multicolour_gap)])
+  translate([-base_sz[0]/2, (2.8-phase)*(multicolour_post*1.7)])
     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])
+    translate(($nspots - 2) * token_pitch * [1,0])
       children();
   }
 }
 
-module Test_L() { ////toplevel
-  Frame($phase); Tests() Token_L();
+module Tests_L() { ////toplevel
+  Frame($phase, token_dia * [ 6, 1.5 ]);
+  Tests() Token_L();
 }
 
+//// toplevels-from:
+include <quacks-ingredients-counts.scad>
+
 //Demo();