R2:底板 / 刀片布局布线脚本、快照、截图与规划文档更新(含外壳、打印件、布线归档)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
这个提交包含在:
+13
-3
@@ -49,6 +49,8 @@ if '--blade' in sys.argv or '--base' in sys.argv:
|
||||
_u = _j.load(_io.open(_os.path.join(_os.path.dirname(_os.path.abspath(__file__)),
|
||||
'r2', 'r2-uuids.json'), encoding='utf-8'))
|
||||
PCB = _u['boards']['BASE' if '--base' in sys.argv else 'BLADE']['pcb']['uuid']
|
||||
if '--pcb' in sys.argv: # 2026-09-14:直接给 uuid(BLADE-PCB_1 = c575a2e854057614 不在 r2-uuids 里)
|
||||
PCB = sys.argv[sys.argv.index('--pcb') + 1]
|
||||
else:
|
||||
PCB = '942ed1560d81c1e7' if '--pcb2' in sys.argv else '7e9415a16a909c51'
|
||||
|
||||
@@ -98,7 +100,8 @@ for (const el of document.querySelectorAll('div,table,tbody')) {
|
||||
const x = el.innerText || '';
|
||||
// ⚠️ 光判「含错误对象」会选中表头那个小格子(innerText 就四个字)。
|
||||
// 必须同时要求里面真的有一条明细行,行首长这样:`1间距错误…` / `3物理错误…`
|
||||
if (/错误对象/.test(x) && /[0-9](间距|物理|制造|连接性)错误/.test(x)
|
||||
// ⚠️ 行首类别还有「差分对错误」「同封装内间距错误」—— 只认四种的话这两类只剩标题(2026-09-10 底板 18 条被吞)
|
||||
if (/错误对象/.test(x) && /[0-9](间距|物理|制造|连接性|差分对|同封装内间距)错误/.test(x)
|
||||
&& (!best || x.length < best.length)) best = x;
|
||||
}
|
||||
return {detail: best || ''};
|
||||
@@ -141,6 +144,13 @@ def main():
|
||||
tail = phys[1].split(u'连接性错误', 1)[0].split(u'间距错误', 1)[0]
|
||||
cats += [(u'物理错误·' + n.strip(), c)
|
||||
for n, c in re.findall(r'([^()\d][^()]*?) \((\d+)\)', tail)]
|
||||
# `--conn`:连接性错误那一支也逐条列出来(2026-09-11:刀片 90×68 要确认 39 条里有没有被走线围住、
|
||||
# 铺铜够不着的 GND 焊盘 —— board_check 读不了铺铜,只有 DRC 这一支看得到)
|
||||
if '--conn' in sys.argv:
|
||||
conn = tree.split(u'连接性错误', 1)
|
||||
if len(conn) > 1:
|
||||
cats += [(u'连接性错误·' + n.strip(), c)
|
||||
for n, c in re.findall(r'([^()\d][^()]*?) \((\d+)\)', conn[1])]
|
||||
if not cats:
|
||||
print(u'')
|
||||
print(u'✅ 没有间距错误。')
|
||||
@@ -160,8 +170,8 @@ def main():
|
||||
txt = d['detail'].split(u'input::-webkit')[0] # 尾巴粘着分页组件的 CSS
|
||||
# ⚠️ 行首的类别名不止「间距错误」—— 还有「物理错误」「制造错误」等。
|
||||
# 只匹配间距错误会让另外那些类别只剩一个标题、一条明细都看不到。
|
||||
rows = re.findall(r'(\d+)(间距错误|物理错误|制造错误|连接性错误)(.+?)'
|
||||
r'(?=\d+(?:间距错误|物理错误|制造错误|连接性错误)|$)', txt)
|
||||
kinds = u'间距错误|物理错误|制造错误|连接性错误|差分对错误|同封装内间距错误'
|
||||
rows = re.findall(r'(\d+)(%s)(.+?)(?=\d+(?:%s)|$)' % (kinds, kinds), txt)
|
||||
for idx, kind, body in rows:
|
||||
print(u' %s. [%s] %s' % (idx, kind, body.strip()[:190]))
|
||||
if not rows and txt.strip():
|
||||
|
||||
在新工单中引用
屏蔽一个用户