From: Ian Jackson Date: Thu, 20 Feb 2020 13:05:50 +0000 (+0000) Subject: quacks-ingredients: gcode manipulation X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=87165c8c9a4c8ecd534a224fa26b4f039a667ec0;p=reprap-play.git quacks-ingredients: gcode manipulation wip extra Z for moves from dinge to dinge Signed-off-by: Ian Jackson --- diff --git a/quacks-ingredients-make-copy-gcodes b/quacks-ingredients-make-copy-gcodes index 4d9c8ea..512d5fe 100755 --- a/quacks-ingredients-make-copy-gcodes +++ b/quacks-ingredients-make-copy-gcodes @@ -39,6 +39,24 @@ for l in 1 2 3 4 5; do ' $g done +for l in 2 4 5; do + gh + perl -i~ -0777 -pe ' + s{ + ^G1 \ Z([0-9.]+) \n + ( ^G0 \ F(\d+) \ X\S+ \ Y\S+ \n + (?: ; .* )? + ^G1 \ Z([0-9.]+) \n ) + }{ + die unless $1 > $4; + die unless $3 > 9000; + "G0 F$2\n". + "G1 Z".($3 + 0.5)."\n" . + $2 + }mxe + ' $g +done + exec 3>${lhs}234.auto.gcode for l in 2 3; do gh