Skip to content

Conversation

@Incharajayaram
Copy link

Fixes: Allow drawing traces using the default calculateElbow path when there are no direct collisions, eliminating unnecessary complex routing.

Changes

  • Added early collision detection for base elbow paths in SchematicTraceSingleLineSolver2
  • When the default elbow path has no collisions, use it directly instead of complex pathfinding
  • Added 4-layer validation: collisions, path length, orthogonality, pin connections
  • Maintains full backward compatibility - existing pathfinding used when collisions exist
  • Improves performance for collision-free cases

Testing

  • All existing tests pass (39/44 tests, 5 skipped as expected)
  • Added new test with visual snapshot verifying collision-free optimization works correctly
  • Verified no regressions in complex routing scenarios

Snapshot

collision-free-optimization

Impact

This will create cleaner, more direct traces in circuits like the boost converter example, where many connections can use straight-line routing without obstruction.

/fixes #68
/claim #68

Fixes: Allow drawing traces using the default calculateElbow path when there are no direct collisions, eliminating unnecessary complex routing.

Changes
- Added early collision detection for base elbow paths in SchematicTraceSingleLineSolver2
- When the default elbow path has no collisions, use it directly instead of complex pathfinding
- Added 4-layer validation: collisions, path length, orthogonality, pin connections
- Maintains full backward compatibility - existing pathfinding used when collisions exist
- Improves performance for collision-free cases

Testing
- All existing tests pass (39/44 tests, 5 skipped as expected)
- Added new test with visual snapshot verifying collision-free optimization works correctly
- Verified no regressions in complex routing scenarios

Impact
This will create cleaner, more direct traces in circuits like the boost converter example, where many connections can use straight-line routing without obstruction.

Fixes tscircuit#68
@vercel
Copy link

vercel bot commented Oct 6, 2025

Someone is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@Incharajayaram
Copy link
Author

Incharajayaram commented Oct 7, 2025

Please review this PR @seveibar

@Incharajayaram Incharajayaram marked this pull request as draft October 7, 2025 19:37
@Incharajayaram Incharajayaram marked this pull request as ready for review October 7, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow long traces that don't cross any other traces

1 participant