diff options
Diffstat (limited to 'source/blender/freestyle/intern/stroke/StrokeRep.cpp')
-rw-r--r-- | source/blender/freestyle/intern/stroke/StrokeRep.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp index c2811895147..2615df0a124 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp @@ -414,10 +414,10 @@ void Strip::cleanUpSingularities (const vector<StrokeVertex*>& iStrokeVertices) cerr << "Stephane dit \"Toto\"" << endl; //traverse all the vertices of the singularity and average them Vec2r avP(0.0, 0.0); - for (j = i - timeSinceSingu1; j < i + 1; j++) + for (j = i - timeSinceSingu1; j <= i; j++) avP = Vec2r(avP + _vertices[2 * j]->point2d()); avP = Vec2r( 1.0 / float(timeSinceSingu1 + 1) * avP); - for (j = i - timeSinceSingu1; j < i + 1; j++) + for (j = i - timeSinceSingu1; j <= i; j++) _vertices[2 * j]->setPoint2d(avP); //_vertex[2 * j] = _vertex[2 * i]; singu1 = false; @@ -435,10 +435,10 @@ void Strip::cleanUpSingularities (const vector<StrokeVertex*>& iStrokeVertices) cerr << "Stephane dit \"Toto\"" << endl; //traverse all the vertices of the singularity and average them Vec2r avP(0.0, 0.0); - for (j = i - timeSinceSingu2; j < i + 1; j++) + for (j = i - timeSinceSingu2; j <= i; j++) avP = Vec2r(avP + _vertices[2 * j + 1]->point2d()); avP = Vec2r(1.0 / float(timeSinceSingu2 + 1) * avP); - for (j = i - timeSinceSingu2; j < i + 1; j++) + for (j = i - timeSinceSingu2; j <= i; j++) _vertices[2 * j + 1]->setPoint2d(avP); //_vertex[2 * j + 1] = _vertex[2 * i + 1]; singu2 = false; |