fix: display.txt 缺失 alpha 透明度参数,draw.py 读取不到

alpha(盒子透明度)未写入 display.txt header,
draw.py 回退到默认 0.2 而非 input.txt 配置值。
现在 alpha 通过 header 字段正确传递。

Python 引擎:alpha 支持单值或数组 → 逗号分隔字符串
外部引擎:从 trajectory.txt 读取 alpha 值
This commit is contained in:
2026-06-12 07:24:38 +08:00
parent c3e50d265d
commit 54aa20d7c5
4 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -1459,7 +1459,8 @@ def run_simulation(save_trajectory=0):
"damping_force": str(DAMPING_FORCE),
"gravity_strength": str(GRAVITY_STRENGTH),
"driving_force": str(DRIVING_FORCE),
"use_marker": str(use_marker)}
"use_marker": str(use_marker),
"alpha": ",".join(str(a) for a in (alpha if isinstance(alpha, list) else [alpha]))}
)
print(f"[compute] display.txt 已保存至: {disp_path} ({n_frames_actual} 帧)")