执行 AGENTS align-linuxcnc 加速规则
结论:新增 LinuxCNC source-backed canned cycle cutter compensation 错误覆盖,源码依据为 src/emc/rs274ngc/interp_cycles.cc convert_cycle()。 测试:./test-native.sh 通过;./test-linuxcnc-source-link.sh 通过。
This commit is contained in:
@@ -595,6 +595,7 @@ CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linux
|
||||
# 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_cutter_comp_error|Cannot use canned cycles with cutter compensation on"
|
||||
"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"
|
||||
|
||||
@@ -367,8 +367,8 @@ 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().
|
||||
# convert_cycle() rejects inverse-time feed mode and active cutter
|
||||
# compensation 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" \
|
||||
@@ -377,6 +377,14 @@ if CNC_SIM_RS274_VAR="$var_file" \
|
||||
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_cutter_comp_error.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_canned_cycle_cutter_comp_error.json" \
|
||||
2>"$output_dir/cnc_sim_linuxcnc_source_canned_cycle_cutter_comp_error.err"; then
|
||||
echo "expected linuxcnc_canned_cycle_cutter_comp_error.ngc to fail" >&2
|
||||
exit 1
|
||||
fi
|
||||
grep -q "Cannot use canned cycles with cutter compensation on" "$output_dir/cnc_sim_linuxcnc_source_canned_cycle_cutter_comp_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_cutter_comp_error.ngc
Normal file
4
tests/gcode/linuxcnc_canned_cycle_cutter_comp_error.ngc
Normal file
@@ -0,0 +1,4 @@
|
||||
G21 G90 G17
|
||||
F100
|
||||
G41.1 D1
|
||||
G81 X1 Z-1 R1
|
||||
Reference in New Issue
Block a user