Revert "Fix T71137: curve minimum twist producing wrong geometry"

This reverts commit cf72194214.
This commit is contained in:
Campbell Barton 2023-01-24 15:33:47 +11:00
parent 0ad4d07f10
commit 67c48314ba
Notes: blender-bot 2023-02-14 07:25:46 +01:00
Referenced by issue #71137, off-by-one bug in spline interpolation produces wrong geometry
1 changed files with 9 additions and 13 deletions

View File

@ -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. */
nr = bl->nr;
while (nr--) {
/* 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);
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 */
bevp1 = bevp2;
bevp2++;
}
for (nr = 1; nr < bl->nr; nr++) {
minimum_twist_between_two_points(bevp2, bevp1);
bevp0 = bevp1; /* bevp0 is unused */
bevp0 = bevp1;
bevp1 = bevp2;
bevp2++;
}