From 936af41d0ef6dcbf570f1ba0e1950fc76d2719a1 Mon Sep 17 00:00:00 2001 From: Kestin Goforth Date: Mon, 18 Jul 2022 11:22:41 -0400 Subject: [PATCH] :bug: Invert start and end angles for G02 commands (#4580) --- src/octoprint/util/gcodeInterpreter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/gcodeInterpreter.py b/src/octoprint/util/gcodeInterpreter.py index 0aaf42406..5574d246f 100644 --- a/src/octoprint/util/gcodeInterpreter.py +++ b/src/octoprint/util/gcodeInterpreter.py @@ -547,7 +547,7 @@ class gcode: startAngle = math.atan2(oldPos.y - centerArc.y, oldPos.x - centerArc.x) endAngle = math.atan2(pos.y - centerArc.y, pos.x - centerArc.x) - if gcode == "G2": + if gcode in ("G2", "G02"): startAngle, endAngle = endAngle, startAngle if startAngle < 0: startAngle += math.pi * 2