Skip to content

Feature: Better Straight Wire Routing #501

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jandrec27
Copy link

Still a work in progress, but the idea is better wiring routing when drawing straight wires, similar to what's found in programs like Kicad.
I intend to implement a 90° and 45° corner mode, but right now, only 45° mode is implemented.
I did notice that some code for rounded corners still exists, which would probably work better with 90° corners.

AutoRouter.Demo.mp4

@jandrec27
Copy link
Author

Cleaned up some strays that made it into the commit

jandrec27 added 5 commits May 24, 2025 11:28
Simplified the implementation so that most of the logic is being done in WireInstance and GridHelper.
Completely removed changes to ChipInteraction Controller

Fixed some bugs with the initial implementation too
The router now turns on and off with the forceStraightWires flag
Also, the router is completely inactive when editing wires, which I believe is more practical
Finally, the router works from the first pin it's placed, originally, it would only work once a point on the wire has been placed down
Fixed an alignment issue where, when a wire is finished placing, it get's snapped to the target pin, this would result in a slight misalignment of the second to last point on the wire.
The fix now reroutes that point when finishing placement of a wire.

Removed 90 degree routing mode for now, until I am able to implement it later. Want to look at curved wires first.
Fixed a bug with routing when last point was connected to a pin
Releasing shift key returns wire to straight line mode
Re-implemented the curved wire bends from earlier versions
Just used Sebastian's existing function to do so.
Straight or Curved wires can be selected in the preferences menu
@jandrec27
Copy link
Author

Re-added the curved wires from older versions
Select-able from the preferences menu
image

Most of this commit revolves around setting up some things to change the direction in which wires attempt to terminate
The idea is to make it possible to change between wires ending on a vertical or horizontal line when being routed
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