Handling of Kissing Faces #923
Replies: 6 comments 8 replies
-
I'm afraid it is pretty intractable. The Boolean actually treats inexact inputs as exact, so there is no epsilon for determining whether an intersection occurs or not. For exactly coincident faces, we use symbolic perturbation based on normals to do the nicer thing you're asking for, but if the faces are not axis aligned, that basically never happens. We consider both examples you show to be correct output because you'll get a correct winding number for any point in R3 that's not within precision of the faces. What are you trying to accomplish with this algorithm? |
Beta Was this translation helpful? Give feedback.
-
Thinking about it, it may not be that intractable? For example can we merge faces that are closer than 2*epsilon together, and move the vertices to the middle for example? I am talking about a pretty trivial case but I feel that this may be something that can be generalized a bit. |
Beta Was this translation helpful? Give feedback.
-
I notice that if I project this geometry down onto the floor plane (resulting in a CrossSection), the Even if this is pretty intractable, and I have to find some other way around it, I do appreciate the thoughtful answers here. Thank you. |
Beta Was this translation helpful? Give feedback.
-
As an update for anyone facing similar issues (no pun intended), I've been manually offsetting each kissing face outward into its partner by a value of 1e-12 along its normal, and then relying on the built-in vertex neighbor merging to reduce the complexity of the resulting overlap. It seems to work robustly for now, and I haven't seen any more issues yet. Of course, this is only possible because in my data structure I already know which face pairs are supposed to kiss. Without that knowledge, I'd have no short term solution. |
Beta Was this translation helpful? Give feedback.
-
I think this is either similar to or the same fundamental issue as #614 ? I too would love an automatic way to resolve such cases, if it is possible. Offsetting our faces to avoid the problem in the first place is something I need to look into, but I suspect there will be some subtleties in our use case that'll make it "interesting". I'll be following #926 with interest :-) |
Beta Was this translation helpful? Give feedback.
-
Current idea: Only consider a pair of triangles that are close. We subdivide the pair of triangles according to the intersection of their projection into the median plane between the two faces, and join the two triangles by surrounding them with 6 triangles and remove the original two. Situations:
|
Beta Was this translation helpful? Give feedback.
-
I have a need to do a boolean add on some convex hulls which meet exactly at their faces, which works, for the most part, as you'd expect.
However, on a few occasions, I get a resulting manifold that hasn't properly "connected" some of the "kissing faces."
Such an incorrect manifold doesn't have any error status attached, to be clear. It still says "no error."
I'm also already running with the recent double precision update. I was hoping that would clear up this issue, but no luck.
It makes sense that this is a precision issue, where kissing faces that don't share all their vertices might not properly resolve, but I was hoping there would be some way to tweak an epsilon somewhere such that two planes that are "extremely close" could be considered to intersect.
EDIT: To add, these kissing faces are produced via splits or trims using the exact same plane, so they should be perfectly coplanar, but, of course, floating point is the enemy of all "shoulds."
Here is a bad case, where you can see that the brownish hull on the right has not been split by the grey hull on the left, and following this is a picture of a good case, where you can see the brownish hull has been split.
I'm just hoping to hear that "kissing faces" isn't one of those intractable problems.
Beta Was this translation helpful? Give feedback.
All reactions