[Bf-blender-cvs] [02598e629eb] master: Fix T73566: Mesh analysis, error showing intersecting faces
Campbell Barton
noreply at git.blender.org
Tue Apr 7 16:45:37 CEST 2020
Commit: 02598e629eb3a3291784b297528c8596c964cd37
Author: Campbell Barton
Date: Wed Apr 8 00:43:47 2020 +1000
Branches: master
https://developer.blender.org/rB02598e629eb3a3291784b297528c8596c964cd37
Fix T73566: Mesh analysis, error showing intersecting faces
===================================================================
M source/blender/blenlib/intern/math_geom.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list