R2 底板改 4 层(D15):规则 / 几何 / 背面摆位 / 4 层布线与铺铜,已下发

- 规则:铜层 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
这个提交包含在:
zhou yang
2026-09-10 21:02:10 +08:00
共同撰写人 Claude Opus 5
父节点 18d3d69856
当前提交 efcba30a0c
共修改 280 个文件,包含 92007 行新增和 15053 行删除
+65
查看文件
@@ -0,0 +1,65 @@
# -*- coding: utf-8 -*-
u"""把 `pinmap_base.py` 在原理图上做的 EFUSE/PRSNT 换脚**同步到 PCB 的焊盘网名**。
/c/Python314/python .claude/r2/pcb_pinswap.py # 只读回对比
/c/Python314/python .claude/r2/pcb_pinswap.py --push # 改焊盘网名 + 读回校验
⚠ 为什么不走「从原理图导入变更」对话框:那条路会按内部通道 ID 重新配对,
R1 §交接二 踩过一次(配错一格,把一个本来正确的风扇块打乱),修起来要
`pcb1_uid_sync.py`。这里只有 8 只脚换名、元件身份一个没动,**定点改焊盘更安全**,
判据也简单:读回这 8 只脚的网名逐个对上。
"""
import json
import os
import sys
HERE = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(HERE))
sys.path.insert(0, HERE)
from eda import run # noqa: E402
import pcb_base as B # noqa: E402
WANT = {'8': 'PRSNT1#', '9': 'PRSNT2#', '10': 'PRSNT3#', '11': 'PRSNT4#',
'17': 'EFUSE_EN1', '18': 'EFUSE_EN2', '19': 'EFUSE_EN3',
'20': 'EFUSE_EN4', '21': 'EFUSE_EN5'}
JS = u"""
await eda.dmt_EditorControl.openDocument('%s');
await new Promise(r => setTimeout(r, 2000));
const WANT = %s, PUSH = %s;
const out = [];
for (const c of await eda.pcb_PrimitiveComponent.getAll()) {
if (c.designator !== 'U20') continue;
const ps = await eda.pcb_PrimitiveComponent.getAllPinsByPrimitiveId(c.getState_PrimitiveId());
for (const p of ps) {
const n = String(p.getState_PadNumber());
if (!(n in WANT)) continue;
const before = String(p.net || '');
if (PUSH && before !== WANT[n]) { try { p.toAsync().setState_Net(WANT[n]).done(); } catch (e) {} }
out.push([n, before, WANT[n]]);
}
}
if (PUSH) { await eda.pcb_Document.save(); await new Promise(r => setTimeout(r, 800)); }
return out;
"""
def call(push):
r = run(JS % (B.PCB, json.dumps(WANT, ensure_ascii=False), 'true' if push else 'false'),
timeout=300)
assert r.get('success'), json.dumps(r, ensure_ascii=False)[:400]
return r['result']
if __name__ == '__main__':
push = '--push' in sys.argv
rows = call(push)
rows.sort(key=lambda t: int(t[0]))
for n, before, want in rows:
flag = u'' if before == want else u' ← 改'
print(u' pin%-3s %-11s → %-11s%s' % (n, before or '(空)', want, flag))
if push:
after = {t[0]: t[1] for t in call(False)}
bad = [n for n, w in WANT.items() if after.get(n) != w]
print(u'[%s] 读回校验%s' % ('OK' if not bad else 'X',
u'9 只脚逐个对上' if not bad else u' 不过: %s' % bad))