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:
2026-04-05 00:28:58 -07:00
parent bde76ec959
commit 72acc5c8bb
2 changed files with 63 additions and 61 deletions
+7 -5
View File
@@ -724,13 +724,15 @@ def _render_cube_view_svg(view: ViewGraph, spec: dict) -> str:
)
# ── 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)
uh_half = ucie_size_mm * 0.3 # half-height for edge placement
uw_half = ucie_size_mm * 0.5
ucie_positions = {
"N": (cube_w / 2, ucie_size_mm / 2), # top center
"S": (cube_w / 2, cube_h - ucie_size_mm / 2), # bottom center
"W": (ucie_size_mm / 2, cube_h / 2), # left center
"E": (cube_w - ucie_size_mm / 2, cube_h / 2), # right center
"N": (cube_w / 2, uh_half), # flush top edge
"S": (cube_w / 2, cube_h - uh_half), # flush bottom edge
"W": (uh_half, cube_h / 2), # flush left edge
"E": (cube_w - uh_half, cube_h / 2), # flush right edge
}
# Collect UCIe connections per direction