chiark / gitweb /
quacks-ingredients: slight refactoring nfc
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Feb 2020 21:00:28 +0000 (21:00 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Feb 2020 21:00:28 +0000 (21:00 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
quacks-ingredients.scad

index 50b38e0f0368befb283d07e3ce156e9eaa34bfc2..33ba5fb4b28b6b8e7506998793bc4393ccee10df 100644 (file)
@@ -12,12 +12,18 @@ initial_layer_width = 0.750;
 final_layer_thick = 0.250;
 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])
@@ -108,7 +114,7 @@ module Frame(phase, base_sz) {
 
 module Tests(){
   for ($nspots = [1,2,3,4]) {
-    translate(($nspots - 2) * (token_dia + 3) * [1,0])
+    translate(($nspots - 2) * token_pitch * [1,0])
       children();
   }
 }