Closed starseeker closed 1 year ago
Example inputs: brlcad.org/~starseeker/a.obj brlcad.org/~starseeker/b.obj
mesh_booleans subtraction a.obj b.obj c.obj
Is there any way to either have the zero volume coplanar intersections not "bite" out of the other model, or if the removal results in non-manifold edges keep the "subtracted" triangles to maintain the manifold property?
non manifold configurations can indeed arise in case of tangencies. For this specific case I still do not understand whether the boolean is correct or not. I need to verify what is the resulting arrangement precisely. I'll get back to you asap
thanks for providing a reproducible case. This is indeed helpful!
Hi, Sorry for the late answer. I tested the models you sent us. You get a non-manifold mesh, but the result is correct based on our subtraction definition. Indeed, A - B is composed of all the triangles of A that are not inside B and all the triangles of B that are inside A. That non-manifold portion in the output is the surface of B that coincides with the surface of A (but which is not contained in A).
If this is a problem for you, you can remove this portion in post-processing. If you consider a vertex on this area, you can move by flooding and select the area enclosed by a chain of non-manifold or border edges.
I hope this can fix your problem, Gianmarco
Apologies, I'm not quite following - by post-processing do you mean taking the A-B output mesh and doing a mesh fill operation?
I was hoping it might be possible to capture from the boolean process the "coincides but not contained" set of triangles and re-introduce them into the output mesh (perhaps as an option to the boolean evaluation chain) - is the data to do that not captured?
the reason why this is not handled internally to the boolean code is that tangencies are ambiguous. In your case the two shapes are tangent "from the inside", therefore not keeping those triangles would be the right choice. A similar tangency may occur "from the outside", and in that case not keeping the triangles would produce a result with a hole and open boundaries, which is clearly wrong. One way to disambiguate this would be to check the orientation of the coplanar triangles (if the normals are aligned tangency is from the inside, if they are opposite tangencies are from the outside), but this is a geometric check that is not fully robust, because triangles may be nearly degenerate hence normal computation not 100% reliable. Making this check fully robust would require a dedicated exact predicate that we don't have, that's why we decided not to do that and to just leave the final refinement to post processing
Hi! I'm not really sure if this qualifies as an issue (it may be expected) but I just wanted to confirm if that was the case. I got the boolean pipeline wired into my conversion superstructure, and when running I quickly hit a case where the boolean completed but the mesh output was non-manifold. Visually, it looks as if coplanar faces from the subtracting mesh are cutting holes out of their counterpart.