Files
Robot_Arm/螺丝采购清单.html
T
cbb 79c1265202 feat: 新增螺丝网格生成与强度校核功能,重建模型数据与查看器,补充定位图与BOM文档
新增 screw_mesh.py 螺丝网格划分模块与 strength_check.py 强度校核逻辑,arm_model.py 同步集成网格生成与校核流程;viewer_tpl.html、web/index.html 与 web/机器人手臂3D查看器.html 更新查看器模板以支持新数据展示;docs/bom.json 与 docs/travel_detail.json 调整 BOM 清单与行程参数;docs/print_settings.md 新增打印设置说明,新增螺丝采购清单 HTML;补充大量定位图与验证截图。
2026-09-28 03:33:27 +08:00

156 lines
7.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>机器人手臂 · 螺丝采购清单 BOM</title>
<style>
:root{
--bg:#0d0f13; --panel:#151a22; --panel2:#1b222c; --line:#2b323e;
--fg:#e8eef7; --dim:#93a1b5; --accent:#4aa3ff; --ok:#3ddc97; --warn:#ffb454;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);
font:14px/1.6 "Microsoft YaHei","PingFang SC",system-ui,-apple-system,Segoe UI,sans-serif;
padding:28px 20px 60px}
.wrap{max-width:1080px;margin:0 auto}
h1{margin:0 0 4px;font-size:22px;letter-spacing:.5px}
h1 small{color:var(--dim);font-weight:400;font-size:13px;letter-spacing:0}
.sub{color:var(--dim);font-size:13px;margin:0 0 18px}
.cards{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 20px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:10px;
padding:10px 16px;min-width:132px}
.card b{display:block;font-size:20px;color:var(--accent)}
.card span{font-size:12px;color:var(--dim)}
.card.amber b{color:var(--warn)}
h2{font-size:15px;margin:26px 0 10px;padding-left:10px;border-left:3px solid var(--accent)}
h2.muted{border-left-color:var(--line);color:var(--dim)}
table{width:100%;border-collapse:collapse;background:var(--panel);
border:1px solid var(--line);border-radius:10px;overflow:hidden}
th,td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
th{background:var(--panel2);color:var(--dim);font-weight:600;font-size:12px;
letter-spacing:.6px;white-space:nowrap}
tbody tr:hover{background:#1a212c}
tbody tr:last-child td{border-bottom:none}
td.id b{color:var(--accent);font-size:15px}
td.num{text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap}
small{color:var(--dim)}
.chip{display:inline-block;padding:1px 7px;border-radius:20px;font-size:11px;
border:1px solid var(--line);color:var(--dim);margin-left:6px}
a.buy{display:inline-block;padding:4px 12px;border-radius:6px;text-decoration:none;
background:#2b3a52;border:1px solid #3d5a80;color:#cfe4ff;
font-size:12px;white-space:nowrap;transition:.15s}
a.buy:hover{background:var(--accent);color:#04121f;border-color:var(--accent)}
tr.base{opacity:.5}
tr.base td.id b{color:var(--dim)}
.tag-skip{color:var(--warn);font-size:12px}
.foot{margin-top:22px;color:var(--dim);font-size:12px;line-height:1.9}
.foot code{background:var(--panel2);border:1px solid var(--line);border-radius:4px;
padding:1px 5px;color:#cfe4ff}
</style>
</head>
<body>
<div class="wrap">
<h1>机器人手臂 · 螺丝采购清单 <small>(BOM · 淘宝搜索直链)</small></h1>
<p class="sub">数据源:<b>docs/screws.json</b> | 底座 P02 相关紧固件按要求本次暂不采购</p>
<div class="cards" id="cards"></div>
<h2>需采购紧固件(S01 ~ S06、S09)</h2>
<table>
<thead><tr>
<th>编号</th><th>规格</th><th>头型</th><th>数量</th><th>位置 / 用途</th>
<th>备注</th><th>淘宝链接</th>
</tr></thead>
<tbody id="tbBuy"></tbody>
</table>
<h2 class="muted">底座紧固件(本次暂不采购)</h2>
<table>
<thead><tr>
<th>编号</th><th>规格</th><th>头型</th><th>数量</th><th>位置 / 用途</th>
<th>备注</th><th>淘宝链接</th>
</tr></thead>
<tbody id="tbSkip"></tbody>
</table>
<p class="foot">
链接为淘宝<b>搜索</b>直链(关键词已按规格/头型/材质预置),点击后可在搜索结果中自行比价选店。<br>
建议关键词补充:结构件优先选 <code>304 不锈钢</code> 或 <code>12.9 级发黑</code>;M2/M3 小规格建议含 <code>十字/内六角</code> 配套扳手。<br>
备注中的螺母/垫圈需与螺钉一并下单(S05 需 M4 螺母 4 枚)。
</p>
</div>
<script>
/* 唯一事实源:docs/screws.json 的规格 / 头型 / 数量 / 位置 / 备注 */
const ROWS = [
{id:'S01', size:'M2x10', spec:'M2 × 10', head:'圆柱头内六角', qty:18,
pos:'J1~J6 输出毂:P04/P05/P06/P07/P08/P09 各 3 颗',
note:'Ø2.8 通孔 + Ø5.6 沉孔,BCD 29(3 孔均布)', base:false},
{id:'S02', size:'M3x10', spec:'M3 × 10', head:'圆柱头内六角', qty:20,
pos:'P04/P05/P06/P07/P08 各 4 颗 → 下级电机尾端面',
note:'Ø2.8 通孔 + Ø5.5 沉孔(深 4mm)', base:false},
{id:'S03', size:'M3x16', spec:'M3 × 16', head:'沉头内六角', qty:4,
pos:'P03 后置重载法兰 → M1 电机尾端面',
note:'Ø3.4 通孔 + Ø6.5 沉孔,轴向锁死防拉脱', base:false},
{id:'S04', size:'M3x8', spec:'M3 × 8', head:'沉头内六角', qty:4,
pos:'P03 前置止脱锁紧法兰 → M1 电机前端面',
note:'Ø3.2 通孔 + Ø6.0 沉孔,BCD 55', base:false},
{id:'S05', size:'M4x25', spec:'M4 × 25', head:'圆柱头内六角', qty:4,
pos:'P01 立柱分段对锁:A-B 缝 2 颗 + B-C 缝 2 颗',
note:'Ø4.4 通孔,非对称偏心孔位防反装', base:false,
extra:{label:'M4 螺母 ×4', q:'M4 六角螺母 304不锈钢'}},
{id:'S06', size:'M4x16', spec:'M4 × 16', head:'沉头内六角', qty:4,
pos:'P09 末端工具法兰 → 末端工具/夹爪',
note:'Ø3.7 通孔 + Ø7.0 沉孔(深 4mm),4 孔分布圆 R20', base:false},
{id:'S09', size:'M5x35', spec:'M5 × 35', head:'圆柱头内六角', qty:4,
pos:'P03 肩吊臂安装台 → P01_C 立柱顶面',
note:'Ø5.5 通孔,穿过 15mm 凸台旋入立柱 20mm', base:false},
/* —— 底座 P02 相关,本次暂不采购 —— */
{id:'S07', size:'M5x25', spec:'M5 × 25', head:'圆柱头内六角', qty:4,
pos:'P02 底座中核心 → P01 立柱底部榫头',
note:'Ø5.5 通孔 + Ø10 沉孔(深 6mm)', base:true},
{id:'S08', size:'M5x25', spec:'M5 × 25', head:'圆柱头内六角', qty:4,
pos:'P02 前/后力臂 → 中核心:前臂 2 颗 + 后臂 2 颗',
note:'Ø5.5 通孔 + Ø10 沉孔;需另配 M5 六角螺母 4 枚', base:true},
{id:'S10', size:'M6x35', spec:'M6 × 35', head:'外六角', qty:6,
pos:'底座 6 组 28×7 紧固腰槽 → 工作台/桌面',
note:'需另配 M6 螺母 + 平垫圈各 6(建议加弹垫防松)', base:true},
];
const tb = (q) => 'https://s.taobao.com/search?q=' + encodeURIComponent(q);
const kw = (r) => r.size + ' 内六角' + (r.head.indexOf('沉头') === 0 ? '沉头' : '圆柱头') + '螺丝 304不锈钢';
const buy = q => '<a class="buy" target="_blank" rel="noopener" href="' + tb(q) + '">搜淘宝 ↗</a>';
function row(r) {
const tr = document.createElement('tr');
if (r.base) tr.className = 'base';
tr.innerHTML =
'<td class="id"><b>' + r.id + '</b></td>' +
'<td>' + r.spec + '</td>' +
'<td>' + r.head + (r.head.indexOf('外六角') === 0 ? '<span class="chip">需扳手</span>' : '') + '</td>' +
'<td class="num">' + r.qty + '</td>' +
'<td>' + r.pos + '</td>' +
'<td><small>' + r.note + '</small></td>' +
'<td>' + (r.base
? '<span class="tag-skip">暂不采购</span>'
: buy(kw(r)) + (r.extra ? '<br>' + buy(r.extra.q) + ' <small>' + r.extra.label + '</small>' : '')) +
'</td>';
return tr;
}
const tbBuy = document.getElementById('tbBuy');
const tbSkip = document.getElementById('tbSkip');
let nBuy = 0, nSkip = 0;
for (const r of ROWS) (r.base ? (nSkip += r.qty, tbSkip) : (nBuy += r.qty, tbBuy)).appendChild(row(r));
document.getElementById('cards').innerHTML =
'<div class="card"><b>' + ROWS.filter(r => !r.base).length + '</b><span>需采购规格数</span></div>' +
'<div class="card"><b>' + nBuy + '</b><span>需采购螺钉总数</span></div>' +
'<div class="card amber"><b>' + ROWS.filter(r => r.base).length + '</b><span>暂不采购规格数</span></div>' +
'<div class="card amber"><b>' + nSkip + '</b><span>暂不采购螺钉数</span></div>';
</script>
</body>
</html>