diff --git a/test-linuxcnc-rs274-native.sh b/test-linuxcnc-rs274-native.sh index 7bc5f45..cd84cc6 100755 --- a/test-linuxcnc-rs274-native.sh +++ b/test-linuxcnc-rs274-native.sh @@ -1144,6 +1144,9 @@ for case in "${nurbs_error_cases[@]}"; do fi grep -Fq "$expected" "$output_dir/cnc_sim_linuxcnc_$fixture.err" done +# Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc convert_setup() +# stores G10 L2 U/V/W through PROGRAM_TO_USER_LEN, and +# convert_coordinate_system() emits them through SET_G5X_OFFSET. cp "$base_var_file" "$var_file" CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_coordinate_offsets.ngc >"$output_dir/cnc_sim_linuxcnc_coordinate_offsets.json" cp "$base_var_file" "$var_file" @@ -2944,7 +2947,10 @@ if not any( event["tool"] == 1 and event["start"]["x"] == 12.5 and event["start"]["y"] == -3 and - event["start"]["z"] == 4 + event["start"]["z"] == 4 and + event["start"]["u"] == 7 and + event["start"]["v"] == 8 and + event["start"]["w"] == 9 for event in g5x ): raise SystemExit("missing G10 L2 G5X offset event") diff --git a/test-linuxcnc-source-link.sh b/test-linuxcnc-source-link.sh index 04ff903..7888076 100755 --- a/test-linuxcnc-source-link.sh +++ b/test-linuxcnc-source-link.sh @@ -1802,6 +1802,9 @@ done CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" \ "$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_g76only.ngc \ >"$output_dir/cnc_sim_linuxcnc_source_g76only.json" +# Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc convert_setup() +# stores G10 L2 U/V/W through PROGRAM_TO_USER_LEN, and +# convert_coordinate_system() emits them through SET_G5X_OFFSET. cp "$base_var_file" "$var_file" CNC_SIM_RS274_VAR="$var_file" \ "$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_coordinate_offsets.ngc \ @@ -3972,7 +3975,10 @@ if not any( event["tool"] == 1 and event["start"]["x"] == 12.5 and event["start"]["y"] == -3 and - event["start"]["z"] == 4 + event["start"]["z"] == 4 and + event["start"]["u"] == 7 and + event["start"]["v"] == 8 and + event["start"]["w"] == 9 for event in g5x ): raise SystemExit("missing source-linked G10 L2 G5X offset event") diff --git a/tests/gcode/linuxcnc_coordinate_offsets.ngc b/tests/gcode/linuxcnc_coordinate_offsets.ngc index 7274e0f..e420dfb 100644 --- a/tests/gcode/linuxcnc_coordinate_offsets.ngc +++ b/tests/gcode/linuxcnc_coordinate_offsets.ngc @@ -1,5 +1,5 @@ G21 G90 G17 -G10 L2 P1 X12.5 Y-3 Z4 R30 +G10 L2 P1 X12.5 Y-3 Z4 U7 V8 W9 R30 G92 X1 Y2 Z3 G92.1 M30