Skip to content

New eulerian algorithm#743

Merged
eyal0 merged 2 commits into
pcb2gcode:masterfrom
eyal0:new_eulerian_algorithm
Dec 24, 2025
Merged

New eulerian algorithm#743
eyal0 merged 2 commits into
pcb2gcode:masterfrom
eyal0:new_eulerian_algorithm

Conversation

@eyal0

@eyal0 eyal0 commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@eyal0
eyal0 force-pushed the new_eulerian_algorithm branch from 76e5160 to 92eac85 Compare December 18, 2025 21:18
@coveralls

coveralls commented Dec 22, 2025

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 60.019% (+0.6%) from 59.383%
when pulling d824e19 on eyal0:new_eulerian_algorithm
into 498a926 on pcb2gcode:master.

@eyal0
eyal0 force-pushed the new_eulerian_algorithm branch 3 times, most recently from 0ffad30 to 92de55a Compare December 22, 2025 05:58
First we carefully convert each bidirectional path to a directional
one, using a heuristic that minimizing the number of Eulerian paths
and also the changes in angle.  For each bidirectional edge, we try to
keep a balance of input and output edges.  If there are multiple ways
to keep the balance then we find the solution that creates the least
change in direction.  Eventually, all bidirectional paths are turned
to directional ones.

Then we use the regular Hierholzer's algorithm on those directional
paths.
@eyal0
eyal0 force-pushed the new_eulerian_algorithm branch from 92de55a to 6633265 Compare December 22, 2025 16:31
@eyal0
eyal0 force-pushed the new_eulerian_algorithm branch from 510571e to d824e19 Compare December 24, 2025 13:10
@eyal0
eyal0 merged commit 0029d61 into pcb2gcode:master Dec 24, 2025
13 checks passed
timaydin pushed a commit to timaydin/pcb2gcode that referenced this pull request Jan 27, 2026
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.

2 participants