Files
Robot_Arm/线束走线与总线拓扑设计方案.html
T
cbb c754521bde feat(arm): 线束走线可视化落地,并修复承压面盒切误伤底壁
- 查看器新增线束/走线指示系统(4芯主干、电机出线分支、过关节缓冲环、T接小板),
  配套《线束走线与总线拓扑设计方案》文档与 src/test_harness_collision.py 干涉校验
- 取消 P04/P06/P07/P08 的敞口侧定位环盒切(俯仰关节局部坐标使切刀上侵底壁 3mm,
  平白造出 3x6.1mm 缺角),底壁补齐;盒切仅保留原本专用的 P05(M3),开关改名 M3_FENCE_OPEN_CUT
- 3MF 基准 profile(537 键)从手作原件抽出固化到 docs/bambu_profile_reference.json,
  导出链路不再依赖 out/ 二进制;P01_A 也改由当前模型生成,原件备份进 .bak/
- strength.json、BOM、screws、截图与三份查看器 HTML 同步重生成
2026-10-07 19:08:47 +08:00

600 lines
38 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.0">
<title>机械臂线束走向与总线电气示意图</title>
<script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
<style>
.tab-btn.active {
background-color: #3b82f6;
color: #ffffff;
border-color: transparent;
}
.hover-card:hover {
filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}
</style>
</head>
<body class="bg-slate-950 text-slate-100 antialiased p-3 sm:p-5 font-sans min-h-screen">
<div class="max-w-5xl mx-auto bg-slate-900 text-slate-100 border border-slate-800 rounded-2xl shadow-2xl overflow-hidden">
<!-- Header -->
<div class="p-5 border-b border-slate-800 bg-slate-800/40 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
<div>
<div class="flex items-center gap-2">
<span class="inline-block w-3 h-3 rounded-full bg-emerald-500 animate-pulse"></span>
<h1 class="text-lg sm:text-xl font-bold tracking-tight text-white">6自由度机械臂线束合理走线与总线拓扑设计方案</h1>
</div>
<p class="text-xs sm:text-sm text-slate-400 mt-1">
针对圆形 PCBA 侧孔出线、4芯混合线缆(2×CAN + 2×电源)的机械走线与电气互联全景示意
</p>
</div>
<!-- Navigation Tabs -->
<div class="flex items-center gap-1.5 p-1 bg-slate-950 border border-slate-800 rounded-xl text-xs sm:text-sm">
<button onclick="setTab('arm')" id="tab-arm" class="tab-btn active px-3 py-1.5 rounded-lg font-medium transition-all">
🦾 机械走线路径
</button>
<button onclick="setTab('bus')" id="tab-bus" class="tab-btn px-3 py-1.5 rounded-lg font-medium transition-all text-slate-400 hover:text-white">
🔌 总线拓扑架构
</button>
<button onclick="setTab('motor')" id="tab-motor" class="tab-btn px-3 py-1.5 rounded-lg font-medium transition-all text-slate-400 hover:text-white">
⚙️ 电机座孔开槽
</button>
<button onclick="setTab('specs')" id="tab-specs" class="tab-btn px-3 py-1.5 rounded-lg font-medium transition-all text-slate-400 hover:text-white">
📋 选型与规范
</button>
</div>
</div>
<!-- Content Sections -->
<div class="p-4 sm:p-6 space-y-6">
<!-- ================= TAB 1: 机械臂走线路径 ================= -->
<div id="content-arm" class="space-y-4">
<div class="flex items-center justify-between">
<div class="text-xs sm:text-sm font-semibold flex items-center gap-2">
<span class="px-2 py-0.5 rounded bg-blue-500/10 text-blue-400 border border-blue-500/20">构件拓扑与关节过线</span>
<span class="text-slate-300">贯通主干暗管 + 跨关节柔性缓冲环(Service Loop)</span>
</div>
<div class="flex items-center gap-3 text-xs text-slate-400 hidden md:flex">
<span class="flex items-center gap-1"><span class="w-2.5 h-2.5 rounded-full bg-amber-500"></span>4芯主干总线</span>
<span class="flex items-center gap-1"><span class="w-2.5 h-2.5 rounded-full bg-cyan-400"></span>俯仰U型弯折(J2/J4/J5)</span>
<span class="flex items-center gap-1"><span class="w-2.5 h-2.5 rounded-full bg-purple-400"></span>自转螺旋盘簧(J1/J3/J6)</span>
</div>
</div>
<!-- SVG 走线图 -->
<div class="w-full bg-slate-950 border border-slate-800 rounded-xl p-3 sm:p-5 flex justify-center items-center overflow-x-auto">
<svg viewBox="0 0 950 540" class="w-full max-w-[950px] select-none" style="min-width: 700px;">
<defs>
<linearGradient id="trunkGrad" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#f59e0b" />
<stop offset="100%" stop-color="#ef4444" />
</linearGradient>
<linearGradient id="linkBg" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#334155" stop-opacity="0.25" />
<stop offset="100%" stop-color="#1e293b" stop-opacity="0.45" />
</linearGradient>
<filter id="glow" x="-20%" y="-20%" width="140%" height="140%">
<feGaussianBlur stdDeviation="3" result="glow" />
<feComposite in="SourceGraphic" in2="glow" operator="over" />
</filter>
</defs>
<!-- Background Grid Lines for Scale -->
<g stroke="#334155" stroke-opacity="0.2" stroke-width="1">
<line x1="50" y1="80" x2="900" y2="80" />
<line x1="50" y1="180" x2="900" y2="180" />
<line x1="50" y1="280" x2="900" y2="280" />
<line x1="50" y1="380" x2="900" y2="380" />
<line x1="50" y1="480" x2="900" y2="480" />
</g>
<!-- 1. BASE / FIXTURE (P01 立柱) -->
<g>
<rect x="70" y="360" width="100" height="150" rx="8" fill="url(#linkBg)" stroke="#64748b" stroke-width="1.5" />
<text x="120" y="445" font-size="13" font-weight="bold" fill="#e2e8f0" text-anchor="middle">P01 立柱</text>
<text x="120" y="465" font-size="11" fill="#94a3b8" text-anchor="middle">内部立柱走线管</text>
<!-- Controller Box -->
<rect x="80" y="480" width="80" height="24" rx="4" fill="#0284c7" fill-opacity="0.3" stroke="#0284c7" stroke-width="1" />
<text x="120" y="496" font-size="10" font-weight="bold" fill="#38bdf8" text-anchor="middle">主控 / 供电基座</text>
</g>
<!-- 2. P03 肩吊臂 & M1 (J1 轴向: +X) -->
<g>
<path d="M 120 360 L 120 220 L 210 220 L 210 280 L 150 280 Z" fill="url(#linkBg)" stroke="#64748b" stroke-width="1.5" />
<circle cx="170" cy="245" r="28" fill="#1e293b" stroke="#f59e0b" stroke-width="2" stroke-dasharray="3,3" />
<text x="170" y="242" font-size="12" font-weight="bold" fill="#fbbf24" text-anchor="middle">M1 电机</text>
<text x="170" y="258" font-size="9" fill="#94a3b8" text-anchor="middle">J1 肩回转(+X)</text>
<rect x="190" y="210" width="45" height="18" rx="4" fill="#8b5cf6" fill-opacity="0.3" stroke="#8b5cf6" />
<text x="212" y="223" font-size="10" fill="#c084fc" text-anchor="middle">T接板①</text>
</g>
<!-- J1 -> J2 扭转盘簧走线过渡 -->
<g>
<path d="M 170 217 C 220 180, 260 190, 290 230" fill="none" stroke="#c084fc" stroke-width="3" stroke-dasharray="4,2" />
<text x="235" y="195" font-size="10" fill="#c084fc" font-weight="bold" text-anchor="middle">J1 螺旋扭转段 (80mm)</text>
</g>
<!-- 3. P04 肩叉 & M2 (J2 俯仰: +Y) -->
<g>
<rect x="290" y="200" width="105" height="150" rx="10" fill="url(#linkBg)" stroke="#64748b" stroke-width="1.5" />
<text x="342" y="222" font-size="13" font-weight="bold" fill="#e2e8f0" text-anchor="middle">P04 肩叉</text>
<!-- P04 减重槽线管 -->
<rect x="302" y="235" width="30" height="95" rx="5" fill="#0f172a" stroke="#38bdf8" stroke-width="1" stroke-dasharray="2,2" />
<text x="317" y="285" font-size="9" fill="#38bdf8" text-anchor="middle" transform="rotate(-90 317 285)">立柱减重槽暗管</text>
<!-- M2 电机 -->
<circle cx="360" cy="285" r="26" fill="#1e293b" stroke="#f59e0b" stroke-width="2" />
<text x="360" y="282" font-size="11" font-weight="bold" fill="#fbbf24" text-anchor="middle">M2 电机</text>
<text x="360" y="297" font-size="9" fill="#94a3b8" text-anchor="middle">J2 肩俯仰</text>
<rect x="345" y="325" width="45" height="18" rx="4" fill="#8b5cf6" fill-opacity="0.3" stroke="#8b5cf6" />
<text x="367" y="338" font-size="10" fill="#c084fc" text-anchor="middle">T接板②</text>
</g>
<!-- J2 -> J3 过关节 U 型弯曲 (Service Loop) -->
<g>
<path d="M 370 345 C 385 410, 435 410, 445 350" fill="none" stroke="#38bdf8" stroke-width="3" filter="url(#glow)" />
<text x="410" y="420" font-size="10" fill="#38bdf8" font-weight="bold" text-anchor="middle">J2 外部 U 型弯 (R≥25mm)</text>
</g>
<!-- 4. P05 大臂旋转座 & M3 (J3 自转: -Z) -->
<g>
<rect x="430" y="190" width="95" height="150" rx="10" fill="url(#linkBg)" stroke="#64748b" stroke-width="1.5" />
<text x="477" y="212" font-size="13" font-weight="bold" fill="#e2e8f0" text-anchor="middle">P05 旋转座</text>
<!-- M3 电机 -->
<circle cx="477" cy="270" r="26" fill="#1e293b" stroke="#f59e0b" stroke-width="2" />
<text x="477" y="267" font-size="11" font-weight="bold" fill="#fbbf24" text-anchor="middle">M3 电机</text>
<text x="477" y="282" font-size="9" fill="#94a3b8" text-anchor="middle">J3 自转(-Z)</text>
<rect x="455" y="305" width="45" height="18" rx="4" fill="#8b5cf6" fill-opacity="0.3" stroke="#8b5cf6" />
<text x="477" y="318" font-size="10" fill="#c084fc" text-anchor="middle">T接板③</text>
</g>
<!-- J3 -> J4 螺旋盘簧扭转段 -->
<g>
<path d="M 477 325 C 500 355, 535 345, 555 310 C 570 280, 560 250, 580 230" fill="none" stroke="#c084fc" stroke-width="3" stroke-dasharray="4,2" />
<text x="540" y="375" font-size="10" fill="#c084fc" font-weight="bold" text-anchor="middle">J3 盘簧盘旋段 (100mm)</text>
</g>
<!-- 5. P06 大臂骨架 & M4 (J4 肘俯仰: +Y) -->
<g>
<path d="M 570 180 L 680 180 L 670 330 L 580 330 Z" fill="url(#linkBg)" stroke="#64748b" stroke-width="1.5" />
<text x="625" y="205" font-size="13" font-weight="bold" fill="#e2e8f0" text-anchor="middle">P06 大臂骨架</text>
<!-- 工字背脊走线凹槽 -->
<rect x="600" y="220" width="50" height="30" rx="4" fill="#0f172a" stroke="#38bdf8" stroke-width="1" stroke-dasharray="2,2" />
<text x="625" y="238" font-size="9" fill="#38bdf8" text-anchor="middle">工字背脊线槽</text>
<!-- M4 肘电机 -->
<circle cx="630" cy="290" r="25" fill="#1e293b" stroke="#f59e0b" stroke-width="2" />
<text x="630" y="287" font-size="11" font-weight="bold" fill="#fbbf24" text-anchor="middle">M4 电机</text>
<text x="630" y="302" font-size="9" fill="#94a3b8" text-anchor="middle">J4 肘俯仰</text>
<rect x="645" y="325" width="45" height="18" rx="4" fill="#8b5cf6" fill-opacity="0.3" stroke="#8b5cf6" />
<text x="667" y="338" font-size="10" fill="#c084fc" text-anchor="middle">T接板④</text>
</g>
<!-- J4 -> J5 肘部 U 型弯 -->
<g>
<path d="M 670 345 C 685 410, 725 410, 735 345" fill="none" stroke="#38bdf8" stroke-width="3" filter="url(#glow)" />
<text x="705" y="420" font-size="10" fill="#38bdf8" font-weight="bold" text-anchor="middle">J4 肘部 U 型弯</text>
</g>
<!-- 6. P07 小臂骨架 & M5 (J5 腕俯仰: +Y) -->
<g>
<rect x="720" y="190" width="85" height="145" rx="10" fill="url(#linkBg)" stroke="#64748b" stroke-width="1.5" />
<text x="762" y="212" font-size="13" font-weight="bold" fill="#e2e8f0" text-anchor="middle">P07 小臂</text>
<!-- P07 顶板减重槽 -->
<rect x="732" y="225" width="22" height="50" rx="4" fill="#0f172a" stroke="#38bdf8" stroke-width="1" stroke-dasharray="2,2" />
<text x="743" y="255" font-size="8" fill="#38bdf8" text-anchor="middle" transform="rotate(-90 743 255)">顶板减重槽</text>
<!-- M5 电机 -->
<circle cx="765" cy="290" r="22" fill="#1e293b" stroke="#f59e0b" stroke-width="2" />
<text x="765" y="287" font-size="10" font-weight="bold" fill="#fbbf24" text-anchor="middle">M5 电机</text>
<text x="765" y="301" font-size="8" fill="#94a3b8" text-anchor="middle">J5 腕俯仰</text>
<rect x="740" y="325" width="45" height="18" rx="4" fill="#8b5cf6" fill-opacity="0.3" stroke="#8b5cf6" />
<text x="762" y="338" font-size="10" fill="#c084fc" text-anchor="middle">T接板⑤</text>
</g>
<!-- J5 -> J6 弯折走线 -->
<g>
<path d="M 780 340 C 795 370, 815 370, 825 330" fill="none" stroke="#38bdf8" stroke-width="2.5" />
</g>
<!-- 7. P08 腕座 & M6 (J6 腕自转: -Z) -->
<g>
<rect x="820" y="190" width="85" height="135" rx="10" fill="url(#linkBg)" stroke="#64748b" stroke-width="1.5" />
<text x="862" y="212" font-size="13" font-weight="bold" fill="#e2e8f0" text-anchor="middle">P08 腕座</text>
<!-- M6 电机 -->
<circle cx="862" cy="265" r="22" fill="#1e293b" stroke="#f59e0b" stroke-width="2" />
<text x="862" y="262" font-size="10" font-weight="bold" fill="#fbbf24" text-anchor="middle">M6 电机</text>
<text x="862" y="276" font-size="8" fill="#94a3b8" text-anchor="middle">J6 腕自转(-Z)</text>
<!-- 终端电阻标记 -->
<rect x="840" y="300" width="45" height="20" rx="4" fill="#ef4444" fill-opacity="0.25" stroke="#ef4444" stroke-width="1.5" />
<text x="862" y="314" font-size="9" font-weight="bold" fill="#f87171" text-anchor="middle">120Ω 终端</text>
</g>
<!-- P09 工具法兰 -->
<g>
<rect x="835" y="145" width="55" height="25" rx="5" fill="#475569" stroke="#94a3b8" />
<text x="862" y="161" font-size="10" fill="#f8fafc" text-anchor="middle">P09 工具端</text>
</g>
<!-- 贯穿全程的主干总线 -->
<g>
<path d="M 120 480 L 120 280 L 170 245" fill="none" stroke="url(#trunkGrad)" stroke-width="3" stroke-linecap="round" />
</g>
</svg>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-3 text-xs">
<div class="p-3 bg-slate-950 border border-slate-800 rounded-xl">
<div class="font-semibold text-amber-500 mb-1 flex items-center gap-1.5">
<span>●</span> 贯穿主干总线 (Trunk)
</div>
<p class="text-slate-400 leading-relaxed">
整臂仅需一条 4 芯耐折弯拖链电缆贯穿始终,避免 6 组线并排拉扯造成的臃肿和过载阻力。
</p>
</div>
<div class="p-3 bg-slate-950 border border-slate-800 rounded-xl">
<div class="font-semibold text-cyan-400 mb-1 flex items-center gap-1.5">
<span>●</span> 俯仰关节 U 型缓冲 (J2/J4/J5)
</div>
<p class="text-slate-400 leading-relaxed">
线缆在旋转轴外侧留出半径 R≥25mm 的半圆弯曲环,关节转动只发生平面弯曲,严禁拉扯受力。
</p>
</div>
<div class="p-3 bg-slate-950 border border-slate-800 rounded-xl">
<div class="font-semibold text-purple-400 mb-1 flex items-center gap-1.5">
<span>●</span> 回转螺旋盘簧 (J1/J3/J6)
</div>
<p class="text-slate-400 leading-relaxed">
严禁短距离轴向拧麻花!沿圆柱外壁预留 80~100mm 螺旋环绕段,利用大范围扭转角吸收转动位移。
</p>
</div>
</div>
</div>
<!-- ================= TAB 2: 总线拓扑架构 ================= -->
<div id="content-bus" class="hidden space-y-4">
<div class="text-xs sm:text-sm font-semibold flex items-center gap-2">
<span class="px-2 py-0.5 rounded bg-purple-500/10 text-purple-400 border border-purple-500/20">CAN 通信与供电架构</span>
<span class="text-slate-300">手拉手主干总线 (Daisy-Chain) + 微型 T 型分接 (T-Tap)</span>
</div>
<!-- 电气连接原理 SVG -->
<div class="w-full bg-slate-950 border border-slate-800 rounded-xl p-4 sm:p-6 overflow-x-auto">
<svg viewBox="0 0 920 380" class="w-full max-w-[920px] select-none" style="min-width: 720px;">
<defs>
<filter id="shadow">
<feDropShadow dx="0" dy="2" stdDeviation="3" flood-opacity="0.2"/>
</filter>
</defs>
<!-- 4 根总线主干水平线 -->
<g stroke-width="3">
<!-- VCC 24V (Red) -->
<line x1="160" y1="80" x2="840" y2="80" stroke="#ef4444" />
<text x="100" y="85" font-size="12" font-weight="bold" fill="#ef4444">VCC (+24V)</text>
<!-- GND (Black/Gray) -->
<line x1="160" y1="120" x2="840" y2="120" stroke="#64748b" />
<text x="100" y="125" font-size="12" font-weight="bold" fill="#94a3b8">GND (电源地)</text>
<!-- CAN_H (Yellow) -->
<line x1="160" y1="160" x2="840" y2="160" stroke="#eab308" />
<text x="100" y="165" font-size="12" font-weight="bold" fill="#eab308">CAN_H</text>
<!-- CAN_L (Blue) -->
<line x1="160" y1="200" x2="840" y2="200" stroke="#3b82f6" />
<text x="100" y="205" font-size="12" font-weight="bold" fill="#3b82f6">CAN_L</text>
</g>
<!-- 主控端 (左侧) + 始端 120Ω 电阻 -->
<g>
<rect x="20" y="60" width="70" height="160" rx="8" fill="#1e293b" stroke="#0284c7" stroke-width="1.5" />
<text x="55" y="135" font-size="11" font-weight="bold" fill="#38bdf8" text-anchor="middle">主控 / 驱动板</text>
<text x="55" y="152" font-size="9" fill="#94a3b8" text-anchor="middle">24V 供电</text>
<!-- 始端 120Ω 电阻 -->
<line x1="160" y1="160" x2="160" y2="200" stroke="#eab308" stroke-width="2" />
<rect x="145" y="170" width="30" height="20" rx="3" fill="#0f172a" stroke="#eab308" stroke-width="1.5" />
<text x="160" y="184" font-size="9" font-weight="bold" fill="#eab308" text-anchor="middle">120Ω</text>
</g>
<!-- 末端 (右侧) + 终端 120Ω 电阻 -->
<g>
<line x1="840" y1="160" x2="840" y2="200" stroke="#ef4444" stroke-width="2" />
<rect x="825" y="170" width="30" height="20" rx="3" fill="#0f172a" stroke="#ef4444" stroke-width="1.5" />
<text x="840" y="184" font-size="9" font-weight="bold" fill="#f87171" text-anchor="middle">120Ω</text>
<text x="840" y="215" font-size="9" fill="#f87171" text-anchor="middle">末端电阻</text>
</g>
<!-- 6 个节点 T 型引出分支 (Node 1 to Node 6) -->
<!-- 节点 1: M1 -->
<g transform="translate(210, 0)">
<circle cx="20" cy="80" r="4" fill="#ef4444" /><circle cx="20" cy="120" r="4" fill="#64748b" />
<circle cx="20" cy="160" r="4" fill="#eab308" /><circle cx="20" cy="200" r="4" fill="#3b82f6" />
<line x1="20" y1="80" x2="20" y2="240" stroke="#f59e0b" stroke-width="2" stroke-dasharray="2,2" />
<rect x="0" y="240" width="40" height="22" rx="4" fill="#8b5cf6" fill-opacity="0.2" stroke="#8b5cf6" stroke-width="1" />
<text x="20" y="255" font-size="9" fill="#c084fc" text-anchor="middle">T接板</text>
<line x1="20" y1="262" x2="20" y2="290" stroke="#10b981" stroke-width="3" />
<rect x="-10" y="290" width="60" height="55" rx="6" fill="#1e293b" stroke="#10b981" stroke-width="1.5" filter="url(#shadow)" />
<text x="20" y="312" font-size="11" font-weight="bold" fill="#34d399" text-anchor="middle">M1 电机</text>
<text x="20" y="328" font-size="9" fill="#94a3b8" text-anchor="middle">圆形PCBA</text>
</g>
<!-- 节点 2: M2 -->
<g transform="translate(320, 0)">
<circle cx="20" cy="80" r="4" fill="#ef4444" /><circle cx="20" cy="120" r="4" fill="#64748b" />
<circle cx="20" cy="160" r="4" fill="#eab308" /><circle cx="20" cy="200" r="4" fill="#3b82f6" />
<line x1="20" y1="80" x2="20" y2="240" stroke="#f59e0b" stroke-width="2" stroke-dasharray="2,2" />
<rect x="0" y="240" width="40" height="22" rx="4" fill="#8b5cf6" fill-opacity="0.2" stroke="#8b5cf6" stroke-width="1" />
<text x="20" y="255" font-size="9" fill="#c084fc" text-anchor="middle">T接板</text>
<line x1="20" y1="262" x2="20" y2="290" stroke="#10b981" stroke-width="3" />
<rect x="-10" y="290" width="60" height="55" rx="6" fill="#1e293b" stroke="#10b981" stroke-width="1.5" filter="url(#shadow)" />
<text x="20" y="312" font-size="11" font-weight="bold" fill="#34d399" text-anchor="middle">M2 电机</text>
<text x="20" y="328" font-size="9" fill="#94a3b8" text-anchor="middle">圆形PCBA</text>
</g>
<!-- 节点 3: M3 -->
<g transform="translate(430, 0)">
<circle cx="20" cy="80" r="4" fill="#ef4444" /><circle cx="20" cy="120" r="4" fill="#64748b" />
<circle cx="20" cy="160" r="4" fill="#eab308" /><circle cx="20" cy="200" r="4" fill="#3b82f6" />
<line x1="20" y1="80" x2="20" y2="240" stroke="#f59e0b" stroke-width="2" stroke-dasharray="2,2" />
<rect x="0" y="240" width="40" height="22" rx="4" fill="#8b5cf6" fill-opacity="0.2" stroke="#8b5cf6" stroke-width="1" />
<text x="20" y="255" font-size="9" fill="#c084fc" text-anchor="middle">T接板</text>
<line x1="20" y1="262" x2="20" y2="290" stroke="#10b981" stroke-width="3" />
<rect x="-10" y="290" width="60" height="55" rx="6" fill="#1e293b" stroke="#10b981" stroke-width="1.5" filter="url(#shadow)" />
<text x="20" y="312" font-size="11" font-weight="bold" fill="#34d399" text-anchor="middle">M3 电机</text>
<text x="20" y="328" font-size="9" fill="#94a3b8" text-anchor="middle">圆形PCBA</text>
</g>
<!-- 节点 4: M4 -->
<g transform="translate(540, 0)">
<circle cx="20" cy="80" r="4" fill="#ef4444" /><circle cx="20" cy="120" r="4" fill="#64748b" />
<circle cx="20" cy="160" r="4" fill="#eab308" /><circle cx="20" cy="200" r="4" fill="#3b82f6" />
<line x1="20" y1="80" x2="20" y2="240" stroke="#f59e0b" stroke-width="2" stroke-dasharray="2,2" />
<rect x="0" y="240" width="40" height="22" rx="4" fill="#8b5cf6" fill-opacity="0.2" stroke="#8b5cf6" stroke-width="1" />
<text x="20" y="255" font-size="9" fill="#c084fc" text-anchor="middle">T接板</text>
<line x1="20" y1="262" x2="20" y2="290" stroke="#10b981" stroke-width="3" />
<rect x="-10" y="290" width="60" height="55" rx="6" fill="#1e293b" stroke="#10b981" stroke-width="1.5" filter="url(#shadow)" />
<text x="20" y="312" font-size="11" font-weight="bold" fill="#34d399" text-anchor="middle">M4 电机</text>
<text x="20" y="328" font-size="9" fill="#94a3b8" text-anchor="middle">圆形PCBA</text>
</g>
<!-- 节点 5: M5 -->
<g transform="translate(650, 0)">
<circle cx="20" cy="80" r="4" fill="#ef4444" /><circle cx="20" cy="120" r="4" fill="#64748b" />
<circle cx="20" cy="160" r="4" fill="#eab308" /><circle cx="20" cy="200" r="4" fill="#3b82f6" />
<line x1="20" y1="80" x2="20" y2="240" stroke="#f59e0b" stroke-width="2" stroke-dasharray="2,2" />
<rect x="0" y="240" width="40" height="22" rx="4" fill="#8b5cf6" fill-opacity="0.2" stroke="#8b5cf6" stroke-width="1" />
<text x="20" y="255" font-size="9" fill="#c084fc" text-anchor="middle">T接板</text>
<line x1="20" y1="262" x2="20" y2="290" stroke="#10b981" stroke-width="3" />
<rect x="-10" y="290" width="60" height="55" rx="6" fill="#1e293b" stroke="#10b981" stroke-width="1.5" filter="url(#shadow)" />
<text x="20" y="312" font-size="11" font-weight="bold" fill="#34d399" text-anchor="middle">M5 电机</text>
<text x="20" y="328" font-size="9" fill="#94a3b8" text-anchor="middle">圆形PCBA</text>
</g>
<!-- 节点 6: M6 (终端) -->
<g transform="translate(760, 0)">
<circle cx="20" cy="80" r="4" fill="#ef4444" /><circle cx="20" cy="120" r="4" fill="#64748b" />
<circle cx="20" cy="160" r="4" fill="#eab308" /><circle cx="20" cy="200" r="4" fill="#3b82f6" />
<line x1="20" y1="80" x2="20" y2="240" stroke="#f59e0b" stroke-width="2" stroke-dasharray="2,2" />
<rect x="0" y="240" width="40" height="22" rx="4" fill="#8b5cf6" fill-opacity="0.2" stroke="#8b5cf6" stroke-width="1" />
<text x="20" y="255" font-size="9" fill="#c084fc" text-anchor="middle">T接板</text>
<line x1="20" y1="262" x2="20" y2="290" stroke="#10b981" stroke-width="3" />
<rect x="-10" y="290" width="60" height="55" rx="6" fill="#1e293b" stroke="#10b981" stroke-width="1.5" filter="url(#shadow)" />
<text x="20" y="312" font-size="11" font-weight="bold" fill="#34d399" text-anchor="middle">M6 电机</text>
<text x="20" y="328" font-size="9" fill="#94a3b8" text-anchor="middle">圆形PCBA</text>
</g>
<!-- 标注:短分支说明 -->
<text x="310" y="278" font-size="10" fill="#34d399">电机尾线分支 Stub &lt; 50mm</text>
</svg>
</div>
<div class="p-4 bg-slate-800/40 border border-slate-800 rounded-xl text-xs space-y-2">
<div class="font-semibold text-sm text-slate-200">💡 为什么采用 T 型微型小板,而不是电机引出两组线?</div>
<p class="text-slate-400 leading-relaxed">
1. <strong>电机出线孔物理限制</strong>:电机模型实测引线孔仅 Ø4.0 mm,无法同时塞进两根 4 芯护套线。<br>
2. <strong>独立热插拔与快拆维护</strong>:如果采用纯串联手拉手,换中间一台电机必须剪断总线;有了 T 型接板,拔掉故障电机插头即可单独更换,主干线完全不受损。<br>
3. <strong>信号阻抗稳定</strong>:CAN 规范允许的 Stub 长度上限为 300mm,我们的电机尾线仅 50~80mm,完全处于安全无反射区间。
</p>
</div>
</div>
<!-- ================= TAB 3: 电机座孔开槽与构件改造 ================= -->
<div id="content-motor" class="hidden space-y-4">
<div class="text-xs sm:text-sm font-semibold flex items-center gap-2">
<span class="px-2 py-0.5 rounded bg-emerald-500/10 text-emerald-400 border border-emerald-500/20">3D打印构件改造清单</span>
<span class="text-slate-300">在电机座孔壁增加跑道型出线槽与双扎带固定扣</span>
</div>
<!-- 机械剖视示意 SVG -->
<div class="w-full bg-slate-950 border border-slate-800 rounded-xl p-4 sm:p-6 overflow-x-auto">
<svg viewBox="0 0 900 420" class="w-full max-w-[900px] select-none" style="min-width: 700px;">
<!-- 左侧:改前(目前被封死) -->
<g transform="translate(60, 30)">
<rect x="0" y="0" width="340" height="340" rx="12" fill="#1e293b" fill-opacity="0.3" stroke="#ef4444" stroke-width="1.5" stroke-dasharray="4,4" />
<text x="170" y="35" font-size="15" font-weight="bold" fill="#ef4444" text-anchor="middle">❌ 当前设计(线孔完全被封死)</text>
<!-- 座孔轮廓 (外壁 R35) -->
<circle cx="170" cy="180" r="110" fill="#334155" fill-opacity="0.3" stroke="#64748b" stroke-width="2" />
<!-- 电机轮廓 (R30) -->
<circle cx="170" cy="180" r="95" fill="#0f172a" stroke="#f59e0b" stroke-width="2" />
<!-- 圆形 PCBA (R22.5) -->
<circle cx="170" cy="180" r="68" fill="#065f46" stroke="#10b981" stroke-width="1.5" />
<text x="170" y="175" font-size="12" font-weight="bold" fill="#34d399" text-anchor="middle">圆形 PCBA</text>
<text x="170" y="195" font-size="10" fill="#94a3b8" text-anchor="middle">Ø45 mm 实测</text>
<!-- 实测出线孔 (第三象限) -->
<circle cx="95" cy="225" r="9" fill="#ef4444" stroke="#ffffff" stroke-width="1.5" />
<!-- 碰撞/堵死提示 -->
<path d="M 85 240 L 50 280" stroke="#ef4444" stroke-width="2" />
<rect x="15" y="280" width="120" height="35" rx="5" fill="#ef4444" fill-opacity="0.2" stroke="#ef4444" />
<text x="75" y="297" font-size="10" font-weight="bold" fill="#fca5a5" text-anchor="middle">8mm 打印件实心底壁</text>
<text x="75" y="310" font-size="9" fill="#fca5a5" text-anchor="middle">线束无任何出路!</text>
</g>
<!-- 右侧:改后(增设出线槽与扎带扣) -->
<g transform="translate(480, 30)">
<rect x="0" y="0" width="360" height="340" rx="12" fill="#1e293b" fill-opacity="0.3" stroke="#10b981" stroke-width="2" />
<text x="180" y="35" font-size="15" font-weight="bold" fill="#10b981" text-anchor="middle">✅ 改造方案(开设跑道型出线槽)</text>
<!-- 座孔外壁 -->
<circle cx="180" cy="180" r="110" fill="#334155" fill-opacity="0.3" stroke="#64748b" stroke-width="2" />
<!-- 电机 -->
<circle cx="180" cy="180" r="95" fill="#0f172a" stroke="#f59e0b" stroke-width="2" />
<!-- 圆形 PCBA -->
<circle cx="180" cy="180" r="68" fill="#065f46" stroke="#10b981" stroke-width="1.5" />
<text x="180" y="185" font-size="11" font-weight="bold" fill="#34d399" text-anchor="middle">PCBA</text>
<!-- 出线孔 -->
<circle cx="105" cy="225" r="9" fill="#10b981" stroke="#ffffff" stroke-width="1.5" />
<!-- 新增 8x14mm 跑道型缺口 (Relief Slot) -->
<path d="M 60 210 L 115 210 A 15 15 0 0 1 115 240 L 60 240 A 15 15 0 0 1 60 210 Z" fill="#0284c7" fill-opacity="0.4" stroke="#38bdf8" stroke-width="2" />
<text x="85" y="260" font-size="10" font-weight="bold" fill="#38bdf8" text-anchor="middle">8×14mm 跑道槽</text>
<!-- 4芯引出线 -->
<path d="M 105 225 C 70 225, 45 235, 30 270" fill="none" stroke="#f59e0b" stroke-width="4" stroke-linecap="round" />
<!-- 扎带固定扣 (Zip-tie mount) -->
<rect x="15" y="260" width="28" height="18" rx="3" fill="#334155" stroke="#facc15" stroke-width="1.5" />
<line x1="20" y1="269" x2="38" y2="269" stroke="#facc15" stroke-width="2" />
<text x="29" y="295" font-size="9" fill="#facc15" text-anchor="middle">扎带扣</text>
<!-- 引出到外部减重槽 -->
<path d="M 30 270 L 30 315" fill="none" stroke="#f59e0b" stroke-width="4" />
<text x="85" y="325" font-size="11" font-weight="bold" fill="#fbbf24">通向构件减重槽暗管 ➔</text>
</g>
</svg>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-3 text-xs">
<div class="p-3 bg-slate-950 border border-slate-800 rounded-xl space-y-1">
<span class="font-semibold text-blue-400">1. 修改 Joint.pocket 切削函数</span>
<p class="text-slate-400">
在电机座孔的第三象限(角度约 200°~240°),增加长 14mm、宽 8mm 的圆角矩形布尔掏槽,径向直接切通到外侧壁,让电机的出线孔露出。
</p>
</div>
<div class="p-3 bg-slate-950 border border-slate-800 rounded-xl space-y-1">
<span class="font-semibold text-amber-400">2. 增设扎带防拉扯沉孔 (Relief Mount)</span>
<p class="text-slate-400">
在出线槽出口 15mm 处,设置一对 2.5×3.5mm 的扎带穿线孔。将线缆牢牢捆扎在打印件本体上,杜绝因机械臂运动晃动而拉扯到电机内 PCBA 焊盘。
</p>
</div>
</div>
</div>
<!-- ================= TAB 4: 选型与工艺规范 ================= -->
<div id="content-specs" class="hidden space-y-4">
<div class="text-xs sm:text-sm font-semibold flex items-center gap-2">
<span class="px-2 py-0.5 rounded bg-amber-500/10 text-amber-500 border border-amber-500/20">工程实操指南</span>
<span class="text-slate-300">线缆规格、接插件选型与装配施工顺序建议</span>
</div>
<div class="overflow-x-auto border border-slate-800 rounded-xl">
<table class="w-full text-left text-xs sm:text-sm">
<thead class="bg-slate-800/40 border-b border-slate-800 text-slate-400">
<tr>
<th class="p-3">系统部件</th>
<th class="p-3">推荐规格 / 型号</th>
<th class="p-3">核心参数与技术要求</th>
<th class="p-3">安装注意要点</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-800">
<tr>
<td class="p-3 font-semibold text-amber-500">贯穿主干总线</td>
<td class="p-3 font-mono">4芯高柔拖链专用电缆</td>
<td class="p-3">耐折弯≥500万次,2×0.75mm²(电源) + 2×0.2mm²(双绞CAN)</td>
<td class="p-3 text-slate-400">线缆外皮套 PET 伸缩编织网管,防止与打印件边缘摩擦</td>
</tr>
<tr>
<td class="p-3 font-semibold text-emerald-400">电机分支引出线</td>
<td class="p-3 font-mono">特软硅胶线 20AWG/24AWG</td>
<td class="p-3">长度 60~80 mm,红黑电源(20AWG) + 黄蓝CAN(24AWG双绞)</td>
<td class="p-3 text-slate-400">根部点 704 硅橡胶或热熔胶加固,避免铜丝断在焊盘处</td>
</tr>
<tr>
<td class="p-3 font-semibold text-purple-400">接插件与T接端子</td>
<td class="p-3 font-mono">JST-GH 1.25mm 4P (带锁扣)</td>
<td class="p-3">额定电流 1.0A(信号) / 若大电流建议 XT30(电源)+GH(CAN)</td>
<td class="p-3 text-slate-400">机械臂运动震动大,严禁使用杜邦线或无锁扣的普通端子</td>
</tr>
<tr>
<td class="p-3 font-semibold text-red-400">CAN 终端电阻</td>
<td class="p-3 font-mono">120 Ω 贴片/色环金属膜电阻</td>
<td class="p-3">阻值 120Ω ±1%,功耗 1/8W 或 1/4W</td>
<td class="p-3 text-slate-400">只需 2 颗:主控端(M1旁)并联1颗,手腕末端(M6旁)并联1颗</td>
</tr>
<tr>
<td class="p-3 font-semibold text-cyan-400">关节过线保护套</td>
<td class="p-3 font-mono">阻燃 PET 伸缩编织网管 (Ø6~8mm)</td>
<td class="p-3">耐磨损、伸缩比 150%、两端套热缩管收口</td>
<td class="p-3 text-slate-400">穿过 J2/J4 铰链缝隙处,必须加套保护管,防止极限角度夹伤线皮</td>
</tr>
</tbody>
</table>
</div>
<div class="p-4 bg-slate-950 border border-slate-800 rounded-xl text-xs space-y-2">
<div class="font-semibold text-sm text-slate-200">🔧 推荐实操装配顺序</div>
<ol class="list-decimal list-inside space-y-1 text-slate-400 leading-relaxed">
<li><strong>焊线与胶封</strong>:在电机内部 PCBA 上焊接好 80mm 长、带 JST-GH 公头的 4 芯尾线,孔位出口处打 704 硅橡胶固线;</li>
<li><strong>电机入座</strong>:顺着新开的跑道槽将线束引出,将电机装入座孔,锁紧后端板与前端压盖;</li>
<li><strong>主干铺设</strong>:将 4 芯主干线从 P01 立柱自下而上穿入,依次走过 P04 立柱槽、P06 工字背、P07 顶板槽;</li>
<li><strong>节点对插</strong>:在各构件的减重槽内,将主干线上的 T 接小板与电机的 GH 接头对插,并用扎带紧固;</li>
<li><strong>行程实测与定型</strong>:手动将 J1~J6 掰动到正负极限角度,观察过关节处的 U 型环和盘簧段是否顺畅、有无受拉挤压,调整扎带固定点。</li>
</ol>
</div>
</div>
</div>
<!-- Footer Note -->
<div class="p-4 border-t border-slate-800 bg-slate-800/20 text-xs text-slate-400 flex justify-between items-center">
<span>💡 点击上方按钮可随时切换不同视角的图解与方案细节</span>
<span class="font-mono">Robot Arm v2.0 Cable Harness Guide</span>
</div>
</div>
<script>
function setTab(name) {
const tabs = ['arm', 'bus', 'motor', 'specs'];
tabs.forEach(t => {
const btn = document.getElementById('tab-' + t);
const content = document.getElementById('content-' + t);
if (t === name) {
btn.classList.add('active');
btn.classList.remove('text-slate-400');
content.classList.remove('hidden');
} else {
btn.classList.remove('active');
btn.classList.add('text-slate-400');
content.classList.add('hidden');
}
});
}
</script>
</body>
</html>