Face of mesh missing after subtraction
agviegas opened this issue · 2 comments
Hello!
First of all, congratulations for the library, it is really fast, efective and easy to use.
I am using this library to perform the boolean operations in the ifc loader and viewer I am developing for Three.js. IFC is the format used by architects / engineers to store building models.
Today I have faced a strange issue. I am developing the doors; each door has an associated bounding box (a simple parallelepiped volume) that is used to create the whole in the wall. I have tested and it works perfectly in most walls, but I have come across a wall that does not perform as expected; one of it's faces is eliminated after the boolean operation.
This is strange, because all the walls are extrusions created with the same function (they are a simple Three.js extrusion). I am digging into the geometry of this specific wall, but it looks identical to the others. If you have any idea why this might be happening (normals, vertex, matrices, etc), I may well find the issue investigating in that direction.
You can observe the missing face in the two images below. In the first image, the wall of the right is missing the face closer to the camera, so the inner sides are visible. The other face has inverted normals, but is still there. In the second picture the remaining face is not visible due to backface culling; only the inner sides are visible.
Thank you in advance!
Digging into the code I found the source of the problem somewhere else, now it works perfectly. Thank you and sorry for the issue. 🙂
The best kind of bug! :D