Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2020-09-05 03:59:36 +0300
committerHoward Trickey <howard.trickey@gmail.com>2020-09-05 03:59:36 +0300
commitda6e6e04321da428a74e720fcd5c0f7e081b801c (patch)
tree01bb86ffd0a82d9cbad8a5573dfada69d6b4db54 /source/blender/blenlib/intern/mesh_intersect.cc
parentcf0ba59e311b7a5aa61aef2d13ed3c5205657d7a (diff)
New boolean: Fix second example in T79404.
The code to detect non-trivial coplanar intersection sometimes falsely said there wasn't one. This caused some coplanar intersections to be missed. Also added a test for this case.
Diffstat (limited to 'source/blender/blenlib/intern/mesh_intersect.cc')
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index 5bd25404674..c36dfa80be7 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -1130,7 +1130,7 @@ static bool non_trivially_2d_point_in_tri(const int orients[3][3], int pi)
* one gets by having, each point of one triangle being strictly right-of one
* edge of the other and strictly left of the other two edges; and vice versa.
* In addition, it must not be the case that all of the points of one triangle
- * are totally to one side of one edge of the other triangle, and vice versa.
+ * are totally on the outside of one edge of the other triangle, and vice versa.
*/
static bool non_trivially_2d_hex_overlap(int orients[2][3][3])
{
@@ -1142,7 +1142,7 @@ static bool non_trivially_2d_hex_overlap(int orients[2][3][3])
return false;
}
int s = orients[ab][0][i] + orients[ab][1][i] + orients[ab][2][i];
- if (s == 3 || s == -3) {
+ if (s == -3) {
return false;
}
}