Sacre bleh another bugfix!

Mesh Connected PET was acting weird on geometry that curved on itself (reported by Desoto). Turned out the part of the floodfill working on verts already connected was just doing one case out of the two useful ones (little drawings helped :P).
This commit is contained in:
Martin Poirier
2005-04-01 01:25:00 +00:00
parent 4db0cbc741
commit 9184b03ddf
2 changed files with 11 additions and 1 deletions

View File

@@ -834,6 +834,11 @@ static void editmesh_set_connectivity_distance(int total, float *vectors, EditVe
E_NEAR(v2) = E_NEAR(v1);
done = 1;
}
else if (len2 - len1 > 0.00001f && len1 - lenn > 0.00001f) {
VECCOPY(vec2, vec1);
E_NEAR(v2) = E_NEAR(v1);
done = 1;
}
}
/* for v1 if not selected */
if (v1->f2 != 2) {
@@ -844,6 +849,11 @@ static void editmesh_set_connectivity_distance(int total, float *vectors, EditVe
E_NEAR(v1) = E_NEAR(v2);
done = 1;
}
else if (len1 - len2 > 0.00001f && len2 - lenn > 0.00001f) {
VECCOPY(vec1, vec2);
E_NEAR(v1) = E_NEAR(v2);
done = 1;
}
}
}
else {

View File

@@ -714,7 +714,7 @@ void calculatePropRatio(TransInfo *t)
if (td->flag & TD_SELECTED) {
td->factor = 1.0f;
}
else if (td->flag & TD_NOTCONNECTED || td->dist > t->propsize || td->rdist > t->propsize) {
else if (td->flag & TD_NOTCONNECTED || td->dist > t->propsize) {
/*
The elements are sorted according to their dist member in the array,
that means we can stop when it finds one element outside of the propsize.