-
Notifications
You must be signed in to change notification settings - Fork 2
Add Sub-solvers to fix the gap problem #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The preview for this repo is broken by default https://rectdiff.tscircuit.com |
| * Maximizes board coverage by detecting uncovered areas and placing optimally-sized rectangles. | ||
| * | ||
| * ## How It Works | ||
| * 1. **Gap Detection**: Scans board to find uncovered rectangular regions, prioritizing larger gaps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever i see something like "scan", it's a hint that there's a very inefficient algorithm taking place- never iterate over X/Y coordinates because that is very expensive N^2 , this PR is massive so i'm not exactly sure how the scan works
|
@0hmX there is a big problem in that i can't understand the preview and the activeSubSolver isn't appearing so i don't know which phase is running
|
|
We really need to graphics-debug preview to work |
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |

How GapFillSubSolver Works
GapFillSubSolver operates as a post-processing cleanup algorithm that creates brand new rectangles to fill empty spaces left after the main RectDiff placement. It follows a four-stage process:
Fundamental Difference from RectDiff
RectDiff solves the routing problem - it places rectangles to enable electrical signal connections based on circuit topology and routing requirements from SimpleRouteJson input.
GapFillSubSolver solves the coverage problem - it maximizes board area utilization by filling leftover empty spaces with new rectangles, regardless of routing needs.
RectDiff creates rectangles for electrical functionality (routing paths), while GapFillSubSolver creates rectangles for geometric efficiency (space utilization). They serve complementary but entirely different purposes in the placement pipeline: connectivity versus coverage optimization.