diff options
author | Ton Roosendaal <ton@blender.org> | 2006-06-30 16:38:38 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-06-30 16:38:38 +0400 |
commit | b291939ccc46d96f1ff611a6e243cb9cdce1804d (patch) | |
tree | fcfedfd0f512266b56d0fdbbbe2825c7e690c64f /source/blender/blenlib/intern/scanfill.c | |
parent | 6f8b6b3a35d26e6a6b915363aab86710e7044b08 (diff) |
Bugfix #4544
The 'edge fill' code failed on filling tiny small polygons. It has a limit
check for double points, which was hardcoded set to 0.0003.
That is (commented in code too) a weak part. Better would be to define a
bounding box first, and then derive the limit from that.
Further, the edge fill code uses blender EditEdge data, which fails when
the filling code removes edges. Certainly a topic to work on once, this
code is from the 80ies!
Diffstat (limited to 'source/blender/blenlib/intern/scanfill.c')
-rw-r--r-- | source/blender/blenlib/intern/scanfill.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 73942fa8b4a..1fd7e939cff 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -101,7 +101,7 @@ typedef struct ScFillVert { /* local funcs */ -#define COMPLIMIT 0.0003 +#define COMPLIMIT 0.00003 static ScFillVert *scdata; @@ -820,12 +820,12 @@ int BLI_edgefill(int mode, int mat_nr) eve= fillvertbase.first; while(eve) { if(v2) { - if( FloatCompare(v2, eve->co, 0.0003)==0) { + if( FloatCompare(v2, eve->co, COMPLIMIT)==0) { len= CalcNormFloat(v1, v2, eve->co, norm); if(len != 0.0) break; } } - else if(FloatCompare(v1, eve->co, 0.0003)==0) { + else if(FloatCompare(v1, eve->co, COMPLIMIT)==0) { v2= eve->co; } eve= eve->next; |