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:
authorHoward Trickey <howard.trickey@gmail.com>2019-05-28 14:56:56 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-05-28 14:56:56 +0300
commit2e211d099f8d13b79cdf9057f77532c587311c3d (patch)
tree06afdf3f4bcd233c67a915ee8c8ce293129fc1bb
parentb2b1aa2f8ead62cb376342b11348fe8495ae736d (diff)
Fix T65141 Bevel did not curve.
The previous fix to the spike bug T64582 was not really right. This fixes that one properly and restores the desired curving profile in the bug's example.
m---------release/datafiles/locale0
m---------release/scripts/addons0
m---------release/scripts/addons_contrib0
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c28
4 files changed, 14 insertions, 14 deletions
diff --git a/release/datafiles/locale b/release/datafiles/locale
-Subproject 2eab3be9bbdb2d27e36cfde38fdcba5fc264f22
+Subproject ad82c4ce43ef2801ef51e75af1f9702992478b0
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject 53e11f6552dfd2defbf2b5c4fd1621d3dfdb612
+Subproject 8e6f485cf5b160c425d7da7c743879b20f3d6a9
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
-Subproject 0409b81f45445c2934ad223e430ca7d8970ae5f
+Subproject 7077ff07384491d1f7630484995557f1c7302da
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index f0ffea0fbc8..2ef3f60e0a6 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -1377,31 +1377,31 @@ static void set_profile_params(BevelParams *bp, BevVert *bv, BoundVert *bndv)
}
}
-/* Move the profile plane for bndv to the plane containing e1 and e2, which share a vert */
-static void move_profile_plane(BoundVert *bndv, EdgeHalf *e1, EdgeHalf *e2)
+/* Maybe move the profile plane for bndv->ebev to the plane its profile's coa, cob and the
+ * original beveled vert, bmv. This will usually be the plane containing its adjacent
+ * non-beveled edges, but sometimes coa and cob are not on those edges.
+ */
+static void move_profile_plane(BoundVert *bndv, BMVert *bmv)
{
float d1[3], d2[3], no[3], no2[3], no3[3], dot2, dot3;
+ Profile *pro = &bndv->profile;
- /* only do this if projecting, and e1, e2, and proj_dir are not coplanar */
- if (is_zero_v3(bndv->profile.proj_dir)) {
+ /* only do this if projecting, and coa, cob, and proj_dir are not coplanar */
+ if (is_zero_v3(pro->proj_dir)) {
return;
}
- sub_v3_v3v3(d1, e1->e->v1->co, e1->e->v2->co);
- if (e1->is_rev)
- negate_v3(d1);
+ sub_v3_v3v3(d1, bmv->co, pro->coa);
normalize_v3(d1);
- sub_v3_v3v3(d2, e2->e->v1->co, e2->e->v2->co);
- if (e2->is_rev)
- negate_v3(d2);
+ sub_v3_v3v3(d2, bmv->co, pro->cob);
normalize_v3(d2);
cross_v3_v3v3(no, d1, d2);
- cross_v3_v3v3(no2, d1, bndv->profile.proj_dir);
- cross_v3_v3v3(no3, d2, bndv->profile.proj_dir);
+ cross_v3_v3v3(no2, d1, pro->proj_dir);
+ cross_v3_v3v3(no3, d2, pro->proj_dir);
if (normalize_v3(no) > BEVEL_EPSILON_BIG && normalize_v3(no2) > BEVEL_EPSILON_BIG &&
normalize_v3(no3) > BEVEL_EPSILON_BIG) {
dot2 = dot_v3v3(no, no2);
dot3 = dot_v3v3(no, no3);
- if (fabsf(dot2) < 0.95f && fabsf(dot3) < 0.95f) {
+ if (fabsf(dot2) < (1 - BEVEL_EPSILON_BIG) && fabsf(dot3) < (1 - BEVEL_EPSILON_BIG)) {
copy_v3_v3(bndv->profile.plane_no, no);
}
}
@@ -2354,7 +2354,7 @@ static void build_boundary_terminal_edge(BevelParams *bp,
/* special case: snap profile to plane of adjacent two edges */
v = vm->boundstart;
BLI_assert(v->ebev != NULL);
- move_profile_plane(v, v->next->elast, v->efirst);
+ move_profile_plane(v, bv->v);
calculate_profile(bp, v);
}