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

Triangulation failure with TBB enabled in SimpleOffset test #1006

Open
starseeker opened this issue Oct 22, 2024 · 2 comments
Open

Triangulation failure with TBB enabled in SimpleOffset test #1006

starseeker opened this issue Oct 22, 2024 · 2 comments

Comments

@starseeker
Copy link
Contributor

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: 1f47f80

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)
@pca006132
Copy link
Collaborator

I suspect that this is related to #970, as that is also with offset and has similar behavior as this one.

@starseeker
Copy link
Contributor Author

No idea if this info is significant (may just be a quirk of the local machine and/or specifics of the test) but just in case I'll add it here:

When I checked Status() after processing N triangle generated solids in the last loop of the test, at N<15 things passed, N==15 it sometimes passed and sometimes failed, and N>15 seemed to reliably fail.

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

No branches or pull requests

2 participants