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:
authorCampbell Barton <ideasman42@gmail.com>2020-04-07 17:43:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-04-07 17:43:47 +0300
commit02598e629eb3a3291784b297528c8596c964cd37 (patch)
tree86ede9cf255d3b7022c3bce5be2c00dfe6d90261 /source/blender/blenlib
parent3a5c16f1c981567a800c1094898e892f84d855a0 (diff)
Fix T73566: Mesh analysis, error showing intersecting faces
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/math_geom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 4c0d7e08a3c..a26824bd2b5 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -2379,7 +2379,10 @@ bool isect_tri_tri_epsilon_v3(const float t_a0[3],
if (UNLIKELY(edge_fac == -1.0f)) {
/* pass */
}
- else if (edge_fac > 0.0f && edge_fac < 1.0f) {
+ /* Important to include 0.0f and 1.0f as one of the triangles vertices may be placed
+ * exactly on the plane. In this case both it's edges will have a factor of 0 or 1,
+ * but not be going through the plane. See T73566. */
+ else if (edge_fac >= 0.0f && edge_fac <= 1.0f) {
float ix_tri[3];
float span_fac;