feat(studio): 三维视图接入产品(阶段 4:界面、生命周期与记录隔离)

- What: `Scene3DView` 装配(widget/相机/渲染器/合成器/协调器/适配器),`asset_source`
  只查找并后台加载已编译的 `.oryscene` 包,`scene3d/prefs` 持久化并**修复**显示设置,
  `ui/mesh3d_panel` 用真实容器替换占位标签(无 GL/无包/包被拒/传感器不匹配各显示一行原因),
  `main.py` 在 `QApplication` 之前选定 GL profile,`app_window` 接线:3D 作为采集线程上的
  第二个 sink、`_on_run_tick` 驱动 `tick()`、视图切换与 `closeEvent` 释放、preferences 落盘。
- Why: 阶段 4 的验收要求"三维开关不影响采集/记录/力曲线",并把阶段 1 留下的
  "开/关三维 CSV 一致"这条补上;同时把"没有 context"从"看起来像在工作"变成可显示的终态。
- Verification: app 侧 test_scene3d_view 28 项、test_scene3d_gl_smoke 14 项(真实 GPU)、
  adapters 17 项、skeleton 4 项、stage1 24 项、coordinator 13 项、ui_smoke 86 项;
  shared 侧 contract 26 / assets 33 / package 19 / live 25;`ui_check.py` 566 项检查 0 失败
  (新增 "3D pane" 段 12 项);`locale_check.py` 302 个字面 key 0 缺失、中英各 377 key 对齐;
  记录隔离:同一 96 帧会话挂/不挂 3D 消费者,`forces.csv` 逐字节相同、有效样本数与记录问题数相同;
  生产者预算:合成器放慢到 50 ms 时 `submit_packet` p99 < 1 ms。
- Not in this change: 示意位移(`displacement_sensor_m`)仍未接入(需 SDK lift 与已确认尺度);
  ARM 板卡适配(按用户要求暂缓);包签名/AES-GCM 与长时性能报告(阶段 5);
  仓库中仍未提供 `.oryscene` 包(发布产物,且其单位与变换必须由人声明)。
