mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 18:21:08 +02:00
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.
This commit is contained in:
parent
ff5b4a1ae8
commit
0fc785d3a1
@ -100,7 +100,8 @@ for $z (keys %s) {
|
||||
undef $t;
|
||||
for $s (split(/\n/, $s{$z})) {
|
||||
if ($s =~ /^(-?[0-9]*\.[0-9]*)\s+(-?[0-9]*\.[0-9]*)/) {
|
||||
$s = (($xmax+$xmin)/2-$1)." $2" if $flip_y;
|
||||
$s = sprintf("%.6f", ($xmax+$xmin)/2-$1)." $2"
|
||||
if $flip_y;
|
||||
|
||||
# re-scan, so that we can flip on both axes
|
||||
die unless
|
||||
|
Loading…
Reference in New Issue
Block a user