chiark / gitweb /
quacks-ingredients: -counts: extras with Zero spots
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Mar 2020 17:55:02 +0000 (18:55 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Mar 2020 17:55:02 +0000 (18:55 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
quacks-ingredients-counts
quacks-ingredients-counts.scad

index fefbc72a1c046874f5eafa9363acceca948780db..5377cbcb1d53e18e982b95d4bddbbe898d3e5ed5 100755 (executable)
@@ -11,7 +11,7 @@ sub xdata ($) {
     my ($cb) = @_;
     return unless $which eq 'Base';
     foreach my $count (qw(1 2 3)) {
-       foreach my $nspots (qw(1 2 3 4)) {
+       foreach my $nspots (qw(1 2 3 4)) {
            $_ = $cb->($count,$nspots)."\t".$_;
        }
     }
@@ -20,7 +20,7 @@ sub xdata ($) {
 $_=<DATA>; chomp or die;
 xdata sub {
     my ($xcount,$xnspots) = @_;
-    "${xcount}x". (qw(X One Two Three Four)[$xnspots]);
+    "${xcount}x". (qw(Zero One Two Three Four)[$xnspots]);
 };
 our @names = split /\t/, $_;
 
index e7699be350680d02f8e659d9ee49e8dae05f2ae2..c2a8d084f9e9d770ad9b8feeaf81db8ef3565934 100644 (file)
@@ -97,6 +97,30 @@ module Base_1xTwo(){ ////toplevel
     $nspots = 4;
   };
 }
+module Base_1xZero(){ ////toplevel
+// Base  1xZero      total= 1  rowsz=1  nrows=1
+  union(){
+    Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
+    $nspots = 0;
+    translate(token_pitch * [   0.0,   0.0 ]) Token_L();
+  };
+  union(){
+    Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
+    $nspots = 1;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
+    $nspots = 2;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
+    $nspots = 3;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
+    $nspots = 4;
+  };
+}
 module Base_2xFour(){ ////toplevel
 // Base  2xFour      total= 2  rowsz=2  nrows=1
   union(){
@@ -197,6 +221,31 @@ module Base_2xTwo(){ ////toplevel
     $nspots = 4;
   };
 }
+module Base_2xZero(){ ////toplevel
+// Base  2xZero      total= 2  rowsz=2  nrows=1
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
+    $nspots = 0;
+    translate(token_pitch * [  -0.5,   0.0 ]) Token_L();
+    translate(token_pitch * [   0.5,   0.0 ]) Token_L();
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
+    $nspots = 1;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
+    $nspots = 2;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
+    $nspots = 3;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
+    $nspots = 4;
+  };
+}
 module Base_3xFour(){ ////toplevel
 // Base  3xFour      total= 3  rowsz=2  nrows=2
   union(){
@@ -301,6 +350,32 @@ module Base_3xTwo(){ ////toplevel
     $nspots = 4;
   };
 }
+module Base_3xZero(){ ////toplevel
+// Base  3xZero      total= 3  rowsz=2  nrows=2
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
+    $nspots = 0;
+    translate(token_pitch * [  -0.5,  -0.5 ]) Token_L();
+    translate(token_pitch * [  -0.5,   0.5 ]) Token_L();
+    translate(token_pitch * [   0.5,  -0.5 ]) Token_L();
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
+    $nspots = 1;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
+    $nspots = 2;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
+    $nspots = 3;
+  };
+  union(){
+    Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
+    $nspots = 4;
+  };
+}
 module Base_Black(){ ////toplevel
 // Base  Black       total=18  rowsz=5  nrows=4
   union(){
@@ -730,7 +805,7 @@ module Base_Yellow(){ ////toplevel
     translate(token_pitch * [   2.5,   1.0 ]) Token_L();
   };
 }
-// Base  total_count=246   total_real_count=219
+// Base  total_count=252   total_real_count=219
 // Base  max_rowsz=7       max_nrows=6
 module All_Black(){ ////toplevel
 // All  Black       total=26  rowsz=6  nrows=5