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

"Triangle returned from triangulation isn't actually a triangle" #145

Closed
hannobraun opened this issue Feb 7, 2022 · 3 comments · Fixed by #1217
Closed

"Triangle returned from triangulation isn't actually a triangle" #145

hannobraun opened this issue Feb 7, 2022 · 3 comments · Fixed by #1217
Labels
topic: core Issues relating to core geometry, operations, algorithms type: bug Something isn't working

Comments

@hannobraun
Copy link
Owner

hannobraun commented Feb 7, 2022

When setting the num_points parameter of the star model to 3, I'm getting this error:
triangle-not-triangle

Here's the offending piece of code: https://github.com/hannobraun/Fornjot/blob/0c467cd717cb53dbee8cc7564628cbf051c02895/src/kernel/util.rs#L17-L26

Unless there's a bug in that corner_direction function (or our use of it), that means the three points are on a line, or at least two are identical. Might be an issue with Spade or (more likely) a duplicated vertex.

I'm labeling this as blocked on #105, as I think it would be a mistake to fix any more triangulation issues before we have a test suite in place.

@hannobraun hannobraun added type: bug Something isn't working status: blocked Issue or pull request is blocked by another issue or pull request, or some outside circumstance topic: core Issues relating to core geometry, operations, algorithms labels Feb 7, 2022
@hannobraun
Copy link
Owner Author

#138 has been addressed, but the problem described here is still present. This issue is only blocked on #105 now. Updated the issue description accordingly.

@hannobraun
Copy link
Owner Author

#105 has been addressed. This issue is no longer blocked.

@hannobraun hannobraun removed the status: blocked Issue or pull request is blocked by another issue or pull request, or some outside circumstance label Apr 11, 2022
@hannobraun
Copy link
Owner Author

I can still reproduce this issue. This is the current error message:

thread 'main' panicked at 'internal error: entered unreachable code: not a triangle', crates/fj-math/src/triangle.rs:130:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Issues relating to core geometry, operations, algorithms type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant