Main workpiece's path also can contains loops. This cause wrong seam allowances.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-15 13:16:37 +02:00
parent 05ad1605e0
commit 717772c339
2 changed files with 6 additions and 2 deletions

View File

@ -70,12 +70,12 @@ public:
protected:
static QVector<QPointF> RemoveDublicates(const QVector<QPointF> &points);
static QVector<QPointF> CorrectEquidistantPoints(const QVector<QPointF> &points);
static QVector<QPointF> CheckLoops(const QVector<QPointF> &points);
private:
QSharedDataPointer<VAbstractDetailData> d;
static QVector<QPointF> CorrectEquidistantPoints(const QVector<QPointF> &points);
static QVector<QPointF> CheckLoops(const QVector<QPointF> &points);
static QVector<QPointF> EkvPoint(const QLineF &line1, const QLineF &line2, const qreal &width);
static QPointF UnclosedEkvPoint(const QLineF &line, const QLineF &helpLine, const qreal &width);
static QLineF ParallelLine(const QLineF &line, qreal width );

View File

@ -382,6 +382,8 @@ QVector<QPointF> VDetail::ContourPoints(const VContainer *data) const
break;
}
}
points = CheckLoops(CorrectEquidistantPoints(points));//A path can contains loops
return points;
}
@ -426,6 +428,8 @@ QVector<QPointF> VDetail::SeamAllowancePoints(const VContainer *data) const
}
}
pointsEkv = CheckLoops(CorrectEquidistantPoints(pointsEkv));//A path can contains loops
if (getClosed() == true)
{
pointsEkv = Equidistant(pointsEkv, EquidistantType::CloseEquidistant, ToPixel(getWidth(),