Date:2013-12-06 23:07:30 (4 months 17 days ago)
Author:Werner Almesberger
Commit:0fc785d3a1e7db2317bc63c76972ced3ea0ee0f0
Message:cameo/fped2stl.pl: hack: maintain decimal point across flipping

Since our regexps expect numbers to contain a decimal point, any result
that was an integer tripped the re-match after flipping. This hack works
around the problem by formatting the result such that it also has a decimal
point.
Files: cameo/fped2stl.pl (1 diff)

Change Details

cameo/fped2stl.pl
100100    undef $t;
101101    for $s (split(/\n/, $s{$z})) {
102102        if ($s =~ /^(-?[0-9]*\.[0-9]*)\s+(-?[0-9]*\.[0-9]*)/) {
103            $s = (($xmax+$xmin)/2-$1)." $2" if $flip_y;
103            $s = sprintf("%.6f", ($xmax+$xmin)/2-$1)." $2"
104                if $flip_y;
104105
105106            # re-scan, so that we can flip on both axes
106107            die unless

Archive Download the corresponding diff file

Branches:
master



interactive