Closed yunshengtian closed 1 year ago
hi, indeed there is a bug in our code. I did some testing and the bug is in the octree data structure (race conditions). Substituting the octree in this project with the cinolib's octree everything works just fine, but cinolib's octree is a bit slower than this one, so I prefer not to do the full switch in this code base. We'll try to fix the bug after the holidays
Thank you for the update and look forward to the bug fix!
Thanks again for offering the bug fix. Meanwhile, if I want to have a quick solution by replacing your octree with cinolib's octree, could you let me know roughly how to do that?
I see some API differences between your octree and cinolib's octree, so any guidance on that would be appreciated, or if you have such code at hand, it would be awesome.
I just created a branch named octree_cinolib
which does the proper changes.
You can compile this version and use it.
In my computer it successfully processes your failure case:
./mesh_booleans intersection 1.obj 1.obj output.obj
Let me know how it goes :)
Thanks @mlivesu for your quick reply! It worked great! This is very helpful. 🙌 Though sometimes for subtraction I see the normals pointing in the reverse direction in the subtracted area, I can use external tools to fix that :)
ouch. This was a tiny bug we had already fixed. I reintroduced it by copy pasting my local code used to fix the octree. Can you update your local copy and try again? normals should be fine now
Cool. I just tried and it worked great. Thank you!
Hi, thank you for this great work! I tried it on my meshes, but it triggered some errors I don't know how to fix.
Command
./mesh_booleans intersection 1.obj 1.obj output.obj
Output
Mesh
Here is the link to the
1.obj
that I used. It passed all the tests inmesh_booleans_inputcheck
- see the output below.I also tried on some other meshes, which worked fine, so I suspect there is something wrong with this mesh but the check executable does not catch that. FYI I am running on macOS.
Thanks!