This commit is contained in:
ykcheungab
2026-09-14 15:47:32 +08:00
parent ea1027e5a6
commit ac4dcd643f
20 changed files with 2718 additions and 83 deletions
+38 -2
View File
@@ -156,8 +156,13 @@
"plots": "Force Charts",
"cal": "Calibration",
"mesh3d": "3D mesh",
"mesh3d_empty": "Finger 3D view placeholder —\nOpen3D mesh coming later",
"mesh3d_empty_tip": "3D mesh preview for finger sensors"
"mesh3d_empty": "3D surface view",
"mesh3d_empty_tip": "3D surface view for finger sensors (coloured by the live deformation field)",
"mesh3d_no_scene": "No 3D scene for this sensor type",
"mesh3d_no_asset": "No compiled 3D scene installed.\nA scene package (*.oryscene) is looked for in:\n{directory}\nBuild one with tools/scene_assets/compile_scene.py — the names of the files it needs are in its --help. Only the 3D view is affected; measuring, recording and the charts work as usual.",
"mesh3d_loading": "Loading 3D scene {name}…",
"mesh3d_rejected": "The 3D scene was refused: {message}\nOnly the 3D view is affected; measuring, recording and the charts work as usual.",
"mesh3d_unavailable_gl_reason": "3D is not available on this machine: {reason}\nMeasuring, recording and the charts work as usual."
},
"chart": {
"fn": "FN",
@@ -367,5 +372,36 @@
"config_missing": "Sensor config not found for {type}",
"units_raw_fallback": "Calibration unavailable — showing raw units",
"reveal_failed": "Could not reveal config: {error}"
},
"scene3d": {
"enable": "Show the 3D view",
"preset": "View",
"housing": "Housing",
"deform": "Exaggerate",
"deform_tip": "Display-only magnification of the measured deformation. It changes the picture and nothing else: the recorded data, the calibration and the camera are not touched.",
"scale": "Colour scale",
"scale_range": "Range",
"scale_range_tip": "Bounds of the colour scale in fixed mode. In automatic mode the range comes from the valid samples of the frame on screen, so a quantity whose size differs by orders of magnitude is still readable.",
"scale_fixed": "Fixed",
"scale_auto": "Automatic",
"max_fps": "Display rate",
"max_fps_tip": "How many frames per second the 3D view draws. A display budget only: the camera and the recording are unaffected, and a dropped frame here is never a dropped sample.",
"reset_view": "Reset view",
"legend": "{quantity} [{unit}] · {quality}",
"legend_none": "No measurement on screen — the surface model is shown uncoloured",
"quality_calibrated": "calibrated",
"quality_approximate": "relative deformation, illustration",
"quality_display_only": "display only",
"state_disabled": "3D view is off",
"state_loading": "Loading the scene…",
"state_ready": "Ready — waiting for the first frame",
"state_live": "Live",
"state_no_data": "No valid measurement in this frame — showing the surface model",
"state_suspended": "Suspended (the view is hidden)",
"state_unavailable": "3D is unavailable",
"severity_info": "Note",
"severity_warning": "Warning",
"severity_error": "Error",
"stats": "shown {displayed} · dropped {dropped} · compose {compose} ms · paint {paint} ms"
}
}
+38 -2
View File
@@ -156,8 +156,13 @@
"plots": "力曲线图",
"cal": "标定",
"mesh3d": "三维网格",
"mesh3d_empty": "手指三维视图占位 —\nOpen3D 网格稍后加入",
"mesh3d_empty_tip": "手指传感器的三维网格预览"
"mesh3d_empty": "三维表面视图",
"mesh3d_empty_tip": "手指传感器的三维表面视图(按实时形变场着色)",
"mesh3d_no_scene": "此传感器类型没有三维场景",
"mesh3d_no_asset": "本机未安装已编译的三维场景。\n场景包(*.oryscene)的查找位置:\n{directory}\n可用 tools/scene_assets/compile_scene.py 生成,它需要哪些文件见 --help。只影响三维视图:采集、记录与力曲线照常工作。",
"mesh3d_loading": "正在加载三维场景 {name}…",
"mesh3d_rejected": "三维场景被拒绝:{message}\n只影响三维视图:采集、记录与力曲线照常工作。",
"mesh3d_unavailable_gl_reason": "本机无法使用三维显示:{reason}\n采集、记录与力曲线照常工作。"
},
"chart": {
"fn": "FN",
@@ -367,5 +372,36 @@
"config_missing": "未找到传感器配置: {type}",
"units_raw_fallback": "无标定数据 — 显示原始单位",
"reveal_failed": "无法打开配置位置: {error}"
},
"scene3d": {
"enable": "显示三维视图",
"preset": "观察方向",
"housing": "显示外壳",
"deform": "放大形变",
"deform_tip": "只放大画面上的形变显示。它只改图像:记录的数据、标定与算法相机都不受影响。",
"scale": "色标",
"scale_range": "范围",
"scale_range_tip": "固定模式下色标的上下限。自动模式的范围来自当前帧的有效样本,因此量级差别很大的量也都能看清。",
"scale_fixed": "固定",
"scale_auto": "自动",
"max_fps": "显示帧率",
"max_fps_tip": "三维视图每秒绘制多少帧。这只是显示预算:摄像头与记录不受影响,这里丢的帧永远不会变成丢的样本。",
"reset_view": "复位视角",
"legend": "{quantity} [{unit}] · {quality}",
"legend_none": "屏幕上没有测量值 — 仅显示不着色的表面模型",
"quality_calibrated": "已标定",
"quality_approximate": "相对形变示意",
"quality_display_only": "仅显示",
"state_disabled": "三维视图已关闭",
"state_loading": "正在加载场景…",
"state_ready": "就绪 — 等待第一帧",
"state_live": "实时",
"state_no_data": "本帧没有有效测量 — 显示表面模型",
"state_suspended": "已挂起(视图被隐藏)",
"state_unavailable": "三维不可用",
"severity_info": "提示",
"severity_warning": "警告",
"severity_error": "错误",
"stats": "已显示 {displayed} · 丢弃 {dropped} · 合成 {compose} ms · 绘制 {paint} ms"
}
}