-
Notifications
You must be signed in to change notification settings - Fork 521
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
3D quickhull() does not always work correctly when all vertices are in same plane #1347
Comments
I implemented a workaround for my app in this diff: |
Fix is discussed and implemented in this thread: |
JSCAD could make a patch but it would be better to have the original author make a patch to quickhull3d |
Hi,
But no example works, here from README.md:
Unfortunately the repo sandox link does not work either. Are you able to use that repo somehow? |
It's not trivial. I think the documentation was incorrect. First, you need to create a new package with type module. Put this into package.json
Second, you then need to import the QH function correctly. Put this into index.js
|
@z3dev THANK you for the great instructions! After your example worked, I used the 5 points from initial posting in this issue.
|
@z3dev It is not a single commit but quite some. I tested that new version works for the bug input I reported:
|
I just did diff of the files in this repo's with same files with fix in Lots of differences ... |
@Hermann-SW its not the same... the quickhull library was converted to use JSCAD internals. Sadly, it will diverge a little more due to this fix. I'm working on the changes. |
Expected Behavior
With five convex 3D points, geom3.fromPointsConvex() calling quickhull() should return pentagon.
Actual Behavior
Only 4 of the 5 points are part of response (right, with eps=0).
With eps=1e-10 moving one point out of plane a bit (left) all 5 vertices are in response.
With eps=1e-15 moving one point out of plane a bit (middle) only 4 of 5 points are part of response.
Steps to Reproduce the Problem
This is not a problem specific to geom3.fromPointsConvex().
Above implementation based on hull() shows same behavior.
So it is quickhull() problem for all 3D points in same plane.
Specifications
The text was updated successfully, but these errors were encountered: