diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2021-02-07 19:25:07 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2021-02-07 19:25:07 +0300 |
commit | 6f63417b500d0893e89fef1ecddb9ff345322e96 (patch) | |
tree | 328da05dd8b8479793b2042bc8ced5cbf62c5254 /source/blender/bmesh | |
parent | 71e63153ebf3668c6552afda5acfc746dcc49853 (diff) |
Fix T84493 et al: New Boolean on Suzanne.
While Boolean is not guaranteed to work if the operands are not
volume-enclosing (technically: PWN - piecewise constant winding number),
it needs to do something in those cases. This change makes
more cases meet user expectations in T84493, T64544, T83403,
T82642 (though very slow on that one).
The original new boolean code used "generalized winding number"
for this fallback; replaced this with code that uses raycasting.
Raycasting would have been faster, but for unfortunately also
switchd to per-triangle tests rather than per-patch tests since
it is possible (e.g., with Suzanne) to have patches that are
both inside and outside the other shape. That can make it much
slower in some cases, sadly.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 25459414cd7..920307b42a2 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -807,6 +807,9 @@ static bool contig_ldata_across_edge(BMesh *bm, BMEdge *e, BMFace *f1, BMFace *f } BMVert *v1 = lef1->v; BMVert *v2 = lef2->v; + if (v1 == v2) { + return false; + } BLI_assert((v1 == e->v1 && v2 == e->v2) || (v1 == e->v2 && v2 == e->v1)); UNUSED_VARS_NDEBUG(v1, v2); BMLoop *lv1f1 = lef1; |