fix [#35989] bridge tool flip mash
open edge loops were calculating flipping incorrectly.
This commit is contained in:
@@ -428,7 +428,7 @@ void BM_mesh_edgeloops_calc_order(BMesh *UNUSED(bm), ListBase *eloops, const boo
|
||||
float len_best = FLT_MAX;
|
||||
|
||||
if (use_normals)
|
||||
BLI_assert(fabsf(len_squared_v3(no) - 1.0f) < FLT_EPSILON);
|
||||
BLI_ASSERT_UNIT_V3(no);
|
||||
|
||||
for (el_store = eloops->first; el_store; el_store = el_store->next) {
|
||||
float len;
|
||||
|
||||
@@ -189,7 +189,10 @@ static void bridge_loop_pair(BMesh *bm,
|
||||
((BMVert *)(((LinkData *)lb_b->first)->data))->co,
|
||||
((BMVert *)(((LinkData *)lb_b->last)->data))->co);
|
||||
|
||||
/* this isnt totally reliable but works well in most cases */
|
||||
/* make the directions point out from the normals, 'no' is used as a temp var */
|
||||
cross_v3_v3v3(no, dir_a, el_dir); cross_v3_v3v3(dir_a, no, el_dir);
|
||||
cross_v3_v3v3(no, dir_b, el_dir); cross_v3_v3v3(dir_b, no, el_dir);
|
||||
|
||||
if (dot_v3v3(dir_a, dir_b) < 0.0f) {
|
||||
BM_edgeloop_flip(bm, el_store_b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user