按建议,继续完成后续工作

结论:tool_table_setup 已通过专用 rs274 -t 工具表和毫米单位 INI 纳入 upstream side-by-side baseline,完整 native probes 验证通过。
This commit is contained in:
2026-06-07 23:32:35 +08:00
parent 389a9db0e3
commit 742bae7f09
3 changed files with 58 additions and 16 deletions

View File

@@ -124,19 +124,20 @@ The current fixture expectations validate standalone behavior against both the
vendored LinuxCNC source path and an upstream `rs274` side-by-side baseline for
parser/conversion, arc geometry, offsets, feed-control, comment/logging,
numbered-parameter, probing, spindle-orient, file-open reset, file-finish,
tool-reload, canned-cycle, state-tag motion, and O-word subroutine fixtures,
plus threading/rigid tap, NURBS dispatch boundaries, and the comparable
canonical runtime edge and program-end cleanup calls. Fixtures that depend on
standalone-only runtime adapters, HAL/INI/tool table setup, upstream `rs274`
output gaps such as `WAIT` or hidden NURBS control-point detail, or richer
machine session state still need dedicated native LinuxCNC baselines.
tool-reload, canned-cycle, state-tag motion, tool-table setup, and O-word
subroutine fixtures, plus threading/rigid tap, NURBS dispatch boundaries, and
the comparable canonical runtime edge and program-end cleanup calls. Fixtures
that depend on standalone-only runtime adapters, HAL/INI/tool-change state,
upstream `rs274` output gaps such as `WAIT` or hidden NURBS control-point
detail, or richer machine session state still need dedicated native LinuxCNC
baselines.
Remaining positive fixtures that are not in the upstream `rs274` side-by-side
baseline are intentionally held out until they get a dedicated native LinuxCNC
baseline: `namedparam_semantics` depends on standalone INI/HAL adapter
resolution, and `tool_semantics`/`tool_table_setup` depend on tool table host
state. `state_tag_motion` now compares its motion events with upstream `rs274`,
while `UPDATE_TAG` events remain a standalone state-tag capture boundary.
resolution, and `tool_semantics` depends on tool-change host state.
`state_tag_motion` now compares its motion events with upstream `rs274`, while
`UPDATE_TAG` events remain a standalone state-tag capture boundary.
The kinematics probes currently cover LinuxCNC identity/trivial kinematics, the
switchable `5axiskins` XYZBCW bridge-mill model, TRT `xyzac`/`xyzbc`

View File

@@ -69,15 +69,17 @@ semantic rewrites:
path. The upstream `rs274` side-by-side baseline now covers simple motion,
arc geometry, offsets, feed-control, comment/logging, numbered-parameter,
probing, spindle-orient, file-open reset, file-finish, tool-reload, and
canned-cycle, state-tag motion, and O-word subroutine fixtures; it also
covers threading/rigid tap, NURBS dispatch boundaries, and comparable
canonical runtime edge and program-end cleanup calls. Adapter-heavy fixtures,
standalone modal-state assertions, and upstream `rs274` output gaps such as
`WAIT` or hidden NURBS control-point detail still need dedicated native
LinuxCNC baselines.
canned-cycle, state-tag motion, tool-table setup, and O-word subroutine
fixtures; it also covers threading/rigid tap, NURBS dispatch boundaries, and
comparable canonical runtime edge and program-end cleanup calls.
Adapter-heavy fixtures, standalone modal-state assertions, and upstream
`rs274` output gaps such as `WAIT` or hidden NURBS control-point detail still
need dedicated native LinuxCNC baselines.
- `canned_cycles` is now in the upstream `rs274` side-by-side baseline after
the minimal interpreter harness was aligned with LinuxCNC `Interp::init()`
default `G73/G83` peck-clearance values for millimeter units.
- `tool_table_setup` is now in the upstream `rs274` side-by-side baseline using
a dedicated `rs274 -t` tool table and `-i` millimeter-unit INI boundary.
## Current Drift Conclusion

View File

@@ -31,6 +31,7 @@ FIXTURES=(
spindle_orient
state_tag_motion
threading_sync
tool_table_setup
tool_reload
)
@@ -41,6 +42,16 @@ fi
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT
TOOL_TABLE_BASELINE="$TMP_DIR/tool_table_setup.tbl"
cat > "$TOOL_TABLE_BASELINE" <<'TOOL_TABLE'
T0 P0 ; no tool
T2 P2 Z1.25 D0.25 ; standalone fixture tool 2
TOOL_TABLE
TOOL_TABLE_INI="$TMP_DIR/tool_table_setup.ini"
cat > "$TOOL_TABLE_INI" <<'TOOL_INI'
[TRAJ]
LINEAR_UNITS = mm
TOOL_INI
normalize_standalone_events() {
awk '
@@ -250,6 +261,19 @@ normalize_standalone_events() {
next
}
if (line ~ /^SET_TOOL_TABLE_ENTRY /) {
split(line, fields, /[[:space:]]+/)
for (i in fields) {
split(fields[i], pair, "=")
values[pair[1]] = pair[2]
}
print "SET_TOOL_TABLE_ENTRY|" values["toolno"] "|" norm(values["x"]) "|" \
norm(values["y"]) "|" norm(values["z"]) "|" \
norm(values["frontangle"]) "|" norm(values["backangle"]) "|" values["orientation"]
delete values
next
}
if (line ~ /^START_SPEED_FEED_SYNCH /) {
split(line, fields, /[[:space:]]+/)
for (i in fields) {
@@ -571,6 +595,17 @@ normalize_upstream_rs274_output() {
next
}
if (line ~ /^SET_TOOL_TABLE_ENTRY\(/) {
args = args_of(line)
split(args, values, ",")
gsub(/[[:space:]]+/, " ", values[3])
split(trim(values[3]), offset, " ")
print "SET_TOOL_TABLE_ENTRY|" trim(values[2]) "|" norm(offset[1]) "|" \
norm(offset[2]) "|" norm(offset[3]) "|" \
norm(values[4]) "|" norm(values[5]) "|" trim(values[6])
next
}
if (line ~ /^START_SPEED_FEED_SYNC\(/) {
args = args_of(line)
split(args, values, ",")
@@ -725,7 +760,11 @@ for name in "${FIXTURES[@]}"; do
fi
set +e
"$UPSTREAM_RS274" -g "$gcode_file" > "$native_raw" 2>&1
if [[ "$name" == "tool_table_setup" ]]; then
"$UPSTREAM_RS274" -g -i "$TOOL_TABLE_INI" -t "$TOOL_TABLE_BASELINE" "$gcode_file" > "$native_raw" 2>&1
else
"$UPSTREAM_RS274" -g "$gcode_file" > "$native_raw" 2>&1
fi
rs274_rc=$?
set -e