[Bf-blender-cvs] [ec3c2d3] master: Fix T45009: Bad 'tri area computation' code in knife tool.

Bastien Montagne noreply at git.blender.org
Wed Jun 10 16:38:23 CEST 2015


Commit: ec3c2d3be9ac97446d3f32cc9f3e90e2ad93422f
Author: Bastien Montagne
Date:   Wed Jun 10 16:35:52 2015 +0200
Branches: master
https://developer.blender.org/rBec3c2d3be9ac97446d3f32cc9f3e90e2ad93422f

Fix T45009: Bad 'tri area computation' code in knife tool.

Was causing wrong selection of 'outside' face.

===================================================================

M	source/blender/editors/mesh/editmesh_knife.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index cfd0d3f..b7e1128 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -3371,9 +3371,7 @@ static void edbm_mesh_knife_face_point(BMFace *f, float r_cent[3])
 		const float *p3 = loops[index[j][2]]->v->co;
 		float area;
 
-		float cross[3];
-		cross_v3_v3v3(cross, p2, p3);
-		area = fabsf(dot_v3v3(p1, cross));
+		area = area_squared_tri_v3(p1, p2, p3);
 		if (area > area_best) {
 			j_best = j;
 			area_best = area;




More information about the Bf-blender-cvs mailing list