Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
committerHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
commitef11238c743e6985fe325280fb13e05d6ec27378 (patch)
tree1dd2605a676bee52296535825b99f000a9c255eb /source/blender/bmesh/tools/bmesh_beautify.c
parent1f768bbe4145daed111636ca09dd53b25b8d29b5 (diff)
parentec5f39208785c1bbe723054ffe69e1ac2ab470dd (diff)
Merge branch 'master' into property-search-uiproperty-search-ui
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_beautify.c')
-rw-r--r--source/blender/bmesh/tools/bmesh_beautify.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c
index c877c534376..a25e4666a22 100644
--- a/source/blender/bmesh/tools/bmesh_beautify.c
+++ b/source/blender/bmesh/tools/bmesh_beautify.c
@@ -141,7 +141,8 @@ static void erot_state_alternate(const BMEdge *e, EdRotState *e_state)
static float bm_edge_calc_rotate_beauty__area(const float v1[3],
const float v2[3],
const float v3[3],
- const float v4[3])
+ const float v4[3],
+ const bool lock_degenerate)
{
/* not a loop (only to be able to break out) */
do {
@@ -199,7 +200,8 @@ static float bm_edge_calc_rotate_beauty__area(const float v1[3],
* Allowing to rotate out of a degenerate state can flip the faces
* (when performed iteratively).
*/
- return BLI_polyfill_beautify_quad_rotate_calc_ex(v1_xy, v2_xy, v3_xy, v4_xy, true, NULL);
+ return BLI_polyfill_beautify_quad_rotate_calc_ex(
+ v1_xy, v2_xy, v3_xy, v4_xy, lock_degenerate, NULL);
} while (false);
return FLT_MAX;
@@ -262,7 +264,8 @@ float BM_verts_calc_rotate_beauty(const BMVert *v1,
switch (method) {
case 0:
- return bm_edge_calc_rotate_beauty__area(v1->co, v2->co, v3->co, v4->co);
+ return bm_edge_calc_rotate_beauty__area(
+ v1->co, v2->co, v3->co, v4->co, flag & EDGE_RESTRICT_DEGENERATE);
default:
return bm_edge_calc_rotate_beauty__angle(v1->co, v2->co, v3->co, v4->co);
}