fix [#32665] Inconsistent Circle Mesh Edge Subdivision
This commit is contained in:
@@ -53,6 +53,9 @@
|
||||
#define ELE_INNER 8
|
||||
#define ELE_SPLIT 16
|
||||
|
||||
/* see bug [#32665], 0.00005 means a we get face splits at a little under 1.0 degrees */
|
||||
#define FLT_FACE_SPLIT_EPSILON 0.00005
|
||||
|
||||
/*
|
||||
* NOTE: beauty has been renamed to flag!
|
||||
*/
|
||||
@@ -823,16 +826,12 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
/* make sure the two edges have a valid angle to each other */
|
||||
if (totesel == 2 && BM_edge_share_vert_count(e1, e2)) {
|
||||
float angle;
|
||||
|
||||
sub_v3_v3v3(vec1, e1->v2->co, e1->v1->co);
|
||||
sub_v3_v3v3(vec2, e2->v2->co, e2->v1->co);
|
||||
normalize_v3(vec1);
|
||||
normalize_v3(vec2);
|
||||
|
||||
angle = dot_v3v3(vec1, vec2);
|
||||
angle = fabsf(angle);
|
||||
if (fabsf(angle - 1.0f) < 0.01f) {
|
||||
if (fabsf(dot_v3v3(vec1, vec2)) > 1.0f - FLT_FACE_SPLIT_EPSILON) {
|
||||
totesel = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user