aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--klippy/extras/gcode_arcs.py2
-rw-r--r--test/klippy/gcode_arcs.test18
2 files changed, 19 insertions, 1 deletions
diff --git a/klippy/extras/gcode_arcs.py b/klippy/extras/gcode_arcs.py
index 7707cd66..76c165dd 100644
--- a/klippy/extras/gcode_arcs.py
+++ b/klippy/extras/gcode_arcs.py
@@ -84,7 +84,7 @@ class ArcSupport:
asPlanar = [ gcmd.get_float(a, 0.) for i,a in enumerate('JK') ]
axes = (Y_AXIS, Z_AXIS, X_AXIS)
- if not asPlanar[0] or not asPlanar[1]:
+ if not (asPlanar[0] or asPlanar[1]):
raise gcmd.error("G2/G3 requires IJ, IK or JK parameters")
asE = gcmd.get_float("E", None)
diff --git a/test/klippy/gcode_arcs.test b/test/klippy/gcode_arcs.test
index 6f9a7e3a..658ccad0 100644
--- a/test/klippy/gcode_arcs.test
+++ b/test/klippy/gcode_arcs.test
@@ -11,6 +11,12 @@ G2 X125 Y32 Z20 E1 I10.5 J10.5
# XY+Z arc move
G2 X20 Y20 Z10 E1 I10.5 J10.5
+# allowable commands
+G2 X20 Y20 I0 J10
+G2 X20 Y20 J10
+G2 X20 Y20 I10 J0
+G2 X20 Y20 I10
+
# Home and move in XZ arc
G28
G90
@@ -21,6 +27,12 @@ G2 X125 Y20 Z32 E1 I10.5 K10.5
# XZ+Y arc move
G2 X20 Y10 Z20 E1 I10.5 K10.5
+# allowable commands
+G2 X20 Y20 I0 K10
+G2 X20 Y20 K10
+G2 X20 Y20 I10 K0
+G2 X20 Y20 I10
+
# Home and move in YZ arc
G28
G90
@@ -30,3 +42,9 @@ G2 X20 Y125 Z32 E1 J10.5 K10.5
# YZ+X arc move
G2 X10 Y20 Z20 E1 J10.5 K10.5
+
+# allowable commands
+G2 X20 Y20 J0 K10
+G2 X20 Y20 K10
+G2 X20 Y20 J10 K0
+G2 X20 Y20 J10