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

unexpected behaviour in triangle_intersection algorithm #10

Closed
Abenabbou opened this issue Jun 23, 2022 · 3 comments
Closed

unexpected behaviour in triangle_intersection algorithm #10

Abenabbou opened this issue Jun 23, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Abenabbou
Copy link

I have the two triangles t0 and t1 below
t0={p0, p1, p2}; with p0={1898.68 775 1158.48} , p1={2000 775 1166.7}, p2={1898.68 675 1148.6}
t1={q0, q1, q2}; with q0={1966.41 675 1163.79}, q1={1971.63 675 1166.95}, q2={1967.56 684.554 1166.67}

When I call the api:
bool GEOGRAM_API triangles_intersections(
const vec3& p0, const vec3& p1, const vec3& p2,
const vec3& q0, const vec3& q1, const vec3& q2,
vector& result
);
I got this error (run in windows):
| o-[Assert ] Error: Control should not have reached this point. |
| File: \Geogram\src\lib\geogram\mesh\triangle_intersection.cpp, |
| Line: 475 |

I except to get no intersection as depicted in the attached image.
Capture

@BrunoLevy
Copy link
Owner

Thank you for notifying, I'll investigate...

@BrunoLevy BrunoLevy added the bug Something isn't working label Nov 28, 2022
@BrunoLevy
Copy link
Owner

Pushed a completely revisited version (if you want to try), github repo is up to date.

@BrunoLevy
Copy link
Owner

Double-checked with the following file:

v 1898.68 775 1158.48
v 2000 775 1166.7
v 1898.68 675 1148.6
f 1 2 3
v 1966.41 675 1163.79
v 1971.63 675 1166.95
v 1967.56 684.554 1166.67
f 4 5 6

Fixed in current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants