diff --git a/src/libs/vpatterndb/vpassmark.cpp b/src/libs/vpatterndb/vpassmark.cpp index a67c4d76c..13a816d8c 100644 --- a/src/libs/vpatterndb/vpassmark.cpp +++ b/src/libs/vpatterndb/vpassmark.cpp @@ -531,7 +531,7 @@ auto CreateCheckMarkPassmark(const VPiecePassmarkData &passmarkData, const QLine const QVector &seamAllowance) -> QVector { constexpr qreal defAngle = 45; - qreal defWidth = line.length() * qTan(qDegreesToRadians(defAngle)); + qreal defWidth = qAbs(line.length() * qTan(qDegreesToRadians(defAngle))); if (not passmarkData.passmarkSAPoint.IsPassmarkClockwiseOpening()) { @@ -544,14 +544,14 @@ auto CreateCheckMarkPassmark(const VPiecePassmarkData &passmarkData, const QLine if (width > 0) { // clockwise QLineF l1(line.p2(), line.p1()); - l1.setAngle(l1.angle() + angle); + l1.setAngle(l1.angle() - angle); l1 = VPassmark::FindIntersection(l1, seamAllowance); return {{l1.p2(), l1.p1()}, {line.p2(), line.p1()}}; } QLineF l2(line.p2(), line.p1()); - l2.setAngle(l2.angle() - angle); + l2.setAngle(l2.angle() + angle); l2 = VPassmark::FindIntersection(l2, seamAllowance); return {line, l2};