Fix T45009: Bad 'tri area computation' code in knife tool.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 10 Jun 2015 14:35:52 +0000 (16:35 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 10 Jun 2015 14:35:52 +0000 (16:35 +0200)
Was causing wrong selection of 'outside' face.

source/blender/editors/mesh/editmesh_knife.c

index cfd0d3fdcf58cab1b6154ebf54776452f8ab41ad..b7e11287d3647da0891335772bda21a27f6ef036 100644 (file)
@@ -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;