fix for own error in recent scanfill updates, scanfill can hang if run on a polygon with no area.
This commit is contained in:
@@ -882,7 +882,7 @@ int BLI_edgefill_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup, co
|
||||
}
|
||||
|
||||
if (UNLIKELY(normalize_v3(n) == 0.0f)) {
|
||||
n[2] = 1.0f; /* other axis set to 0.0 */
|
||||
return 0;
|
||||
}
|
||||
|
||||
axis_dominant_v3(&co_x, &co_y, n);
|
||||
|
||||
@@ -148,7 +148,6 @@ float *BME_new_transdata_float(BME_TransData_Head *td)
|
||||
* The drawback, though, is that this code doesn't merge customdata. */
|
||||
static int BME_Bevel_Dissolve_Disk(BMesh *bm, BMVert *v)
|
||||
{
|
||||
BMIter iter;
|
||||
BMEdge *e, *elast;
|
||||
BMLoop *l1, *l2;
|
||||
|
||||
@@ -156,12 +155,6 @@ static int BME_Bevel_Dissolve_Disk(BMesh *bm, BMVert *v)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
|
||||
if (BM_edge_face_count(e) != 2) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (BM_vert_edge_count(v) > 2) {
|
||||
while (BM_vert_edge_count(v) > 2) {
|
||||
e = v->e;
|
||||
@@ -1011,12 +1004,14 @@ static BMesh *BME_bevel_mesh(BMesh *bm, float value, int UNUSED(res), int option
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/* Debug print, remov */
|
||||
BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
|
||||
if (f->len == 2) {
|
||||
printf("warning");
|
||||
printf("%s: warning, 2 edge face\n", __func__);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return bm;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user