From d12070b1463a270e34c90751d729fb889cacfd3c Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 31 Aug 2019 15:30:07 +0300 Subject: [PATCH] Fix bug with angle by intersection. Was used wrong point bigLine2.p2() instead of bigLine2.p1(). --HG-- branch : develop --- src/libs/vlayout/vabstractpiece.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 5d7c38ea2..2eaa0daf9 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -224,15 +224,12 @@ QVector AngleByIntersection(const QVector &points, QPointF p1, } else { - QLineF allowance(p2, px); - //allowance.setLength(allowance.length()-accuracyPointOnLine*2.); - //allowance.setAngle(allowance.angle()-0.1); // avoid optimization - pointsIntr.append(allowance.p2()); + pointsIntr.append(px); - //allowance = QLineF(p2, px); + QLineF allowance(p2, px); allowance.setLength(allowance.length() + localWidth * 3.); pointsIntr.append(allowance.p2()); - pointsIntr.append(bigLine2.p2()); + pointsIntr.append(bigLine2.p1()); } return pointsIntr;