From 27ac0bfb252fc8ce25121ebabe31d35044cd0ef7 Mon Sep 17 00:00:00 2001 From: cnc Date: Fri, 5 Jun 2026 11:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A7=E8=A1=8C=20AGENTS=20align-linuxcnc=20?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 结论:新增 LinuxCNC source-backed G1 zero-feed 错误覆盖,源码依据为 src/emc/rs274ngc/interp_convert.cc convert_straight()。 测试:./test-native.sh 通过;./test-linuxcnc-source-link.sh 通过。 --- test-linuxcnc-rs274-native.sh | 5 +++-- test-linuxcnc-source-link.sh | 5 +++-- tests/gcode/linuxcnc_g1_zero_feed_error.ngc | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 tests/gcode/linuxcnc_g1_zero_feed_error.ngc diff --git a/test-linuxcnc-rs274-native.sh b/test-linuxcnc-rs274-native.sh index a528a19..f11f7b9 100755 --- a/test-linuxcnc-rs274-native.sh +++ b/test-linuxcnc-rs274-native.sh @@ -496,9 +496,10 @@ for case in "${threading_check_error_cases[@]}"; do done # Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc # convert_straight() and convert_threading_cycle() reject invalid -# spindle state/selector, rotary-axis motion, and G76 I/J/K geometry -# before issuing synchronized threading motion. +# feed/spindle state, spindle selectors, rotary-axis motion, and G76 I/J/K +# geometry before issuing straight or synchronized threading motion. threading_convert_error_cases=( + "linuxcnc_g1_zero_feed_error|Cannot do g1 with zero feed rate" "linuxcnc_g33_stopped_spindle_error|Spindle not turning in G33" "linuxcnc_g33_1_stopped_spindle_error|Spindle not turning in G33.1" "linuxcnc_g33_spindle_dollar_out_of_range_error|Invalid spindle (\$) number in G33 move" diff --git a/test-linuxcnc-source-link.sh b/test-linuxcnc-source-link.sh index b4f6b65..e5ec5c3 100755 --- a/test-linuxcnc-source-link.sh +++ b/test-linuxcnc-source-link.sh @@ -1080,9 +1080,10 @@ for case in "${threading_check_error_cases[@]}"; do done # Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc # convert_straight() and convert_threading_cycle() reject invalid -# spindle state/selector, rotary-axis motion, and G76 I/J/K geometry -# before issuing synchronized threading motion. +# feed/spindle state, spindle selectors, rotary-axis motion, and G76 I/J/K +# geometry before issuing straight or synchronized threading motion. threading_convert_error_cases=( + "linuxcnc_g1_zero_feed_error|Cannot do g1 with zero feed rate" "linuxcnc_g33_stopped_spindle_error|Spindle not turning in G33" "linuxcnc_g33_1_stopped_spindle_error|Spindle not turning in G33.1" "linuxcnc_g33_spindle_dollar_out_of_range_error|Invalid spindle (\$) number in G33 move" diff --git a/tests/gcode/linuxcnc_g1_zero_feed_error.ngc b/tests/gcode/linuxcnc_g1_zero_feed_error.ngc new file mode 100644 index 0000000..3e5db60 --- /dev/null +++ b/tests/gcode/linuxcnc_g1_zero_feed_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G1 X1