106 lines
3.1 KiB
Markdown
106 lines
3.1 KiB
Markdown
# 11 浏览器米尺度场景与 G20/G21 混合单位证据完成记录
|
||
|
||
生成时间:2026-06-22 17:55 EDT
|
||
|
||
## 1. 本轮目标
|
||
|
||
按 `09-linear-units-meter-scene-complete-next-steps.md` 的剩余项继续执行,补齐:
|
||
|
||
```text
|
||
1. 浏览器 desktop/mobile 米尺度 Three.js 截图证据。
|
||
2. G20/G21 混合单位浏览器端预览用例。
|
||
3. 对应 JSON 证据和截图归档。
|
||
```
|
||
|
||
## 2. 修改文件
|
||
|
||
```text
|
||
app/src/visualization/five-axis-scene.js
|
||
qa/web-rtcp-5axis-site-test/capture-toolpath-preview-cases.mjs
|
||
working_run/README.md
|
||
working_run/11-browser-meter-scene-and-mixed-units-complete.md
|
||
gptlog-process/gpdlog.md
|
||
```
|
||
|
||
## 3. 完成内容
|
||
|
||
```text
|
||
1. Three.js canvas dataset 新增 threePathBoundsMeters。
|
||
2. browser 证据脚本新增 08-meter-scene-desktop-mobile。
|
||
3. desktop/mobile 分别采集 canvas screenshot、pixelStats、dataset。
|
||
4. 断言 sceneUnits=m、linearUnitScaleToMeters 有效、pathFitBounds=ok、bounds maxSpan 为米尺度且 canvas 非空。
|
||
5. browser 证据脚本新增 09-g20-g21-mixed-units-preview。
|
||
6. 加载本地 G-code:
|
||
G90 G20
|
||
G1 X1.0 Y0 Z0 F10
|
||
G21
|
||
G1 X25.4 Y25.4 Z0 F254
|
||
M2
|
||
7. 断言 canonical motion 同时保留 inch/mm,并且 1 inch 与 25.4 mm 都映射到 0.0254m 场景坐标。
|
||
8. RUN case 前恢复 vendored impeller 程序,避免本地混合单位程序污染 RUN 证据上下文。
|
||
```
|
||
|
||
## 4. 新增输出
|
||
|
||
```text
|
||
qa/web-rtcp-5axis-site-test/output/meter-scene-evidence.json
|
||
qa/web-rtcp-5axis-site-test/screenshots/meter-scene-evidence/08-meter-scene-desktop.png
|
||
qa/web-rtcp-5axis-site-test/screenshots/meter-scene-evidence/08-meter-scene-mobile.png
|
||
qa/web-rtcp-5axis-site-test/screenshots/toolpath-preview-cases/09-g20-g21-mixed-units-preview.png
|
||
```
|
||
|
||
`toolpath-preview-cases.json` 当前新增 case:
|
||
|
||
```text
|
||
08-meter-scene-desktop-mobile: PASS
|
||
09-g20-g21-mixed-units-preview: PASS
|
||
```
|
||
|
||
## 5. 验证结果
|
||
|
||
执行:
|
||
|
||
```bash
|
||
node web-rtcp-5axis-sim-plan/tests/node/verify_linear_unit_conversion.mjs
|
||
npm --prefix web-rtcp-5axis-sim-plan/app run build
|
||
node qa/web-rtcp-5axis-site-test/capture-toolpath-preview-cases.mjs
|
||
npm --prefix web-rtcp-5axis-sim-plan/app run smoke:node
|
||
```
|
||
|
||
结果:
|
||
|
||
```text
|
||
linear_unit_conversion_smoke=ok
|
||
gmoccapy_static_build=ok
|
||
browser evidence: all recorded cases PASS
|
||
smoke:node: all checks PASS
|
||
```
|
||
|
||
浏览器 JSON 摘要:
|
||
|
||
```text
|
||
meter-scene-evidence.json status=PASS
|
||
run-preconditions-feedback.json status=PASS
|
||
toolpath-preview-cases:
|
||
01-home-toolpath PASS
|
||
02-operator-demo-toolpath PASS
|
||
03-arc-demo-toolpath PASS
|
||
04-clear-preview-reference PASS
|
||
05-vendored-impeller-toolpath PASS
|
||
08-meter-scene-desktop-mobile PASS
|
||
09-g20-g21-mixed-units-preview PASS
|
||
06-running-rtcp-toolpath PASS
|
||
07-run-preconditions-and-feedback PASS
|
||
```
|
||
|
||
## 6. 当前结论
|
||
|
||
`working_run` 中列出的 RUN 主链路、控制类测试、INI 周期派生、xyzbc 对称测试、浏览器 RUN feedback 证据、Three.js 米尺度场景证据、G20/G21 混合单位预览证据均已完成并可复现。
|
||
|
||
后续可选增强:
|
||
|
||
```text
|
||
1. 将浏览器证据脚本拆分为独立小脚本,降低单次运行时间。
|
||
2. 补更多真实 LinuxCNC native 对照资产。
|
||
```
|