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!
This commit is contained in:
Ton Roosendaal
2006-06-30 12:38:38 +00:00
parent 6f8b6b3a35
commit b291939ccc

View File

@@ -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;