From 608b90122c01eb4a414ee801413971529b5c18dc Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 10 May 2023 18:07:58 +0300 Subject: [PATCH] Fix Check notch opening. --- src/libs/vpatterndb/vpassmark.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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};