Skip to content
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

Fix possibly disappearing airwires #687

merged 4 commits into from Apr 21, 2020


Copy link

@ubruhin ubruhin commented Apr 19, 2020

It's actually not a fix, but a workaround for issue #588. The Delaunay triangulation library is not able to handle colinear points in the input data (our net points) and silently ignores some of the input points, so there are edges (our airwires) missing in the output.

I spend quite some time on this issue, and I think it's not possible to actually fix this problem on our side, so the fix needs to be done in delaunay-triangulation. But actually I'm not sure if it's worth investigating and fixing the issue in that library - in my opinion the overall quality of that library is not acceptable for an EDA tool anyway. For long-term, we might switch to a different library, for example delaunator-cpp which seems to be developed more seriously. But they currently also have a similar issue (abellgithub/delaunator-cpp#8), so we should wait until this issue is resolved.

However, to get LibrePCB 0.1.4 released as soon as possible with disappearing airwires fixed, I simply implemented some kind of "fallback". Even if delaunay-triangulation failed to add some edges, we now still get all edges connected, but connections might not be "optimal", i.e. not the shortest distance is shown. But at least no airwires disappear now, so the risk of producing PCBs with missing connections is gone.

I also refactored the airwires builder to make it easier testable, and added some unittests which are able to detect the current bug.

@ubruhin ubruhin self-assigned this Apr 19, 2020
@ubruhin ubruhin added this to the 0.1.4 milestone Apr 19, 2020
@ubruhin ubruhin merged commit 65a1e73 into master Apr 21, 2020
11 checks passed
@ubruhin ubruhin deleted the 588-fix-disappearing-airwires branch Apr 21, 2020
ubruhin added a commit that referenced this issue Apr 22, 2020
Fix possibly disappearing airwires
(cherry picked from commit 65a1e73)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants