From cead9092e313eba4a6e244182f7439eb06111654 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 27 Sep 2018 15:06:19 +0300 Subject: [PATCH] Segmenting curve should be more precise and doesn't create distruption. --HG-- branch : release --- src/libs/vgeometry/vabstractcurve.cpp | 2 +- src/test/ValentinaTest/tst_vspline.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/vgeometry/vabstractcurve.cpp b/src/libs/vgeometry/vabstractcurve.cpp index d64690084..5bcd20ed9 100644 --- a/src/libs/vgeometry/vabstractcurve.cpp +++ b/src/libs/vgeometry/vabstractcurve.cpp @@ -117,7 +117,7 @@ QVector VAbstractCurve::FromBegin(const QVector &points, const { theBegin = true; - if (begin != points.at(i+1)) + if (not VFuzzyComparePoints(begin, points.at(i+1))) { segment.append(begin); } diff --git a/src/test/ValentinaTest/tst_vspline.cpp b/src/test/ValentinaTest/tst_vspline.cpp index a00f92896..0a90a0ab5 100644 --- a/src/test/ValentinaTest/tst_vspline.cpp +++ b/src/test/ValentinaTest/tst_vspline.cpp @@ -684,7 +684,6 @@ void TST_VSpline::GetSegmentPoints_issue767() origPoints.append(QPointF(4191.718385429485, 2603.132565918948)); origPoints.append(QPointF(4196.210386810242, 2581.2346986946964)); origPoints.append(QPointF(4200.083592082314, 2559.5684873884893)); - origPoints.append(QPointF(4200.023629188538, 2559.9039118110236)); // Begin comparison Comparison(res, origPoints);