Fix Check notch opening.
This commit is contained in:
parent
394df3c775
commit
608b90122c
|
@ -531,7 +531,7 @@ auto CreateCheckMarkPassmark(const VPiecePassmarkData &passmarkData, const QLine
|
||||||
const QVector<QPointF> &seamAllowance) -> QVector<QLineF>
|
const QVector<QPointF> &seamAllowance) -> QVector<QLineF>
|
||||||
{
|
{
|
||||||
constexpr qreal defAngle = 45;
|
constexpr qreal defAngle = 45;
|
||||||
qreal defWidth = line.length() * qTan(qDegreesToRadians(defAngle));
|
qreal defWidth = qAbs(line.length() * qTan(qDegreesToRadians(defAngle)));
|
||||||
|
|
||||||
if (not passmarkData.passmarkSAPoint.IsPassmarkClockwiseOpening())
|
if (not passmarkData.passmarkSAPoint.IsPassmarkClockwiseOpening())
|
||||||
{
|
{
|
||||||
|
@ -544,14 +544,14 @@ auto CreateCheckMarkPassmark(const VPiecePassmarkData &passmarkData, const QLine
|
||||||
if (width > 0)
|
if (width > 0)
|
||||||
{ // clockwise
|
{ // clockwise
|
||||||
QLineF l1(line.p2(), line.p1());
|
QLineF l1(line.p2(), line.p1());
|
||||||
l1.setAngle(l1.angle() + angle);
|
l1.setAngle(l1.angle() - angle);
|
||||||
l1 = VPassmark::FindIntersection(l1, seamAllowance);
|
l1 = VPassmark::FindIntersection(l1, seamAllowance);
|
||||||
|
|
||||||
return {{l1.p2(), l1.p1()}, {line.p2(), line.p1()}};
|
return {{l1.p2(), l1.p1()}, {line.p2(), line.p1()}};
|
||||||
}
|
}
|
||||||
|
|
||||||
QLineF l2(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);
|
l2 = VPassmark::FindIntersection(l2, seamAllowance);
|
||||||
|
|
||||||
return {line, l2};
|
return {line, l2};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user