- 规则:铜层 2→4,差分 0.28/0.18,间距 0.15,过孔 0.3/0.2(rules_base) - 几何:98×98 板框 + 4×M3,槽阵居中,L1 12V 大铜 + 指头(pcb_base) - 摆位:五插槽留 L1,其余 133 件翻到 L4;背面镜像规则实测;Hub 放走廊 2、 东移 2.5 mm;扇出圈 / 小件间距 1.5(去耦例外)/ 9 A 过孔阵禁区(place_base) - 叠层按用户决定改为 L1 槽面 / L2 整层 +3V3 / L3 整层 GND / L4 器件面 - 布线:D± 七对按构造布通(USB3 掉头、USB1/2 北去掉头、USB4/5 东绕、 J23 桥),+3V3 / GND / +12V 平面网每脚一孔,0.125 网格 + PathFinder 开关(route_base、remote_route.ps1);剩 37 个网待手工补 - 铺铜:4 层重写,入口链自南向北切段 + 断面校核(pour_base); 已下发布线 / 缝合孔 / 铜面轮廓,填铜未成功(待查) - 工具:plot_base / plot_routes / shot_base,board_check 通孔两层都算 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0168Bu6SEx3cXXCJLkdnE6zB
19 行
951 B
Python
19 行
951 B
Python
import base64, json, sys, os
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
from eda import run
|
|
page, x0, y0, x1, y1, out = sys.argv[1], float(sys.argv[2]), float(sys.argv[3]), float(sys.argv[4]), float(sys.argv[5]), sys.argv[6]
|
|
js = """
|
|
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
|
await eda.dmt_EditorControl.openDocument('%s');
|
|
await sleep(1200);
|
|
await eda.dmt_EditorControl.zoomToRegion(%f, %f, %f, %f);
|
|
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)};
|
|
""" % (page, 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, os.path.getsize(out))
|