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:
authorCampbell Barton <ideasman42@gmail.com>2015-02-27 12:14:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-27 12:16:51 +0300
commit9683c2b129e5a1bacdb12a18497e544f4d4b82ae (patch)
tree55ddf204f74496eabffc56f16143111a53f35f31 /source/blender/blenkernel/intern/curve.c
parent0b67c21077e0da675c25530ab2e2b3f359881169 (diff)
Fix T42833: Kink on nurbs curve
Threshold for normalizing was too big.
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r--source/blender/blenkernel/intern/curve.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index e88a8ecde8e..b6a167da53d 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1247,6 +1247,7 @@ void BKE_nurb_makeFaces(Nurb *nu, float *coord_array, int rowstride, int resolu,
void BKE_nurb_makeCurve(Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array,
int resolu, int stride)
{
+ const float eps = 1e-6f;
BPoint *bp;
float u, ustart, uend, ustep, sumdiv;
float *basisu, *sum, *fp;
@@ -1305,7 +1306,7 @@ void BKE_nurb_makeCurve(Nurb *nu, float *coord_array, float *tilt_array, float *
*fp = basisu[i] * bp->vec[3];
sumdiv += *fp;
}
- if ((sumdiv != 0.0f) && (sumdiv < 0.999f || sumdiv > 1.001f)) {
+ if ((sumdiv != 0.0f) && (sumdiv < 1.0f - eps || sumdiv > 1.0f + eps)) {
/* is normalizing needed? */
fp = sum;
for (i = istart; i <= iend; i++, fp++) {