Files
Robot_Arm/tests/baselines/shots_stable.md5
T
cbb 649bd69810 refactor(layout): src/ 收成顶层包 arm/,入口统一 python -m;提升承担构建的 scratch 脚本
单文件约束取消后,Python 侧没必要再靠 16 处 sys.path.insert 维持扁平模块互认。
现在按职责分包:
  arm/paths.py 路径唯一来源(含新增 CACHE、TPL)
  arm/constants.py 实测接口数值(原 armcore 的 M/C/CLR/FIT/MOTOR_TOL 段)
  arm/cad/{helpers,arm_build,part_tools,parts/} 几何与装配
  arm/kinematics.py(原 human_layout.py,唯一运动学事实源)
  arm/analysis/{sweep_v2,strength_check,torque_balance,finalize_travel,ws_sweep,gen_env_mesh}
  arm/dataio/{screw_mesh,draw_sheet}   arm/viewer/{build_viewer,shot}
  arm/build_model.py(原 arm_model.py)

顺带修掉的既有缺陷(都是实测撞出来的,不是预防性改动):
- arm_model 第二次 sys.path 跳到 gitignore 的 scratch/ 去 import 构建必需的包络脚本:
  ws_sweep/gen_env_mesh 提升进 arm/analysis/,缓存挪到 data/cache/(gitignore,可重生成)。
- finalize_travel / draw_sheet 顶层就是"算完写文件",一次 importlib 冒烟测试就把
  docs/travel.json 重写了一遍;现在被 import 直接抛错。
- strength_check 用 OUT.replace("/out","/web") 靠字符串形状推路径,改成直接用 WEB。
- build_viewer 里 WORKSPACE 使用点漏改导致 NameError —— 已由构建关卡抓到并修掉。

os._exit 的处置与计划里的假设相反:实测光是 `python -c "import arm.cad.helpers"`
就会在解释器退出时段错误(exit 139,OCC 静态析构),全流程跑完也一样。所以入口
脚本尾部保留 flush + os._exit,并把原因写进注释;被 import 时不生效。

关卡(tests/):
- verify.py 一条命令跑三层:产物 md5、IK 数值 exact 段、截图。
- 截图基线重做并分级:同一构建连跑两轮实测 102 张逐字节可复现(要求 md5 相同),
  3 张线束 x-ray 不可复现(mean<=0.0017、无像素差>8)改为与参考像素比容差;
  这 3 张不再入库,免得每次跑关卡都脏 git。
- 新增 ?view=sheet / ?sheet=N / ?theme / ?guide=N 四个 URL 参数:工程图与装配向导
  占了约一半 CSS 和 700 行 JS,原先没有任何截图覆盖,拆它们等于没有关卡。
- 关卡灵敏度已验:改坏 IK 基线一个数 -> FAIL;换旧版求解器 -> 5 处 exact 差异。

实测:python -m arm.build_model 退出码 0,全部产物 md5 与基线一致,
105 视图截图全过,IK exact 段逐字节一致。
2026-10-15 03:31:20 +08:00

105 lines
6.4 KiB
Plaintext

