From: Ian Jackson Date: Fri, 5 Feb 2016 21:35:27 +0000 (+0000) Subject: commitid: Best: Check whether rotated version is better X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=8fa1c12e5de40eac5b62360d9ae701f4d4601abd commitid: Best: Check whether rotated version is better --- diff --git a/commitid.scad.pl b/commitid.scad.pl index a0c33e4..d8a565d 100755 --- a/commitid.scad.pl +++ b/commitid.scad.pl @@ -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";