Commit: 67c48314baa54011464de979b25126afcd28dec2 Author: Campbell Barton Date: Tue Jan 24 15:33:47 2023 +1100 Branches: master https://developer.blender.org/rB67c48314baa54011464de979b25126afcd28dec2
Revert "Fix T71137: curve minimum twist producing wrong geometry" This reverts commit cf721942149057684c089c0677c224dbe9d90c52. =================================================================== M source/blender/blenkernel/intern/curve.cc =================================================================== diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index 1ac0e27a4a3..a18cd2f6314 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -2257,21 +2257,17 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl) bevp1 = bevp2 + (bl->nr - 1); bevp0 = bevp1 - 1; - /* The ordinal of the point being adjusted (bevp2). First point is 1. */ - - /* First point is the reference, don't adjust. - * Skip this point in the following loop. */ - if (bl->nr > 0) { - vec_to_quat(bevp2->quat, bevp2->dir, 5, 1); + nr = bl->nr; + while (nr--) { - bevp0 = bevp1; /* bevp0 is unused */ - bevp1 = bevp2; - bevp2++; - } - for (nr = 1; nr < bl->nr; nr++) { - minimum_twist_between_two_points(bevp2, bevp1); + if (nr + 3 > bl->nr) { /* first time and second time, otherwise first point adjusts last */ + vec_to_quat(bevp1->quat, bevp1->dir, 5, 1); + } + else { + minimum_twist_between_two_points(bevp1, bevp0); + } - bevp0 = bevp1; /* bevp0 is unused */ + bevp0 = bevp1; bevp1 = bevp2; bevp2++; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs