chiark / gitweb /
Revert "brompton-computer-guard: swap holes, to make web be on other side"
[reprap-play.git] / commitid-best-test.scad.pl
1 #!/usr/bin/perl -w
2 use strict;
3
4 our @xm = qw(4.7 6.8 8.2 10 12 15 18 22 27 33 47 68 100);
5 our @ym = qw(3.9 5.6 8.2 12 18 27 39 56);
6
7 sub p { print @_ or die $!; }
8
9 p "include <commitid.scad>\n";
10 p "p = Commitid_pixelsz();\n";
11
12 my $x = 0;
13 foreach my $xm (@xm) {
14     my $y = 0;
15     foreach my $ym (@ym) {
16         p " translate([$x,$y] * p) {\n";
17         p "  difference(){\n";
18         p "   translate(-0.5*p*[1,1]) square([$xm+1,$ym+1]*p);\n";
19         p "   square([$xm,$ym]*p);\n";
20         p "  }\n";
21         p "  Commitid_BestCount_2D([$xm,$ym] * p, margin=0.2);\n";
22         p " }\n";
23         $y += $ym + 2;
24     }
25     $x += $xm + 2;
26 }