autocal: 序列页阵列预览工具、2D 图点可见度,标签顺序与送到标定页

- 标签顺序:几何与安装 放到 测试序列 之前
- 序列点增加可选 uv_px(向后兼容),点表新增 U/V 列;加入所选点、删除所选、
  送到标定页(按 U/V 经同一套求解加入标定队列并切换页面)
- 已选点结果改显示在选点区状态行,不再写入全局顶部状态条
- 序列页左上区改紧凑:名称与备注同一行,分“阵列”“运动参数”两页;
  运动参数每行三组,输入框改用 compactField
- 新增阵列工具(array_plan.py、ui/array_tool.py):UV 规则网格(可蛇形遍历)与
  阶段预设,逐点检查是否在曲面内、是否留有边距,候选点实时预览在 2D 图上,
  只有可用点才能加入,已在序列里的点不重复加入
- 2D 平面图:标记改为缩放后再绘制并加深色描边,修复缩小后点不清;
  底图可选 原图/灰度/变暗/仅轮廓,点色可选 黄/白/青/橙/灰(默认灰度+黄,写入偏好);
  序列点带编号并连线显示遍历顺序,选中行高亮
- 新增测试 test_sequence_uv、test_sequence_to_capture、test_array_plan、test_array_tool
This commit is contained in:
ykcheungab
2026-10-19 11:39:09 +08:00
parent 566f1bf390
commit ff5f089dc1
17 changed files with 1602 additions and 125 deletions
+55 -3
View File
@@ -494,7 +494,18 @@
"preview_solve_failed": "Solve failed: {error}",
"loaded": "Bundle loaded: {vertices} vertices · {triangles} triangles · {extent} mm · {scale} mm per unit",
"load_failed": "Load failed: {error}",
"picked": "Picked: residual {residual}° · yaw {yaw}° · pitch {pitch}°"
"picked": "Picked: residual {residual}° · yaw {yaw}° · pitch {pitch}°",
"bg_label": "Map",
"colour_label": "Dots",
"bg_original": "Original",
"bg_gray": "Grey",
"bg_dim": "Dimmed",
"bg_outline": "Outline",
"colour_yellow": "Yellow",
"colour_white": "White",
"colour_cyan": "Cyan",
"colour_orange": "Orange",
"colour_grey": "Grey"
},
"sequence": {
"title": "Test sequence design",
@@ -556,7 +567,19 @@
"imported": "Sequence imported: {name} ({count} points)",
"import_warnings": "Import reported {count} warning(s)",
"confirm_discard": "The current sequence has not been exported. Importing replaces it. Continue?",
"points_hint": "Coordinates are generated and checked per point; they are not typed. A typed coordinate is one nothing has checked, and one wrong number ruins a run."
"points_hint": "Coordinates are generated and checked per point; they are not typed. A typed coordinate is one nothing has checked, and one wrong number ruins a run.",
"col_u": "U (px)",
"col_v": "V (px)",
"btn_send": "Send to capture ({count})",
"send_tip": "Add the selected points to the capture page's queue by U/V and switch to it.",
"send_none": "Select rows that have U/V first.",
"btn_add_picked": "Add picked point",
"add_picked_tip": "Add the point just picked on the 2D map to the sequence, with its U/V.",
"btn_remove": "Remove selected",
"add_picked_none": "Pick a point on the 2D map first.",
"add_picked_duplicate": "That point is already row {row} of the sequence.",
"tab_array": "Array",
"tab_motion": "Motion"
},
"action": {
"ok": "Done",
@@ -903,7 +926,8 @@
"queue_removed": "Point removed: {site}",
"skipped": "Point skipped: {site}",
"stopped": "Stopped; the data already written is kept.",
"done": "Session finished: {path}"
"done": "Session finished: {path}",
"queue_added_many": "{added} point(s) added to the capture queue, {refused} could not be added."
},
"recording": {
"title": "Recording",
@@ -974,5 +998,33 @@
"confirm_title": "Write UNITS",
"confirm_body": "The following UNITS will be written to the controller:\n{changes}\n\nAfterwards every millimetre and degree reading, and every pose-move target, is recomputed with the new equivalent. Confirm that the platform is stopped and the mechanical ratio has been checked.",
"confirm_rotary": "Note: UNITS for {roles} is not the calibration equivalent {cal}; the rotary axis has no angle scale at that value, so pose moves are refused until it is recalibrated."
},
"array": {
"mode": "Type",
"margin": "Margin (px)",
"rows": "Rows",
"cols": "Columns",
"u_pitch": "U pitch (px)",
"v_pitch": "V pitch (px)",
"centre_u": "Centre U",
"centre_v": "Centre V",
"preset": "Stage",
"mode_grid": "Regular grid",
"mode_preset": "Staged preset",
"serpentine": "Serpentine order",
"centre_from_pick": "Centre on pick",
"centre_from_pick_tip": "Use the point just picked on the flat map as the grid centre.",
"show_preview": "Preview on the map",
"btn_add": "Add to sequence ({count})",
"none": "No candidate points.",
"all_ok": "{total} candidates, all on the surface.",
"some_bad": "{total} candidates: {usable} usable, {off} off the surface, {edge} too near the edge. Only usable points can be added.",
"preset_hint": "Staged presets are the suggested starting layout, taken from the planning figure: confirm the hardware with stage 0, then add more. Every point is checked against the current surface; ones off it or inside the margin get a red cross and are not added. A point already in the sequence is not added twice.",
"preset_stage0": "Stage 0 · hardware check (1 point)",
"preset_stage1": "Stage 1 · calibration 3×3 (9 points)",
"preset_stage1_check": "Stage 1 · independent checks (4 points)",
"preset_stage2": "Stage 2 · more calibration (8 points)",
"preset_stage2_check": "Stage 2 · more checks (4 points)",
"added": "{added} point(s) added, {repeated} already in the sequence, {failed} could not be solved."
}
}
+55 -3
View File
@@ -494,7 +494,18 @@
"preview_solve_failed": "求解失败:{error}",
"loaded": "已载入导出包:{vertices} 顶点 · {triangles} 三角面 · {extent} mm · 每单位 {scale} mm",
"load_failed": "载入失败: {error}",
"picked": "已选点:残差 {residual}° · yaw {yaw}° · pitch {pitch}°"
"picked": "已选点:残差 {residual}° · yaw {yaw}° · pitch {pitch}°",
"bg_label": "底图",
"colour_label": "点色",
"bg_original": "原图",
"bg_gray": "灰度",
"bg_dim": "变暗",
"bg_outline": "仅轮廓",
"colour_yellow": "黄",
"colour_white": "白",
"colour_cyan": "青",
"colour_orange": "橙",
"colour_grey": "灰"
},
"sequence": {
"title": "测试序列设计",
@@ -556,7 +567,19 @@
"imported": "已导入序列: {name}({count} 点)",
"import_warnings": "导入有 {count} 项提示",
"confirm_discard": "当前序列尚未导出,导入将替换它。是否继续?",
"points_hint": "坐标由网格生成并逐点校验,不接受手工输入:手工输入的坐标没有任何检查,一个错数字会毁掉整条序列。"
"points_hint": "坐标由网格生成并逐点校验,不接受手工输入:手工输入的坐标没有任何检查,一个错数字会毁掉整条序列。",
"col_u": "U (px)",
"col_v": "V (px)",
"btn_send": "送到标定页({count})",
"send_tip": "把选中的点按 U/V 加入标定采集页的点队列,并切换到该页。",
"send_none": "先选中带 U/V 的行。",
"btn_add_picked": "加入所选点",
"add_picked_tip": "把平面图上刚点选的点加入序列(带 U/V)。",
"btn_remove": "删除所选",
"add_picked_none": "先在平面图上点选一个点。",
"add_picked_duplicate": "该点已在序列第 {row} 行。",
"tab_array": "阵列",
"tab_motion": "运动参数"
},
"action": {
"ok": "完成",
@@ -903,7 +926,8 @@
"queue_removed": "已删除测点 {site}",
"skipped": "已跳过测点 {site}",
"stopped": "已停止,已写入的数据保留。",
"done": "本场标定已结束:{path}"
"done": "本场标定已结束:{path}",
"queue_added_many": "已加入 {added} 个点到标定队列,{refused} 个未能加入。"
},
"recording": {
"title": "录像",
@@ -974,5 +998,33 @@
"confirm_title": "写入 UNITS",
"confirm_body": "将向控制器写入以下 UNITS:\n{changes}\n\n写入后,全部毫米和角度读数以及姿态移动的目标都按新当量重新计算。请确认平台已停止,并已核对机械传动比。",
"confirm_rotary": "注意:{roles} 的 UNITS 不是标定当量 {cal},旋转轴在该当量下没有角度标定,姿态移动会被拒绝,直到重新标定。"
},
"array": {
"mode": "类型",
"margin": "边距 (px)",
"rows": "行数",
"cols": "列数",
"u_pitch": "U 间距 (px)",
"v_pitch": "V 间距 (px)",
"centre_u": "中心 U",
"centre_v": "中心 V",
"preset": "阶段",
"mode_grid": "规则网格",
"mode_preset": "阶段预设",
"serpentine": "蛇形遍历",
"centre_from_pick": "取选点为中心",
"centre_from_pick_tip": "把平面图上刚点选的点作为网格中心。",
"show_preview": "在平面图上预览",
"btn_add": "加入序列({count})",
"none": "没有候选点。",
"all_ok": "{total} 个候选点,全部落在曲面内。",
"some_bad": "{total} 个候选点:可用 {usable},曲面外 {off},太靠边 {edge}。只有可用的点能加入。",
"preset_hint": "阶段预设是建议的起始布点,坐标取自规划图;先用阶段 0 确认硬件,再逐级加密。每个点都会按当前曲面检查,落在曲面外或边距内的会标红叉,不会被加入。已在序列里的点不会重复添加。",
"preset_stage0": "阶段 0 · 硬件自检(1 点)",
"preset_stage1": "阶段 1 · 标定 3×3(9 点)",
"preset_stage1_check": "阶段 1 · 独立验证(4 点)",
"preset_stage2": "阶段 2 · 标定加点(8 点)",
"preset_stage2_check": "阶段 2 · 验证加点(4 点)",
"added": "已加入 {added} 个点,{repeated} 个已在序列里,{failed} 个求解失败。"
}
}