实现AXIS风格仿真外壳

结论:真实浏览器仿真页面完成 AXIS-style Phase 1 外壳,新增菜单、工具栏、Manual/MDI、Preview/DRO、G-code pane、machine state 和状态栏,并保留 LinuxCNC WASM 执行与回放验证。
This commit is contained in:
2026-06-16 21:54:04 +08:00
parent c88aac551b
commit db83ad29f3
8 changed files with 564 additions and 124 deletions

View File

@@ -1784,3 +1784,63 @@ real_browser_simulation_priority_docs_node_smoke=ok
- Browser JS 只能负责 UI、OPFS/session、SDK/WASM 调用、LinuxCNC-produced output 渲染和播放;
- 禁止在 JS 中实现 G-code、modal、tool compensation、parameter、kinematics、remap、planner 或
canonical motion 语义。
八十二、2026-06-16 继续执行记录AXIS-style browser simulation shell Phase 1
本批按 `wasm-port/docs/axis-style-simulation-implementation.md` 的 Immediate Next Batch
实现 Phase 1不移除当前 LinuxCNC-backed execution 和 playback API。
本批新增实质 UI
- `runtime/ui/simulation/index.html` 从三列 MVP 改为 AXIS-inspired shell
- 新增/调整区域:
- titlebar`axis.ngc - AXIS 2.9.8 on LinuxCNC-BROWSER-SIM`
- menubarFile / Machine / View / Help
- toolbaropen/reload/run/playback/status/program selector
- Manual Control / MDI tabs
- Preview / DRO tabs
- AXIS-like dark preview viewport
- lower G-code pane
- machine-state pane
- bottom status barESTOP / No tool / Position: Relative Actual
- 保留并复用当前 data attributes
- `data-program-selector`
- `data-run-program`
- playback buttons
- `data-program-lines`
- toolpath SVG / executed polyline / toolhead
- motion rows
- canonical output
- `simulation-app.js` 的 `setText()` 改为同步所有匹配节点,支持 AXIS shell 中多个 DRO/状态显示;
- 页面脚本新增 Manual/MDI 和 Preview/DRO tab 切换;
- browser smoke 扩展验证:
- AXIS shell regions
- File/Machine/View/Help menubar
- Manual/MDI tab switching
- Preview/DRO tab switching
- statusbar
- toolbar Step Forward 与 playback API 同步;
- 原有 LinuxCNC WASM program execution、多测试程序、回放、toolhead、executed path 仍通过。
本批新增/更新可执行验证:
```bash
SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_real_simulation_browser.sh
wasm-port/tests/ui/node/verify_real_simulation_programs.sh
wasm-port/tests/docs/node/verify_axis_style_simulation_docs.sh
wasm-port/tests/docs/node/verify_real_browser_simulation_priority_docs.sh
```
关键通过输出:
```text
browser_real_simulation_page_smoke=ok
real_simulation_programs_node_smoke=ok
```
本批仍保持 LinuxCNC 语义边界:
- 新 shell 只是 UI layout 和 display state
- Program execution 仍通过 `createLinuxCncInterpSdk()` / LinuxCNC WASM
- Preview、DRO、G-code active line 和 playback 都来自 LinuxCNC-produced canonical motion event
- 禁用的 manual/spindle/coolant/jog 控件只显示 blocked/readiness 状态,不伪造机器动作。