chiark / gitweb /
quacks-ingredients: gcode manipulation - better EH
[reprap-play.git] / quacks-ingredients-make-copy-gcodes
index 742d9246d2114f5e397cc45008906adbae6413a9..4f0ddd3547fa755db3fccbf65afb65d1665a725e 100755 (executable)
@@ -51,13 +51,13 @@ for l in 2 4 5; do
                                        (?: ; .* \s*\n )?
                                        ^G1 \ Z([0-9.]+) \s*\n  )
                                }{
-                                       die unless $1 > $4;
-                                       die unless $3 > 9000;
+                                       die "$& $3" unless $1 >= $4;
+                                       die "$& $3" unless $3 > 9000;
                                        my $z = $i == $#l ? $1 : $4 + 0.5;
                                        "G0 F$3\n".
                                        "G1 Z$z\n" .
                                        $2
-                               }gmxe or $l==0 or die $i;
+                               }gmxe or $i==0 or die "$l[$i] $i";
                }
                print or die $! foreach @l;
        ' $g