fornjot icon indicating copy to clipboard operation
fornjot copied to clipboard

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

Open hannobraun opened this issue 3 years ago • 2 comments

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 avatar Feb 07 '22 16:02 hannobraun

#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 avatar Feb 14 '22 15:02 hannobraun

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

hannobraun avatar Apr 11 '22 13:04 hannobraun

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

hannobraun avatar Oct 13 '22 12:10 hannobraun