[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52767] trunk/blender/source/blender/bmesh /tools/bmesh_bevel.c: bevel: re-order checks so angle checks are done after quick sanity checks.
Campbell Barton
ideasman42 at gmail.com
Tue Dec 4 15:41:43 CET 2012
Revision: 52767
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52767
Author: campbellbarton
Date: 2012-12-04 14:41:40 +0000 (Tue, 04 Dec 2012)
Log Message:
-----------
bevel: re-order checks so angle checks are done after quick sanity checks.
Modified Paths:
--------------
trunk/blender/source/blender/bmesh/tools/bmesh_bevel.c
Modified: trunk/blender/source/blender/bmesh/tools/bmesh_bevel.c
===================================================================
--- trunk/blender/source/blender/bmesh/tools/bmesh_bevel.c 2012-12-04 12:41:59 UTC (rev 52766)
+++ trunk/blender/source/blender/bmesh/tools/bmesh_bevel.c 2012-12-04 14:41:40 UTC (rev 52767)
@@ -590,7 +590,7 @@
* So M = B*(Ainverse). Doing Ainverse by hand gives the code below.
*/
static int make_unit_square_map(const float va[3], const float vmid[3], const float vb[3],
- float r_mat[4][4])
+ float r_mat[4][4])
{
float vo[3], vd[3], vb_vmid[3], va_vmid[3], vddir[3];
@@ -603,8 +603,8 @@
add_v3_v3v3(vd, vo, vddir);
/* The cols of m are: {vmid - va, vmid - vb, vmid + vd - va -vb, va + vb - vmid;
- * blender transform matrices are stored such that m[i][*] is ith column;
- * the last elements of each col remain as they are in unity matrix */
+ * blender transform matrices are stored such that m[i][*] is ith column;
+ * the last elements of each col remain as they are in unity matrix */
sub_v3_v3v3(&r_mat[0][0], vmid, va);
r_mat[0][3] = 0.0f;
sub_v3_v3v3(&r_mat[1][0], vmid, vb);
@@ -657,7 +657,7 @@
* co is the point to snap and is modified in place.
* va and vb are the limits of the profile (with peak on e). */
static void snap_to_edge_profile(EdgeHalf *e, const float va[3], const float vb[3],
- float co[3])
+ float co[3])
{
float m[4][4], minv[4][4];
float edir[3], va0[3], vb0[3], vmid0[3], p[3], snap[3];
@@ -832,7 +832,7 @@
EdgeHalf *e1, *e2, *epipe;
BMVert *bmv, *bmv1, *bmv2, *bmv3, *bmv4;
BMFace *f;
- float co[3], coa[3], cob[3], midco[3], dir1[3], dir2[3];
+ float co[3], coa[3], cob[3], midco[3];
float va_pipe[3], vb_pipe[3];
#ifdef USE_ALTERNATE_ADJ
@@ -860,12 +860,14 @@
if (e1->is_bev) {
for (e2 = &bv->edges[0]; e2 != &bv->edges[bv->edgecount]; e2++) {
if (e1 != e2 && e2->is_bev) {
- sub_v3_v3v3(dir1, bv->v->co, BM_edge_other_vert(e1->e, bv->v)->co);
- sub_v3_v3v3(dir2,BM_edge_other_vert(e2->e, bv->v)->co, bv->v->co);
- if (angle_v3v3(dir1, dir2) < 100.0f * (float)BEVEL_EPSILON &&
- (e1->fnext == e2->fprev || e1->fprev == e2->fnext)) {
- epipe = e1;
- break;
+ if ((e1->fnext == e2->fprev) || (e1->fprev == e2->fnext)) {
+ float dir1[3], dir2[3];
+ sub_v3_v3v3(dir1, bv->v->co, BM_edge_other_vert(e1->e, bv->v)->co);
+ sub_v3_v3v3(dir2, BM_edge_other_vert(e2->e, bv->v)->co, bv->v->co);
+ if (angle_v3v3(dir1, dir2) < 100.0f * (float)BEVEL_EPSILON) {
+ epipe = e1;
+ break;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list