manifold
manifold copied to clipboard
Triangulation failure with TBB enabled in SimpleOffset test
When working on #998, a failure (see below) was observed in triangulation when moving the Status() checks of the test up out of the processing loops: https://github.com/elalish/manifold/pull/998/commits/1f47f80305267429e91843d7819c2f65d14a61a1
Subsequent testing indicated that the issue was only observed (at least, on Ubuntu Linux) when tbb was enabled.
Needs additional debugging setup to capture the precise problematic inputs - just setting up this issue here to capture the info buried in the #998 discussion.
-----------------------------------
Triangulation failed! Precision = 2.01703e-08
Error in file: /home/runner/work/manifold/manifold/src/polygon.cpp (118): 'std::all_of(triangles.begin(), triangles.end(), [&vertPos, precision](const ivec3 &tri) { return CCW(vertPos[tri[0]], vertPos[tri[1]], vertPos[tri[2]], precision) >= 0; })' is false: triangulation is not entirely CCW!
Polygon 0 2.01703e-08 1
17
4970.57 -19594.7
5039.82 -19373.5
5039.82 -19373.5
5039.82 -19373.5
5038.85 -19373.3
5038.85 -19373.3
5037.88 -19373.2
5037.88 -19373.2
5037.88 -19373.2
5038.85 -19373.3
5038.85 -19373.3
5039.82 -19373.5
5039.82 -19373.5
5038.85 -19373.3
5037.88 -19373.2
5037.88 -19373.2
5037.88 -19373.2
# ...
show(array([
[4970.57, -19594.7],
[5039.82, -19373.5],
[5039.82, -19373.5],
[5039.82, -19373.5],
[5038.85, -19373.3],
[5038.85, -19373.3],
[5037.88, -19373.2],
[5037.88, -19373.2],
[5037.88, -19373.2],
[5038.85, -19373.3],
[5038.85, -19373.3],
[5039.82, -19373.5],
[5039.82, -19373.5],
[5038.85, -19373.3],
[5037.88, -19373.2],
[5037.88, -19373.2],
[5037.88, -19373.2],
]))
produced this triangulation:
214, 159, 176
176, 174, 224
170, 220, 229
124, 221, 170
168, 218, 121
121, 214, 176
229, 230, 125
180, 168, 121
180, 121, 176
225, 180, 176
224, 124, 170
176, 224, 170
125, 225, 176
125, 176, 170
125, 170, 229
unknown file: Failure
C++ exception with description "Error in file: /home/runner/work/manifold/manifold/src/polygon.cpp (118): 'std::all_of(triangles.begin(), triangles.end(), [&vertPos, precision](const ivec3 &tri) { return CCW(vertPos[tri[0]], vertPos[tri[1]], vertPos[tri[2]], precision) >= 0; })' is false: triangulation is not entirely CCW!" thrown in the test body.
[ FAILED ] BooleanComplex.SimpleOffset (499 ms)
[----------] 15 tests from BooleanComplex (23044 ms total)