Skip to content

Clip router SVG geometry to viewport bounds - #1

Merged
atvrager merged 1 commit into
mainfrom
fix/router-svg-clipping
Nov 14, 2026
Merged

atvrager merged 1 commit into
mainfrom
fix/router-svg-clipping

Conversation

@atvrager

Copy link
Copy Markdown
Owner

Summary

  • Clip M1 belts, M2 underground tunnels, and M3 fluid pipes in tools/showcase_svg.py to the 48x36 viewport box using Liang-Barsky clipping.
  • Add <clipPath> groups to the router viewport and both pipeline_placement.svg panels.
  • Extend 1-tile belt segments by 0.38 tiles along DIR_STEPS so short belts keep true travel direction.
  • Query machine and splitter footprints dynamically with entity_size() and add --refresh-svgs to tools/build_showcase_site.py.
  • Shorten the pipeline_placement.svg right panel title so it clears the green -79.2% HPWL badge.
  • Add strict SVG coordinate bounds and clipping regression tests in test/test_showcase_site.py.

Verification

  • bazel test //test:showcase_site_test //tools:ruff_test //tools:ty_test //tools:ste_lint_test
  • bazel build //site:pages_bundle
  • bazel test //... --build_tests_only --test_tag_filters=-science,-openroad,-requires-game-data

Clip belt, pipe, and tunnel segments in showcase_svg.py to the 48x36
viewport box. Wrap routed panels and placement panels in SVG clipPath
elements. Extend 1-tile belts along their travel vector and query
machine footprints dynamically. Remove duplicate reduction text that
overlaps the placement badge. Add coordinate bounds tests for all four
pipeline SVGs.
@atvrager
atvrager merged commit ec42d23 into main Nov 14, 2026
2 checks passed
@atvrager
atvrager deleted the fix/router-svg-clipping branch November 14, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant