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

closest point corner cases issues (also having warning: divided by zero #2295

Open
tangyuq opened this issue Sep 27, 2024 · 1 comment
Open

Comments

@tangyuq
Copy link

tangyuq commented Sep 27, 2024

# check if P in edge region of AB, if so return projection of P onto A
vc = (d1 * d4) - (d3 * d2)
is_ab = (vc < tol.zero) & (d1 > -tol.zero) & (d3 < tol.zero) & remain
if any(is_ab):
v = (d1[is_ab] / (d1[is_ab] - d3[is_ab])).reshape((-1, 1))
result[is_ab] = a[is_ab] + (v * ab[is_ab])
remain[is_ab] = False

in line 648: if (d1[is_ab] - d3[is_ab]) is zero, then the result will be incorrect.

@josieisjose
Copy link

i have the same question.did you solve it?

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