chiark / gitweb /
commitid: Best: Check whether rotated version is better
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 5 Feb 2016 21:35:27 +0000 (21:35 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 5 Feb 2016 21:35:27 +0000 (21:35 +0000)
commitid.scad.pl

index a0c33e4..d8a565d 100755 (executable)
@@ -413,7 +413,9 @@ sub do_some_best ($$) {
                p ",max_sz[$xy]/sz_$form","[",(($xy xor $rot)+0),"]";
            }
            p ");\n";
-           push @do, " if (sc_$id >= 1.0) {\n";
+           push @do, " if (sc_$id >= 1.0";
+           push @do, " && sc_$id >= sc_${form}_r1" if !$rot;
+           push @do, ") {\n";
            push @do, "  scale(sc_$id)\n";
            push @do, "   rotate(90) translate([0,-sz_$form"."[1]])\n" if $rot;
            push @do, "   Commitid_${form}_2D();\n";