fix/workaround [#33281] script goes into not responding

scanfill remove-doubles pass assumes ordered edges (as with curves), otherwise it can hang.
workaround this problem by skipping removing-doubles for mesh ngons, since this isnt such a common case as it is with curves and we can just not support it.
This commit is contained in:
2012-11-26 23:18:04 +00:00
parent ceed3ef640
commit f9e339ef00
9 changed files with 99 additions and 73 deletions

View File

@@ -94,9 +94,18 @@ typedef struct ScanFillFace {
struct ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3]);
struct ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, struct ScanFillVert *v1, struct ScanFillVert *v2);
enum {
BLI_SCANFILL_CALC_QUADTRI_FASTPATH = (1 << 0),
/* note: using BLI_SCANFILL_CALC_REMOVE_DOUBLES
* Assumes ordered edges, otherwise we risk an eternal loop
* removing double verts. - campbell */
BLI_SCANFILL_CALC_REMOVE_DOUBLES = (1 << 1),
};
int BLI_scanfill_begin(ScanFillContext *sf_ctx);
int BLI_scanfill_calc(ScanFillContext *sf_ctx, const short do_quad_tri_speedup);
int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup,
int BLI_scanfill_calc(ScanFillContext *sf_ctx, const int flag);
int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag,
const float nor_proj[3]);
void BLI_scanfill_end(ScanFillContext *sf_ctx);