Cube-view: UCIe flush against cube edges
UCIe position calculated with minimal inset (0.3 × size) to place components flush against cube boundary edges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+56
-56
@@ -241,62 +241,62 @@
|
|||||||
<text x="622" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
<text x="622" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
||||||
<polyline points="835,677 646,531 646,531" fill="none" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
<polyline points="835,677 646,531 646,531" fill="none" stroke="#10b981" stroke-width="1.5" opacity="0.6" stroke-dasharray="4,3"/>
|
||||||
<text x="751" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
<text x="751" y="604" font-family="monospace" font-size="6" fill="#10b98188">256GB/s</text>
|
||||||
<rect x="85" y="360" width="50" height="100" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
<rect x="65" y="360" width="50" height="100" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
||||||
<text x="110" y="357" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-W</text>
|
<text x="90" y="357" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-W</text>
|
||||||
<rect x="87" y="362" width="46" height="23" rx="2" fill="#818cf8" opacity="0.7"/>
|
<rect x="67" y="362" width="46" height="23" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
<text x="110" y="376" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
<text x="90" y="376" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
<polyline points="127,135 133,374 133,374" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
<polyline points="127,135 113,374 113,374" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="87" y="386" width="46" height="23" rx="2" fill="#a78bfa" opacity="0.7"/>
|
<rect x="67" y="386" width="46" height="23" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
<text x="110" y="400" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
<text x="90" y="400" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
<polyline points="127,260 133,398 133,398" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
<polyline points="127,260 113,398 113,398" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="87" y="410" width="46" height="23" rx="2" fill="#c084fc" opacity="0.7"/>
|
<rect x="67" y="410" width="46" height="23" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
<text x="110" y="424" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
<text x="90" y="424" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
<polyline points="127,560 133,422 133,422" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
<polyline points="127,560 113,422 113,422" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="87" y="434" width="46" height="23" rx="2" fill="#e879f9" opacity="0.7"/>
|
<rect x="67" y="434" width="46" height="23" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
<text x="110" y="448" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
<text x="90" y="448" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
<polyline points="127,685 133,446 133,446" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
<polyline points="127,685 113,446 113,446" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="435" y="85" width="100" height="50" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
<rect x="435" y="65" width="100" height="50" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
||||||
<text x="485" y="82" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-N</text>
|
<text x="485" y="62" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-N</text>
|
||||||
<rect x="437" y="87" width="23" height="46" rx="2" fill="#818cf8" opacity="0.7"/>
|
<rect x="437" y="67" width="23" height="46" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
<text x="448" y="113" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
<text x="448" y="93" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
<polyline points="135,127 448,133 448,133" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
<polyline points="135,127 448,113 448,113" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="461" y="87" width="23" height="46" rx="2" fill="#a78bfa" opacity="0.7"/>
|
<rect x="461" y="67" width="23" height="46" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
<text x="472" y="113" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
<text x="472" y="93" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
<polyline points="285,127 472,133 472,133" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
<polyline points="285,127 472,113 472,113" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="485" y="87" width="23" height="46" rx="2" fill="#c084fc" opacity="0.7"/>
|
<rect x="485" y="67" width="23" height="46" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
<text x="496" y="113" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
<text x="496" y="93" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
<polyline points="685,127 496,133 496,133" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
<polyline points="685,127 496,113 496,113" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="509" y="87" width="23" height="46" rx="2" fill="#e879f9" opacity="0.7"/>
|
<rect x="509" y="67" width="23" height="46" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
<text x="520" y="113" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
<text x="520" y="93" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
<polyline points="835,127 520,133 520,133" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
<polyline points="835,127 520,113 520,113" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="835" y="360" width="50" height="100" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
<rect x="855" y="360" width="50" height="100" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
||||||
<text x="860" y="357" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-E</text>
|
<text x="880" y="357" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-E</text>
|
||||||
<rect x="837" y="362" width="46" height="23" rx="2" fill="#818cf8" opacity="0.7"/>
|
<rect x="857" y="362" width="46" height="23" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
<text x="860" y="376" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
<text x="880" y="376" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
<polyline points="843,135 837,374 837,374" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
<polyline points="843,135 857,374 857,374" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="837" y="386" width="46" height="23" rx="2" fill="#a78bfa" opacity="0.7"/>
|
<rect x="857" y="386" width="46" height="23" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
<text x="860" y="400" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
<text x="880" y="400" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
<polyline points="843,260 837,398 837,398" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
<polyline points="843,260 857,398 857,398" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="837" y="410" width="46" height="23" rx="2" fill="#c084fc" opacity="0.7"/>
|
<rect x="857" y="410" width="46" height="23" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
<text x="860" y="424" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
<text x="880" y="424" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
<polyline points="843,560 837,422 837,422" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
<polyline points="843,560 857,422 857,422" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="837" y="434" width="46" height="23" rx="2" fill="#e879f9" opacity="0.7"/>
|
<rect x="857" y="434" width="46" height="23" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
<text x="860" y="448" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
<text x="880" y="448" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
<polyline points="843,685 837,446 837,446" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
<polyline points="843,685 857,446 857,446" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="435" y="685" width="100" height="50" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
<rect x="435" y="705" width="100" height="50" rx="3" fill="#1e1b4b" stroke="#8b5cf6" stroke-width="1.5" opacity="0.9"/>
|
||||||
<text x="485" y="682" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-S</text>
|
<text x="485" y="702" text-anchor="middle" font-family="monospace" font-size="7" font-weight="bold" fill="#8b5cf6">UCIe-S</text>
|
||||||
<rect x="437" y="687" width="23" height="46" rx="2" fill="#818cf8" opacity="0.7"/>
|
<rect x="437" y="707" width="23" height="46" rx="2" fill="#818cf8" opacity="0.7"/>
|
||||||
<text x="448" y="713" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
<text x="448" y="733" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c0</text>
|
||||||
<polyline points="135,693 448,687 448,687" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
<polyline points="135,693 448,707 448,707" fill="none" stroke="#818cf8" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="461" y="687" width="23" height="46" rx="2" fill="#a78bfa" opacity="0.7"/>
|
<rect x="461" y="707" width="23" height="46" rx="2" fill="#a78bfa" opacity="0.7"/>
|
||||||
<text x="472" y="713" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
<text x="472" y="733" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c1</text>
|
||||||
<polyline points="285,693 472,687 472,687" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
<polyline points="285,693 472,707 472,707" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="485" y="687" width="23" height="46" rx="2" fill="#c084fc" opacity="0.7"/>
|
<rect x="485" y="707" width="23" height="46" rx="2" fill="#c084fc" opacity="0.7"/>
|
||||||
<text x="496" y="713" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
<text x="496" y="733" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c2</text>
|
||||||
<polyline points="685,693 496,687 496,687" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
<polyline points="685,693 496,707 496,707" fill="none" stroke="#c084fc" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="509" y="687" width="23" height="46" rx="2" fill="#e879f9" opacity="0.7"/>
|
<rect x="509" y="707" width="23" height="46" rx="2" fill="#e879f9" opacity="0.7"/>
|
||||||
<text x="520" y="713" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
<text x="520" y="733" text-anchor="middle" font-family="monospace" font-size="5" fill="white">c3</text>
|
||||||
<polyline points="835,693 520,687 520,687" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
<polyline points="835,693 520,707 520,707" fill="none" stroke="#e879f9" stroke-width="1" opacity="0.5"/>
|
||||||
<rect x="60" y="865" width="10" height="10" rx="2" fill="#3b82f6" stroke="#475569" stroke-width="0.5"/>
|
<rect x="60" y="865" width="10" height="10" rx="2" fill="#3b82f6" stroke="#475569" stroke-width="0.5"/>
|
||||||
<text x="74" y="874" font-family="monospace" font-size="8" fill="#94a3b8">PE Router</text>
|
<text x="74" y="874" font-family="monospace" font-size="8" fill="#94a3b8">PE Router</text>
|
||||||
<rect x="147" y="865" width="10" height="10" rx="2" fill="#f59e0b" stroke="#475569" stroke-width="0.5"/>
|
<rect x="147" y="865" width="10" height="10" rx="2" fill="#f59e0b" stroke="#475569" stroke-width="0.5"/>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -724,13 +724,15 @@ def _render_cube_view_svg(view: ViewGraph, spec: dict) -> str:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# ── UCIe port components (position/size from topology.yaml) ──
|
# ── UCIe port components (position/size from topology.yaml) ──
|
||||||
# ucie_mm.size = 2.0mm, positions from _cube_local_positions
|
# ucie_mm.size = 2.0mm, positions at cube edges (flush)
|
||||||
ucie_size_mm = cube.get("geometry", {}).get("ucie_mm", {}).get("size", 2.0)
|
ucie_size_mm = cube.get("geometry", {}).get("ucie_mm", {}).get("size", 2.0)
|
||||||
|
uh_half = ucie_size_mm * 0.3 # half-height for edge placement
|
||||||
|
uw_half = ucie_size_mm * 0.5
|
||||||
ucie_positions = {
|
ucie_positions = {
|
||||||
"N": (cube_w / 2, ucie_size_mm / 2), # top center
|
"N": (cube_w / 2, uh_half), # flush top edge
|
||||||
"S": (cube_w / 2, cube_h - ucie_size_mm / 2), # bottom center
|
"S": (cube_w / 2, cube_h - uh_half), # flush bottom edge
|
||||||
"W": (ucie_size_mm / 2, cube_h / 2), # left center
|
"W": (uh_half, cube_h / 2), # flush left edge
|
||||||
"E": (cube_w - ucie_size_mm / 2, cube_h / 2), # right center
|
"E": (cube_w - uh_half, cube_h / 2), # flush right edge
|
||||||
}
|
}
|
||||||
|
|
||||||
# Collect UCIe connections per direction
|
# Collect UCIe connections per direction
|
||||||
|
|||||||
Reference in New Issue
Block a user