af5c9d74bddf7d795bd38f4371fa61ec docs/shots/01_iso.png
d1719a9f6fb775fd63cef27c5ff17f54 docs/shots/zoom_user.png
1389d052730b4bb09eb0a17cf9c49354 docs/shots/user_harness_view.png
eebfbfbea1375770fbc333f83f64e959 docs/shots/user_harness_zoom.png
606e209a6d3dc64ee3a59d1fc22339f3 docs/shots/user_m1_rear.png
99188cb1c040a2c6494322a9845ac6cb docs/shots/user_m1_exact.png
d3234ff06df60213391dab75589d65ab docs/shots/user_m1_bypass_oblique.png
02cfa0aa5681fec061f73b9d69fef41c docs/shots/user_smooth_harness.png
d25a25539d00674d608dca7234e331e0 docs/shots/user_contour_harness.png
c315879cfd09f35efa4ca4ecc1564b65 docs/shots/02_front.png
30ab6da268de109cd087b93b8b175cf9 docs/shots/m1_sheet_front.png
45050caba87c801ab0c29ac939e51e43 docs/shots/m2_sheet_joint.png
615621995924b8bcaf67d79a020cd8d2 docs/shots/m3_sheet_exploded.png
2b1950dda519fac21d5e71d4a9c1f990 docs/shots/m4_sheet_side.png
86098e0fada6f54d9ea3d285b3e0ed6e docs/shots/m5_guide_step1.png
8366cefeca8b935f9fef31bfd2454047 docs/shots/m6_guide_step5.png
40f4663eef6aa61f36e47e1fb1b1ab07 docs/shots/m7_sheet_blueprint.png
2702f107e6152f05a5016b916f38cb89 docs/shots/m8_sheet_dark.png
c84473f41febb608aea0ec2ec12ef317 docs/shots/m9_motion.png
b3157f4453cf96b930f065e134a2d18b docs/shots/03_side.png
068fc4bc3eec481ff7d7b1d4da2aad88 docs/shots/04_top.png
fbb95ea7a9229195d80c6f487021ae2b docs/shots/05_exploded.png
cbea750a1b52c5e8d061a9e3f4c981fe docs/shots/06_wrist.png
bb3dc393e4cd8f2c399c343aba0b3d35 docs/shots/07_joint.png
72e86ae7743ff7416e247d19556dc657 docs/shots/08_pose.png
af5c9d74bddf7d795bd38f4371fa61ec docs/shots/09_sheet.png
af5c9d74bddf7d795bd38f4371fa61ec docs/shots/10_solid.png
8daa2255af050a225609cebbc490d3b9 docs/shots/11_tool_flange.png
002a1f4a2b65744515f5b54364fcc2a8 docs/shots/12_elbow_flare.png
b2f1454a6009a8b44ddd41be9efdaff5 docs/shots/13_forearm_side.png
87a8889ba4031cdf2e378fca7e1b475c docs/shots/user_target.png
d51cde4a5e2450c529d1c8897e16cf29 docs/shots/view_yz_pos_x.png
1d8277f0b43938423f2ca53b34df0c56 docs/shots/view_yz_neg_x.png
64a199b2c65e7f2d0ad5e2a80c5caef8 docs/shots/view_iso_forearm.png
22f62024f51ee1827f662d8754019f57 docs/shots/user_view1.png
e96c715833f9321b9fd1501bc4bdf87a docs/shots/user_view2.png
d34d5d15434bc5a980e34e5511cc49a4 docs/shots/user_p04.png
6ea6b98ad978b993868bd302ad1dd8c6 docs/shots/user_p04_opp.png
85d13ea862263aa055924df2beca98fb docs/shots/user_elbow_rear.png
a17303b12669be77a97dc18f2463c809 docs/shots/user_p07_wrist.png
3ed51a9cbad23f7c9c7eb79ac5471eb1 docs/shots/user_elbow_front.png
729025864df7708c900e110ec175f0da docs/shots/user_p06_xz.png
095da56acdc9b512709786df26691481 docs/shots/user_p06_yz.png
fe0b30e16a673beb200224a0e6607faa docs/shots/user_p06_iso.png
abf7113f27b6443541e3a0859d77b3fe docs/shots/user_p07_creases.png
959e4bf08e174d90a1fe03a75a042070 docs/shots/bay_p06_inside.png
f9d8d58365b4ca693525af5540d39d32 docs/shots/bay_p07_inside.png
1b07f37e5fed9d82886b9518a3839860 docs/shots/bay_p08_inside.png
2c7f53c7bed7d25175948f09960ed634 docs/shots/user_p04_side.png
51d318f3584444ea78f2078d9ef3eddd docs/shots/user_p04_bottom.png
b31cd81ca26198896378bc38c4393b9d docs/shots/user_p04_bottom2.png
a60f07bb05bba7a58bdd29e5202c478f docs/shots/user_shoulder_solid.png
a60f07bb05bba7a58bdd29e5202c478f docs/shots/user_shoulder_xray.png
86aab5a8eb32216b4f712c730cc67068 docs/shots/user_shoulder_top.png
c22cef65ca2a74b1332ecaba6b9a484a docs/shots/p03_light_iso.png
2a9e076fa310b0c78b1a0e8375e8aae8 docs/shots/p03_light_side.png
5671bcc5a150d4899d186abd3658ef99 docs/shots/p03_light_rear.png
ebdeb9a180e95afd38f5a42d12743579 docs/shots/p03_light_join.png
0aa155c87743426668114d876478582c docs/shots/p03_light_xray.png
c55a40d4bc4b4e73a672326fa02d573c docs/shots/hollow_p04_top.png
7fe0cb0d52c1f7d97bf1c8fd47b22e0c docs/shots/hollow_p04_iso.png
f3b85ea576a6aa99a61953c4ff2a5ff4 docs/shots/hollow_p07_top.png
1464e622ec8090b6052ab82f7bcd6b22 docs/shots/hollow_p07_iso.png
8379d580ff746c859587e29e34700d7c docs/shots/hollow_p06_iso.png
78f62639acb79e30fa88cc5fda87cfea docs/shots/p03_mount_top.png
d0c82d07ab6055c1b67c03c126fe267a docs/shots/p03_mount_iso.png
21db2e9ca69192cce0be4467b4701028 docs/shots/p03_mount_loose.png
83325d3ca1b9e56fd2c70661052fd063 docs/shots/j3_前端压盖_装配.png
e169359e86a61f7ab80d4adea0231436 docs/shots/j3_前端压盖_全件.png
90b79bb61cacea2323ca19790d4158b2 docs/shots/boss_p04.png
6a86499dd36b2a0a1ac50ae28ea138e4 docs/shots/user_fork_fixed.png
e39999d2ef28536f24d7f6178fa9a15c docs/shots/bay_p04_inside.png
959e4bf08e174d90a1fe03a75a042070 docs/shots/bay_p06_inside.png
f9d8d58365b4ca693525af5540d39d32 docs/shots/bay_p07_inside.png
ae0305c092707e0c73944e1d889d076a docs/shots/p04_both_ends.png
f241acda8fdae460eb38f5a054e841f9 docs/shots/p04_m2_side.png
4c6014a754e233411f6e89e4112d6cde docs/shots/p06_m4_side.png
aa3cb2e1e7bff6e3ca4af66bd6c70854 docs/shots/p07_m5_side.png
515b204e42d75d98afe0600f8b8b419d docs/shots/p05_m3_side.png
dcc54259caf06f796e3dec84496abb12 docs/shots/boss_p05.png
309cc9ac3238e747104e6ceee7bd68bc docs/shots/user_compare_view.png
152eb1db302b62238f3051b1f48fcf45 docs/shots/user_p07_check.png
9f2c134297f2c7a555a6eaca2e74e4de docs/shots/boss_p06.png
b789564315ca1ad7d6d9d18c96972cba docs/shots/boss_p07.png
4a9a34e534496cb2c3be499ea2029d87 docs/shots/svg_side.png
eadcf7d6ac9853950496a559dbd8de72 docs/shots/svg_joint.png
f1e5bd79e6921b39d0785e4208ef5cca docs/shots/svg_exploded.png
1e1d29129833b35e43b925b25eae4b8f docs/shots/user_circle_check.png
6e1c039c236d28a4bec7e7b589fb2ed3 docs/shots/user_exact_view.png
7635f1d057b06f014c1683261a7237b8 docs/shots/shot_p08_user.png
3d261042388c8b2924848d8a29f71931 docs/shots/p05_flank_view.png
af5c9d74bddf7d795bd38f4371fa61ec docs/shots/harness_full_iso.png
8896124b0c45d9796e983f026134cff6 docs/shots/harness_overview.png
9fca41ada43f36a338cce31797152c3c docs/shots/harness_p07_window.png
7cbf2c699501bff3c7ebb4beb7cd34e2 docs/shots/harness_p04_p05.png
687e2184dd3e149939ce6d4214ffc698 docs/shots/harness_p06_window.png
84fb87bb5ce6cef73866401642ab0f9d docs/shots/harness_xray_full.png
70772a99b8c5d81619127eed7bc1dab5 docs/shots/tie_probe_negY.png
a3bf9bd7fb796283bbb9767cc790167a docs/shots/tie_probe_posY.png
7c2be3a8488997de588e3760f966fd7d docs/shots/tie_after_negY.png
0b3e26c6e2fd664f91764d26b8b1ed0c docs/shots/tie_after_oblique.png
d3bf901601ff221ecd1b09dc93dd2ccc docs/shots/tie_after_close.png
c39cee9deabedb4dc8fad8ec76b439e5 docs/shots/tie_after_p0607.png
b51a4e5424297c9012cc0562bbeec296 docs/shots/tie_after_p0607_obl.png