diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index ae8500583..1b56d84bc 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -36,6 +36,7 @@ #include "../vpatterndb/vcontainer.h" #include "../vpatterndb/calculator.h" #include "testpath.h" +#include "vrawsapoint.h" #include #include @@ -81,9 +82,9 @@ Q_DECL_CONSTEXPR qreal PointPosition(const QPointF &p, const QLineF &line) } //--------------------------------------------------------------------------------------------------------------------- -QVector AngleByLength(QVector points, QPointF p1, QPointF p2, QPointF p3, const QLineF &bigLine1, - QPointF sp2, const QLineF &bigLine2, const VSAPoint &p, qreal width, - bool *needRollback = nullptr) +QVector AngleByLength(QVector points, QPointF p1, QPointF p2, QPointF p3, + const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, const VSAPoint &p, + qreal width, bool *needRollback = nullptr) { if (needRollback != nullptr) { @@ -151,7 +152,7 @@ QVector AngleByLength(QVector points, QPointF p1, QPointF p2, if (p.GetAngleType() != PieceNodeAngle::ByLengthCurve) { bool success = false; - QVector temp = points; + QVector temp = points; temp.append(bigLine1.p2()); temp = VAbstractPiece::RollbackSeamAllowance(temp, bigLine2, &success); @@ -196,9 +197,9 @@ QVector AngleByLength(QVector points, QPointF p1, QPointF p2, } //--------------------------------------------------------------------------------------------------------------------- -QVector AngleByIntersection(const QVector &points, QPointF p1, QPointF p2, QPointF p3, - const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, - const VSAPoint &p, qreal width, bool *needRollback = nullptr) +QVector AngleByIntersection(const QVector &points, QPointF p1, QPointF p2, QPointF p3, + const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, + const VSAPoint &p, qreal width, bool *needRollback = nullptr) { { QLineF edge1(p2, p1); @@ -217,7 +218,7 @@ QVector AngleByIntersection(const QVector &points, QPointF p1, } const qreal localWidth = p.MaxLocalSA(width); - QVector pointsIntr = points; + QVector pointsIntr = points; // First point QLineF edge2(p2, p3); @@ -240,7 +241,7 @@ QVector AngleByIntersection(const QVector &points, QPointF p1, else {// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points bool success = false; - QVector temp = pointsIntr; + QVector temp = pointsIntr; temp.append(bigLine1.p2()); temp = VAbstractPiece::RollbackSeamAllowance(temp, edge2, &success); @@ -282,9 +283,9 @@ QVector AngleByIntersection(const QVector &points, QPointF p1, } //--------------------------------------------------------------------------------------------------------------------- -QVector AngleByFirstSymmetry(const QVector &points, QPointF p1, QPointF p2, QPointF p3, - const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, - const VSAPoint &p, qreal width, bool *needRollback = nullptr) +QVector AngleByFirstSymmetry(const QVector &points, QPointF p1, QPointF p2, QPointF p3, + const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, + const VSAPoint &p, qreal width, bool *needRollback = nullptr) { { QLineF edge1(p2, p1); @@ -320,7 +321,7 @@ QVector AngleByFirstSymmetry(const QVector &points, QPointF p1 return AngleByLength(points, p1, p2, p3, bigLine1, sp2, bigLine2, p, width, needRollback); } - QVector pointsIntr = points; + QVector pointsIntr = points; if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px1)) { @@ -329,7 +330,7 @@ QVector AngleByFirstSymmetry(const QVector &points, QPointF p1 else {// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points bool success = false; - QVector temp = pointsIntr; + QVector temp = pointsIntr; temp.append(bigLine1.p2()); temp = VAbstractPiece::RollbackSeamAllowance(temp, sEdge, &success); @@ -361,9 +362,9 @@ QVector AngleByFirstSymmetry(const QVector &points, QPointF p1 } //--------------------------------------------------------------------------------------------------------------------- -QVector AngleBySecondSymmetry(const QVector &points, QPointF p1, QPointF p2, QPointF p3, - const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, - const VSAPoint &p, qreal width, bool *needRollback = nullptr) +QVector AngleBySecondSymmetry(const QVector &points, QPointF p1, QPointF p2, QPointF p3, + const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, + const VSAPoint &p, qreal width, bool *needRollback = nullptr) { { QLineF edge1(p2, p1); @@ -400,7 +401,7 @@ QVector AngleBySecondSymmetry(const QVector &points, QPointF p } const qreal localWidth = p.MaxLocalSA(width); - QVector pointsIntr = points; + QVector pointsIntr = points; if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px1)) { @@ -409,7 +410,7 @@ QVector AngleBySecondSymmetry(const QVector &points, QPointF p else {// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points bool success = false; - QVector temp = pointsIntr; + QVector temp = pointsIntr; temp.append(bigLine1.p2()); temp = VAbstractPiece::RollbackSeamAllowance(temp, sEdge, &success); @@ -442,9 +443,9 @@ QVector AngleBySecondSymmetry(const QVector &points, QPointF p } //--------------------------------------------------------------------------------------------------------------------- -QVector AngleByFirstRightAngle(const QVector &points, QPointF p1, QPointF p2, QPointF p3, - const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, - const VSAPoint &p, qreal width, bool *needRollback = nullptr) +QVector AngleByFirstRightAngle(const QVector &points, QPointF p1, QPointF p2, QPointF p3, + const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, + const VSAPoint &p, qreal width, bool *needRollback = nullptr) { { QLineF edge1(p2, p1); @@ -458,7 +459,7 @@ QVector AngleByFirstRightAngle(const QVector &points, QPointF } const qreal localWidth = p.MaxLocalSA(width); - QVector pointsRA = points; + QVector pointsRA = points; QLineF edge(p1, p2); QPointF px; @@ -511,9 +512,9 @@ QVector AngleByFirstRightAngle(const QVector &points, QPointF } //--------------------------------------------------------------------------------------------------------------------- -QVector AngleBySecondRightAngle(QVector points, QPointF p1, QPointF p2, QPointF p3, - const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, - const VSAPoint &p, qreal width, bool *needRollback = nullptr) +QVector AngleBySecondRightAngle(QVector points, QPointF p1, QPointF p2, QPointF p3, + const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2, + const VSAPoint &p, qreal width, bool *needRollback = nullptr) { { QLineF edge1(p2, p1); @@ -574,7 +575,7 @@ QVector AngleBySecondRightAngle(QVector points, QPointF p1, QP // Because artificial loop can lead to wrong clipping we must rollback current seam allowance points bool success = false; const int countBefore = points.size(); - QVector temp = points; + QVector temp = points; temp.append(bigLine1.p2()); temp = VAbstractPiece::RollbackSeamAllowance(temp, edge, &success); @@ -708,7 +709,7 @@ QVector CorrectPathDistortion(QVector path) } //--------------------------------------------------------------------------------------------------------------------- -bool Rollback(QVector &points, const QLineF &edge) +bool Rollback(QVector &points, const QLineF &edge) { bool success = false; if (not points.isEmpty()) @@ -728,11 +729,11 @@ bool Rollback(QVector &points, const QLineF &edge) } //--------------------------------------------------------------------------------------------------------------------- -void RollbackByLength(QVector &ekvPoints, const QVector &points, qreal width) +void RollbackByLength(QVector &ekvPoints, const QVector &points, qreal width) { const QLineF bigLine1 = VAbstractPiece::ParallelLine(points.at(points.size()-2), points.at(0), width); - QVector temp = ekvPoints; + QVector temp = ekvPoints; temp.insert(ekvPoints.size()-1, bigLine1.p2()); bool success = Rollback(temp, VAbstractPiece::ParallelLine(points.at(0), points.at(1), width)); @@ -743,13 +744,13 @@ void RollbackByLength(QVector &ekvPoints, const QVector &poin } //--------------------------------------------------------------------------------------------------------------------- -void RollbackBySecondEdgeSymmetry(QVector &ekvPoints, const QVector &points, qreal width) +void RollbackBySecondEdgeSymmetry(QVector &ekvPoints, const QVector &points, qreal width) { const QLineF axis = QLineF(points.at(points.size()-1), points.at(1)); const QLineF bigLine1 = VAbstractPiece::ParallelLine(points.at(points.size()-2), points.at(0), width); QLineF sEdge(VPointF::FlipPF(axis, bigLine1.p1()), VPointF::FlipPF(axis, bigLine1.p2())); - QVector temp = ekvPoints; + QVector temp = ekvPoints; temp.insert(ekvPoints.size()-1, bigLine1.p2()); bool success = Rollback(temp, sEdge); @@ -760,14 +761,14 @@ void RollbackBySecondEdgeSymmetry(QVector &ekvPoints, const QVector &ekvPoints, const QVector &points, qreal width) +void RollbackByFirstEdgeSymmetry(QVector &ekvPoints, const QVector &points, qreal width) { const QLineF axis = QLineF(points.at(points.size()-2), points.at(points.size()-1)); const QLineF bigLine2 = VAbstractPiece::ParallelLine(points.at(points.size()-1), points.at(1), width); QLineF sEdge(VPointF::FlipPF(axis, bigLine2.p1()), VPointF::FlipPF(axis, bigLine2.p2())); const QLineF bigLine1 = VAbstractPiece::ParallelLine(points.at(points.size()-2), points.at(0), width); - QVector temp = ekvPoints; + QVector temp = ekvPoints; temp.insert(ekvPoints.size()-1, bigLine1.p2()); bool success = Rollback(temp, sEdge); @@ -778,10 +779,10 @@ void RollbackByFirstEdgeSymmetry(QVector &ekvPoints, const QVector &ekvPoints, const QVector &points, qreal width) +void RollbackByPointsIntersection(QVector &ekvPoints, const QVector &points, qreal width) { const QLineF bigLine1 = VAbstractPiece::ParallelLine(points.at(points.size()-2), points.at(0), width); - QVector temp = ekvPoints; + QVector temp = ekvPoints; temp.insert(ekvPoints.size()-1, bigLine1.p2()); bool success = Rollback(temp, QLineF(points.last(), points.at(1))); @@ -798,7 +799,7 @@ void RollbackByPointsIntersection(QVector &ekvPoints, const QVector &ekvPoints, const QVector &points, qreal width) +void RollbackBySecondEdgeRightAngle(QVector &ekvPoints, const QVector &points, qreal width) { if (not ekvPoints.isEmpty()) { @@ -831,7 +832,7 @@ void RollbackBySecondEdgeRightAngle(QVector &ekvPoints, const QVector temp = ekvPoints; + QVector temp = ekvPoints; temp.insert(ekvPoints.size()-1, bigLine1.p2()); temp = VAbstractPiece::RollbackSeamAllowance(temp, edge, &success); @@ -861,6 +862,22 @@ void RollbackBySecondEdgeRightAngle(QVector &ekvPoints, const QVector CleanLoopArtifacts(const QVector &points) +{ + QVector cleaned; + cleaned.reserve(points.size()); + for (auto &point : points) + { + if (not point.LoopPoint()) + { + cleaned.append(point); + } + } + + return cleaned; +} } // Friend functions @@ -1027,7 +1044,7 @@ QVector VAbstractPiece::Equidistant(QVector points, qreal wid } bool needRollback = false; // no need for rollback - QVector ekvPoints; + QVector ekvPoints; for (qint32 i = 0; i < points.size(); ++i ) { if ( i == 0) @@ -1081,12 +1098,21 @@ QVector VAbstractPiece::Equidistant(QVector points, qreal wid QT_WARNING_POP } +// Uncomment for debug +// QVector cleaned; +// cleaned.reserve(ekvPoints.size()); +// for (auto &point : ekvPoints) +// { +// cleaned.append(point); +// } + const bool removeFirstAndLast = false; - ekvPoints = CheckLoops(RemoveDublicates(ekvPoints, removeFirstAndLast));//Result path can contain loops - ekvPoints = CorrectEquidistantPoints(ekvPoints, removeFirstAndLast); - ekvPoints = CorrectPathDistortion(ekvPoints); -// DumpVector(ekvPoints, QStringLiteral("output.json.XXXXXX")); // Uncomment for dumping test data - return ekvPoints; + ekvPoints = RemoveDublicates(ekvPoints, removeFirstAndLast); + QVector cleaned = CheckLoops(ekvPoints);//Result path can contain loops + cleaned = CorrectEquidistantPoints(cleaned, removeFirstAndLast); + cleaned = CorrectPathDistortion(cleaned); +// DumpVector(cleaned, QStringLiteral("output.json.XXXXXX")); // Uncomment for dumping test data + return cleaned; } //--------------------------------------------------------------------------------------------------------------------- @@ -1125,13 +1151,26 @@ qreal VAbstractPiece::SumTrapezoids(const QVector &points) return res; } +//--------------------------------------------------------------------------------------------------------------------- +QVector VAbstractPiece::CheckLoops(const QVector &points) +{ + QVector rawPath; + rawPath.reserve(points.size()); + for (auto &point : points) + { + rawPath.append(point); + } + + return CheckLoops(rawPath); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief CheckLoops seek and delete loops in equidistant. * @param points vector of points of equidistant. * @return vector of points of equidistant. */ -QVector VAbstractPiece::CheckLoops(const QVector &points) +QVector VAbstractPiece::CheckLoops(const QVector &points) { // DumpVector(points); // Uncomment for dumping test data @@ -1139,12 +1178,12 @@ QVector VAbstractPiece::CheckLoops(const QVector &points) /*If we got less than 4 points no need seek loops.*/ if (count < 4) { - return points; + return CleanLoopArtifacts(points); } const bool pathClosed = (points.first() == points.last()); - QVector ekvPoints; + QVector ekvPoints; ekvPoints.reserve(points.size()); QVector uniqueVertices; @@ -1238,8 +1277,9 @@ QVector VAbstractPiece::CheckLoops(const QVector &points) break; } } -// DumpVector(ekvPoints); // Uncomment for dumping test data - return ekvPoints; + const QVector cleaned = CleanLoopArtifacts(ekvPoints); +// DumpVector(cleaned); // Uncomment for dumping test data + return cleaned; } //--------------------------------------------------------------------------------------------------------------------- @@ -1249,13 +1289,13 @@ QVector VAbstractPiece::CheckLoops(const QVector &points) * @param width global seam allowance width. * @return seam aloowance points. */ -QVector VAbstractPiece::EkvPoint(QVector points, const VSAPoint &p1Line1, const VSAPoint &p2Line1, - const VSAPoint &p1Line2, const VSAPoint &p2Line2, qreal width, - bool *needRollback) +QVector VAbstractPiece::EkvPoint(QVector points, const VSAPoint &p1Line1, + const VSAPoint &p2Line1, const VSAPoint &p1Line2, const VSAPoint &p2Line2, + qreal width, bool *needRollback) { if (width < 0) { // width can't be < 0 - return QVector(); + return QVector(); } width = qMax(width, VSAPoint::minSAWidth); @@ -1263,7 +1303,7 @@ QVector VAbstractPiece::EkvPoint(QVector points, const VSAPoin if (p2Line1 != p2Line2) { qDebug()<<"Last points of two lines must be equal."; - return QVector(); // Wrong edges + return QVector(); // Wrong edges } const QLineF bigLine1 = ParallelLine(p1Line1, p2Line1, width ); @@ -1629,11 +1669,11 @@ QJsonObject VSAPoint::toJson() const //--------------------------------------------------------------------------------------------------------------------- // Because artificial loop can lead to wrong clipping we must rollback current seam allowance points -QVector VAbstractPiece::RollbackSeamAllowance(QVector points, const QLineF &cuttingEdge, - bool *success) +QVector VAbstractPiece::RollbackSeamAllowance(QVector points, const QLineF &cuttingEdge, + bool *success) { *success = false; - QVector clipped; + QVector clipped; clipped.reserve(points.count()+1); for (int i = points.count()-1; i > 0; --i) { diff --git a/src/libs/vlayout/vabstractpiece.h b/src/libs/vlayout/vabstractpiece.h index 6321268ac..cd9f402d8 100644 --- a/src/libs/vlayout/vabstractpiece.h +++ b/src/libs/vlayout/vabstractpiece.h @@ -45,6 +45,7 @@ class VAbstractPieceData; class QPainterPath; class VGrainlineData; class VContainer; +class VRawSAPoint; class VAbstractPiece { @@ -95,16 +96,18 @@ public: static QVector Equidistant(QVector points, qreal width, const QString &name); static qreal SumTrapezoids(const QVector &points); static QVector CheckLoops(const QVector &points); - static QVector EkvPoint(QVector points, const VSAPoint &p1Line1, const VSAPoint &p2Line1, - const VSAPoint &p1Line2, const VSAPoint &p2Line2, qreal width, - bool *needRollback = nullptr); + static QVector CheckLoops(const QVector &points); + static QVector EkvPoint(QVector points, const VSAPoint &p1Line1, const VSAPoint &p2Line1, + const VSAPoint &p1Line2, const VSAPoint &p2Line2, qreal width, + bool *needRollback = nullptr); static QLineF ParallelLine(const VSAPoint &p1, const VSAPoint &p2, qreal width); static bool IsAllowanceValid(const QVector &base, const QVector &allowance); template static QVector CorrectEquidistantPoints(const QVector &points, bool removeFirstAndLast = true); - static QVector RollbackSeamAllowance(QVector points, const QLineF &cuttingEdge, bool *success); + static QVector RollbackSeamAllowance(QVector points, const QLineF &cuttingEdge, + bool *success); static QVector GrainlinePoints(const VGrainlineData &geom, const VContainer *pattern, const QRectF &boundingRect, qreal &dAng); diff --git a/src/libs/vlayout/vlayout.pri b/src/libs/vlayout/vlayout.pri index d4acbecb2..fe16ecc40 100644 --- a/src/libs/vlayout/vlayout.pri +++ b/src/libs/vlayout/vlayout.pri @@ -23,7 +23,8 @@ HEADERS += \ $$PWD/vlayoutpiece_p.h \ $$PWD/vlayoutpiecepath.h \ $$PWD/vlayoutpiecepath_p.h \ - $$PWD/vbestsquare_p.h + $$PWD/vbestsquare_p.h \ + $$PWD/vrawsapoint.h SOURCES += \ $$PWD/testpath.cpp \ @@ -38,6 +39,7 @@ SOURCES += \ $$PWD/vgraphicsfillitem.cpp \ $$PWD/vabstractpiece.cpp \ $$PWD/vlayoutpiece.cpp \ - $$PWD/vlayoutpiecepath.cpp + $$PWD/vlayoutpiecepath.cpp \ + $$PWD/vrawsapoint.cpp *msvc*:SOURCES += $$PWD/stable.cpp diff --git a/src/libs/vlayout/vrawsapoint.cpp b/src/libs/vlayout/vrawsapoint.cpp new file mode 100644 index 000000000..608cc0c16 --- /dev/null +++ b/src/libs/vlayout/vrawsapoint.cpp @@ -0,0 +1,44 @@ +/************************************************************************ + ** + ** @file vrawsapoint.cpp + ** @author Roman Telezhynskyi + ** @date 31 10, 2019 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2019 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "vrawsapoint.h" + +#include + +//--------------------------------------------------------------------------------------------------------------------- +QJsonObject VRawSAPoint::toJson() const +{ + QJsonObject pointObject; + pointObject[QLatin1String("type")] = "VRawSAPoint"; + pointObject[QLatin1String("x")] = x(); + pointObject[QLatin1String("y")] = y(); + + pointObject[QLatin1String("loopPoint")] = m_loopPoint; + + return pointObject; +} diff --git a/src/libs/vlayout/vrawsapoint.h b/src/libs/vlayout/vrawsapoint.h new file mode 100644 index 000000000..932fe9cad --- /dev/null +++ b/src/libs/vlayout/vrawsapoint.h @@ -0,0 +1,90 @@ +/************************************************************************ + ** + ** @file vrawsapoint.h + ** @author Roman Telezhynskyi + ** @date 31 10, 2019 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2019 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef VRAWSAPOINT_H +#define VRAWSAPOINT_H + +#include + +#include "../vmisc/diagnostic.h" +#include "../vmisc/def.h" + +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Weffc++") +QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor") + +class VRawSAPoint : public QPointF +{ +public: + Q_DECL_CONSTEXPR VRawSAPoint(); + Q_DECL_CONSTEXPR VRawSAPoint(qreal xpos, qreal ypos); + Q_DECL_CONSTEXPR VRawSAPoint(QPointF p); + + Q_DECL_CONSTEXPR bool LoopPoint() const; + Q_DECL_CONSTEXPR void SetLoopPoint(bool loopPoint); + + QJsonObject toJson() const; + +private: + bool m_loopPoint{false}; +}; + +Q_DECLARE_METATYPE(VRawSAPoint) +Q_DECLARE_TYPEINFO(VRawSAPoint, Q_MOVABLE_TYPE); + +//--------------------------------------------------------------------------------------------------------------------- +Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint() +{} + +//--------------------------------------------------------------------------------------------------------------------- +Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(qreal xpos, qreal ypos) + : QPointF(xpos, ypos) +{} + +//--------------------------------------------------------------------------------------------------------------------- +// cppcheck-suppress passedByValue +Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p) + : QPointF(p) +{ + +} + +//--------------------------------------------------------------------------------------------------------------------- +Q_DECL_CONSTEXPR inline bool VRawSAPoint::LoopPoint() const +{ + return m_loopPoint; +} + +//--------------------------------------------------------------------------------------------------------------------- +Q_DECL_CONSTEXPR inline void VRawSAPoint::SetLoopPoint(bool loopPoint) +{ + m_loopPoint = loopPoint; +} + +QT_WARNING_POP + +#endif // VRAWSAPOINT_H diff --git a/src/libs/vpatterndb/vpassmark.cpp b/src/libs/vpatterndb/vpassmark.cpp index 8b1eb323d..23aa5861d 100644 --- a/src/libs/vpatterndb/vpassmark.cpp +++ b/src/libs/vpatterndb/vpassmark.cpp @@ -32,6 +32,7 @@ #include "../vgeometry/vabstractcurve.h" #include "../vgeometry/varc.h" #include "testpassmark.h" +#include "../vlayout/vrawsapoint.h" const qreal VPassmark::passmarkRadiusFactor = 0.45; @@ -42,7 +43,7 @@ PassmarkStatus GetSeamPassmarkSAPoint(const VPiecePassmarkData &passmarkData, co QPointF &point) { bool needRollback = false; // no need for rollback - QVector ekvPoints; + QVector ekvPoints; ekvPoints = VAbstractPiece::EkvPoint(ekvPoints, passmarkData.previousSAPoint, passmarkData.passmarkSAPoint, passmarkData.nextSAPoint, passmarkData.passmarkSAPoint, passmarkData.saWidth, &needRollback);