summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kremer <->2021-10-15 01:26:31 +0200
committerThomas Kremer <->2021-10-15 01:26:31 +0200
commit4874e291ae4b4ee4ba9513d640810da72eecb0f9 (patch)
tree068d4b80be43c6bbe453b7e49afb1ae6780fd229
parenta1ceceba80731e65368ebec9db82efdc0c60385e (diff)
dxf2camm.pl: fixed path reversing code path.
-rwxr-xr-xdxf2camm.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/dxf2camm.pl b/dxf2camm.pl
index 5bc5585..bbd406d 100755
--- a/dxf2camm.pl
+++ b/dxf2camm.pl
@@ -281,7 +281,7 @@ sub sort_polylines {
#@$lines = map ["closed",[[@$_[0,1]],[@$_[2,1]],[@$_[2,3]],[@$_[0,3]],[@$_[0,1]]]], @bboxes;
use sort "stable";
-
+
my %h = qw(left 0 bottom 1 right 2 top 3);
my @criteria = ();
for (split /,/, $order) {
@@ -473,10 +473,10 @@ sub combine_polylines_fuzzy {
#last;
} else {
$paths->remove($cont);
- if ($rev) {
+ if ($ix == $ix2) {
# reverse $elem
- @$elem = [@$elem[1,0],[reverse @{$$elem[2]}]];
- $ix = 1-$ix2;
+ @$elem = (@$elem[1,0],[reverse @{$$elem[2]}]);
+ #$ix = 1-$ix2;
}
splice @{$$cont[2]}, $ix2*@{$$cont[2]},0, @{$$elem[2]};
$$cont[$ix2] = $$elem[$ix2];
@@ -791,7 +791,7 @@ sub usage {
my $explanation = $opts_explained{$name};
print STDERR " --",$_,(defined $value ? " (value: $value)":""),"\n",
defined($explanation) ? " $explanation\n":"";
-
+
}
print STDERR " <dxffile>\n";
print STDERR " read DXF data from this file instead of stdin.\n";