fix [#33438] Bevel modifier "angle" mode is broken
authorCampbell Barton <ideasman42@gmail.com>
Sat, 8 Dec 2012 07:35:54 +0000 (07:35 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 8 Dec 2012 07:35:54 +0000 (07:35 +0000)
bevel modifier was making zero area faces & edges that made scanfill fail (since it no longer removes doubles when filling ngons)

source/blender/bmesh/tools/BME_bevel.c

index cdfd8372d614a52937d84fbc30dca2a2d4b25e66..3f2ca21bceeabd06c374166e83dcc01e79c1413b 100644 (file)
@@ -689,8 +689,16 @@ static BMFace *BME_bevel_poly(BMesh *bm, BMFace *f, float value, int options, BM
                         BMO_elem_flag_test(bm, l->v, BME_BEVEL_ORIG) &&
                         !BMO_elem_flag_test(bm, l->prev->e, BME_BEVEL_BEVEL))
                {
-                       max = 1.0f;
-                       l = BME_bevel_vert(bm, l, value, options, up_vec, td);
+                       /* avoid making double vertices [#33438] */
+                       BME_TransData *vtd;
+                       vtd = BME_get_transdata(td, l->v);
+                       if (vtd->weight == 0.0f) {
+                               BMO_elem_flag_disable(bm, l->v, BME_BEVEL_BEVEL);
+                       }
+                       else {
+                               max = 1.0f;
+                               l = BME_bevel_vert(bm, l, value, options, up_vec, td);
+                       }
                }
        }