执行 AGENTS align-linuxcnc 加速规则
结论:新增 LinuxCNC source-backed canned cycle inverse-time feed 错误覆盖,源码依据为 src/emc/rs274ngc/interp_cycles.cc convert_cycle()。 测试:./test-native.sh 通过;./test-linuxcnc-source-link.sh 通过。
This commit is contained in:
@@ -591,9 +591,10 @@ done
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_canned_cycle.ngc >"$output_dir/cnc_sim_linuxcnc_canned_cycle.json"
|
||||
# Source basis: LinuxCNC src/emc/rs274ngc/interp_cycles.cc
|
||||
# convert_cycle() and the G73/G74/G82-G89 helpers validate canned-cycle
|
||||
# repeat counts, plane-specific axis/R words, Q/P requirements, and spindle
|
||||
# state before expanding cycles to Canon motion.
|
||||
# feed mode, repeat counts, plane-specific axis/R words, Q/P requirements,
|
||||
# and spindle state before expanding cycles to Canon motion.
|
||||
canned_cycle_error_cases=(
|
||||
"linuxcnc_canned_cycle_inverse_time_error|Cannot use inverse time feed with canned cycles"
|
||||
"linuxcnc_canned_cycle_l0_error|Cannot do zero repeats of cycle"
|
||||
"linuxcnc_canned_cycle_missing_r_error|R clearance plane unspecified in cycle"
|
||||
"linuxcnc_canned_cycle_missing_z_error|Z value unspecified in xy plane canned cycle"
|
||||
|
||||
@@ -366,6 +366,17 @@ done
|
||||
CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_canned_cycle.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_canned_cycle.json"
|
||||
# Source basis: LinuxCNC src/emc/rs274ngc/interp_cycles.cc
|
||||
# convert_cycle() rejects inverse-time feed mode before expanding canned
|
||||
# cycles through convert_cycle_xy()/yz()/zx().
|
||||
if CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_canned_cycle_inverse_time_error.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_canned_cycle_inverse_time_error.json" \
|
||||
2>"$output_dir/cnc_sim_linuxcnc_source_canned_cycle_inverse_time_error.err"; then
|
||||
echo "expected linuxcnc_canned_cycle_inverse_time_error.ngc to fail" >&2
|
||||
exit 1
|
||||
fi
|
||||
grep -q "Cannot use inverse time feed with canned cycles" "$output_dir/cnc_sim_linuxcnc_source_canned_cycle_inverse_time_error.err"
|
||||
if CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_canned_cycle_l0_error.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_canned_cycle_l0_error.json" \
|
||||
|
||||
4
tests/gcode/linuxcnc_canned_cycle_inverse_time_error.ngc
Normal file
4
tests/gcode/linuxcnc_canned_cycle_inverse_time_error.ngc
Normal file
@@ -0,0 +1,4 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
G93
|
||||
G81 X1 Z-1 R1
|
||||
Reference in New Issue
Block a user