From 8fa1c12e5de40eac5b62360d9ae701f4d4601abd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 5 Feb 2016 21:35:27 +0000 Subject: [PATCH 1/1] commitid: Best: Check whether rotated version is better --- commitid.scad.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"; -- 2.30.2