Fix T70560: Large cones are created with double vertices (even though

the radius is zero)

Merge threshold for remove_doubles was hardcoded, now scaled by depth.

Reviewed By: campbellbarton

Maniphest Tasks: T70560

Differential Revision: https://developer.blender.org/D6001
This commit is contained in:
Philipp Oeser
2019-10-06 10:23:00 +02:00
parent 7fb12536b7
commit fa76f08db5

View File

@@ -1507,7 +1507,7 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
BMO_op_callf(bm, op->flag, "dissolve_faces faces=%ff", FACE_NEW);
}
BMO_op_callf(bm, op->flag, "remove_doubles verts=%fv dist=%f", VERT_MARK, 0.000001);
BMO_op_callf(bm, op->flag, "remove_doubles verts=%fv dist=%f", VERT_MARK, 0.0000005 * depth);
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "verts.out", BM_VERT, VERT_MARK);
}