R2:底板 / 刀片布局布线脚本、快照、截图与规划文档更新(含外壳、打印件、布线归档)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
这个提交包含在:
zhou yang
2026-10-04 19:24:45 +08:00
共同撰写人 Claude Opus 5.5
父节点 cd01640c40
当前提交 cf7cc9cf90
共修改 759 个文件,包含 76962 行新增和 5299 行删除
+19
查看文件
@@ -0,0 +1,19 @@
import base64, json, sys, os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from eda import run
x0,y0,x1,y1,out = float(sys.argv[1]),float(sys.argv[2]),float(sys.argv[3]),float(sys.argv[4]),sys.argv[5]
js = """
const sleep = ms => new Promise(r => setTimeout(r, ms));
await eda.dmt_EditorControl.openDocument('942ed1560d81c1e7');
await sleep(1200);
const MIL=39.3701;
await eda.dmt_EditorControl.zoomToRegion(%f*MIL, %f*MIL, %f*MIL, %f*MIL);
await sleep(1500);
const img = await eda.dmt_EditorControl.getCurrentRenderedAreaImage();
const bytes = new Uint8Array(await new Response(img).arrayBuffer());
let s=''; for (let i=0;i<bytes.length;i++) s += String.fromCharCode(bytes[i]);
return {b64: btoa(s)};
""" % (x0, x1, y1, y0)
r = run(js, timeout=120)
assert r.get('success'), json.dumps(r, ensure_ascii=False)[:400]
open(out, 'wb').write(base64.b64decode(r['result']['b64'])); print('->', out)