From ae7405d44f3c22f96823b1d90d9c43da4205eb74 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 13 Nov 2016 20:13:05 +0200 Subject: [PATCH] Method VPiece::CurveSeamAllowanceSegment. When start and end of a curve segment has standard seam allowance setup only first and last points. --HG-- branch : feature --- src/libs/vpatterndb/vpiece.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/libs/vpatterndb/vpiece.cpp b/src/libs/vpatterndb/vpiece.cpp index faaf6d956..7965fbcc5 100644 --- a/src/libs/vpatterndb/vpiece.cpp +++ b/src/libs/vpatterndb/vpiece.cpp @@ -393,7 +393,18 @@ void VPiece::CurveSeamAllowanceSegment(QVector &pointsEkv, const VCont {// no local widths for(int i = 0; i < points.size(); ++i) { - pointsEkv.append(VSAPoint(points.at(i))); + VSAPoint p(points.at(i)); + if (i == 0) + { // first point + p.SetSAAfter(begin.GetSAAfter()); + p.SetSABefore(begin.GetSABefore()); + } + else if (i == points.size() - 1) + { // last point + p.SetSAAfter(end.GetSAAfter()); + p.SetSABefore(end.GetSABefore()); + } + pointsEkv.append(p); } } else