Serialization a point to json. ref #874.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-08-07 17:53:18 +03:00
parent 01dc686827
commit 8332d4b15b
10 changed files with 1262 additions and 552 deletions

View file

@ -41,6 +41,9 @@
#include <QVector>
#include <QPainterPath>
#include <QTemporaryFile>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
const quint32 VAbstractPieceData::streamHeader = 0x05CDD73A; // CRC-32Q string "VAbstractPieceData"
const quint16 VAbstractPieceData::classVersion = 2;
@ -532,123 +535,66 @@ qreal AngleBetweenBisectors(const QLineF &b1, const QLineF &b2)
//---------------------------------------------------------------------------------------------------------------------
#if !defined(V_NO_ASSERT)
// Use for writing tests
void VectorToJson(const QVector<QPointF> &points, QJsonObject &json)
{
QJsonArray pointsArray;
for (auto point: points)
{
QJsonObject pointObject;
pointObject[QLatin1String("type")] = "QPointF";
pointObject[QLatin1String("x")] = point.x();
pointObject[QLatin1String("y")] = point.y();
pointsArray.append(pointObject);
}
json[QLatin1String("vector")] = pointsArray;
}
//---------------------------------------------------------------------------------------------------------------------
void VectorToJson(const QVector<VSAPoint> &points, QJsonObject &json)
{
QJsonArray pointsArray;
for (auto point: points)
{
pointsArray.append(point.toJson());
}
json[QLatin1String("vector")] = pointsArray;
}
//---------------------------------------------------------------------------------------------------------------------
void DumpVector(const QVector<QPointF> &points)
{
{
QTemporaryFile temp; // Go to tmp folder to find dump
temp.setAutoRemove(false); // Remove dump manually
if (temp.open())
{
QJsonObject vectorObject;
VectorToJson(points, vectorObject);
QJsonDocument vector(vectorObject);
QTextStream out(&temp);
out << "QVector<QPointF> points;" << endl << endl;
for(auto point : points)
{
out << QString("points += QPointF(%1, %2);").arg(point.x(), 0, 'f', 15).arg(point.y(), 0, 'f', 15) << endl;
}
out << endl << "return points;";
out << vector.toJson();
out.flush();
}
}
//---------------------------------------------------------------------------------------------------------------------
// Use for writing tests
void DumpVector(const QVector<VSAPoint> &points)
{
QTemporaryFile temp; // Go to tmp folder to find dump
temp.setAutoRemove(false); // Remove dump manually
if (temp.open())
{
QJsonObject vectorObject;
VectorToJson(points, vectorObject);
QJsonDocument vector(vectorObject);
QTextStream out(&temp);
out << "QVector<VSAPoint> points;" << endl;
bool firstPoint = true;
enum PointType {Unknown, Default, Custom};
PointType type = Unknown;
for(auto point : points)
{
if (VFuzzyComparePossibleNulls(point.GetSAAfter(), -1)
and VFuzzyComparePossibleNulls(point.GetSABefore(), -1)
and point.GetAngleType() == PieceNodeAngle::ByLength)
{
if (type != Default)
{
out << endl;
}
type = Default;
out << QString("points += VSAPoint(%1, %2);").arg(point.x(), 0, 'f', 15).arg(point.y(), 0, 'f', 15)
<< endl;
}
else
{
out << endl;
type = Custom;
if (firstPoint)
{
out << "VSAPoint ";
firstPoint = false;
}
out << QString("p = VSAPoint(%1, %2);").arg(point.x(), 0, 'f', 15).arg(point.y(), 0, 'f', 15) << endl;
if (not VFuzzyComparePossibleNulls(point.GetSABefore(), -1))
{
out << QString("p.SetSABefore(%1);").arg(point.GetSABefore()) << endl;
}
if (not VFuzzyComparePossibleNulls(point.GetSAAfter(), -1))
{
out << QString("p.SetSAAfter(%1);").arg(point.GetSAAfter()) << endl;
}
if (point.GetAngleType() != PieceNodeAngle::ByLength)
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
// This check helps to find missed angle types in the switch
Q_STATIC_ASSERT_X(static_cast<int>(PieceNodeAngle::LAST_ONE_DO_NOT_USE) == 7,
"Not all types were handled.");
QString typeStr;
switch (point.GetAngleType())
{
case PieceNodeAngle::LAST_ONE_DO_NOT_USE:
case PieceNodeAngle::ByLength:
Q_UNREACHABLE(); //-V501
break;
case PieceNodeAngle::ByPointsIntersection:
typeStr = "ByPointsIntersection";
break;
case PieceNodeAngle::ByFirstEdgeSymmetry:
typeStr = "ByFirstEdgeSymmetry";
break;
case PieceNodeAngle::BySecondEdgeSymmetry:
typeStr = "BySecondEdgeSymmetry";
break;
case PieceNodeAngle::ByFirstEdgeRightAngle:
typeStr = "ByFirstEdgeRightAngle";
break;
case PieceNodeAngle::BySecondEdgeRightAngle:
typeStr = "BySecondEdgeRightAngle";
break;
case PieceNodeAngle::ByLengthCurve:
typeStr = "ByLengthCurve";
break;
}
QT_WARNING_POP
out << QString("p.SetAngleType(PieceNodeAngle::%1);").arg(typeStr) << endl;
}
out << "points += p;" << endl;
}
}
out << endl << "return points;";
out << vector.toJson();
out.flush();
}
}
#endif
#endif // !defined(V_NO_ASSERT)
//---------------------------------------------------------------------------------------------------------------------
template<class T>
@ -1514,6 +1460,32 @@ qreal VSAPoint::PassmarkLength(qreal width) const
}
}
//---------------------------------------------------------------------------------------------------------------------
QJsonObject VSAPoint::toJson() const
{
QJsonObject pointObject;
pointObject[QLatin1String("type")] = "VSAPoint";
pointObject[QLatin1String("x")] = x();
pointObject[QLatin1String("y")] = y();
if (not VFuzzyComparePossibleNulls(m_before, -1))
{
pointObject[QLatin1String("saBefore")] = m_before;
}
if (not VFuzzyComparePossibleNulls(m_after, -1))
{
pointObject[QLatin1String("saAfter")] = m_after;
}
if (m_angle != PieceNodeAngle::ByLength)
{
pointObject[QLatin1String("angle")] = static_cast<int>(m_angle);
}
return pointObject;
}
//---------------------------------------------------------------------------------------------------------------------
// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points
QVector<QPointF> VAbstractPiece::RollbackSeamAllowance(QVector<QPointF> points, const QLineF &cuttingEdge,

View file

@ -81,6 +81,8 @@ public:
qreal MaxLocalSA(qreal width) const;
qreal PassmarkLength(qreal width) const;
QJsonObject toJson() const;
static const qreal passmarkFactor;
static const qreal maxPassmarkLength;

View file

@ -46,9 +46,13 @@
#include <QVector>
#include <QtGlobal>
#include <QLineF>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include "vsysexits.h"
#include "../vgeometry/vgobject.h"
#include "../vlayout/vabstractpiece.h"
//---------------------------------------------------------------------------------------------------------------------
AbstractTest::AbstractTest(QObject *parent) :
@ -56,6 +60,229 @@ AbstractTest::AbstractTest(QObject *parent) :
{
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::VectorFromJson(const QString &json, QVector<QPointF>& vector)
{
QFile loadFile(json);
if (not loadFile.open(QIODevice::ReadOnly))
{
const QString error = QStringLiteral("Couldn't open json file. %1").arg(loadFile.errorString());
QFAIL(qUtf8Printable(error));
}
QByteArray saveData = loadFile.readAll();
QJsonDocument loadDoc(QJsonDocument::fromJson(saveData));
const QString vectorKey = QStringLiteral("vector");
const QString typeKey = QStringLiteral("type");
const QString xKey = QStringLiteral("x");
const QString yKey = QStringLiteral("y");
QJsonObject vectorObject = loadDoc.object();
if (not vectorObject.contains(vectorKey))
{
const QString error = QStringLiteral("Invalid json file '%1'. File doesn't contain root object.").arg(json);
QFAIL(qUtf8Printable(error));
}
QJsonArray vectorArray = loadDoc.object()[vectorKey].toArray();
for (int i = 0; i < vectorArray.size(); ++i)
{
QJsonObject pointObject = vectorArray[i].toObject();
if (not pointObject.contains(typeKey))
{
const QString error = QStringLiteral("Invalid json file '%1'. Json object doesn't provide class type.")
.arg(json);
QFAIL(qUtf8Printable(error));
}
if (pointObject[typeKey].toString() != QLatin1String("QPointF"))
{
const QString error = QStringLiteral("Invalid json file '%1'. Unexpected class '%2'.")
.arg(json, pointObject[typeKey].toString());
QFAIL(qUtf8Printable(error));
}
QPointF point;
if (pointObject.contains(xKey))
{
QJsonValue xValue = pointObject[xKey];
if (xValue.isDouble())
{
point.setX(xValue.toDouble());
}
else
{
const QString error = QStringLiteral("X coordinate is not double '%1'.").arg(xValue.toString());
QFAIL(qUtf8Printable(error));
}
}
else
{
const QString error = QStringLiteral("Json object does not contain X coordinate.");
QFAIL(qUtf8Printable(error));
}
if (pointObject.contains(yKey))
{
QJsonValue yValue = pointObject[yKey];
if (yValue.isDouble())
{
point.setY(yValue.toDouble());
}
else
{
const QString error = QStringLiteral("Y coordinate is not double '%1'.").arg(yValue.toString());
QFAIL(qUtf8Printable(error));
}
}
else
{
const QString error = QStringLiteral("Json object does not contain Y coordinate.");
QFAIL(qUtf8Printable(error));
}
vector.append(point);
}
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::VectorFromJson(const QString &json, QVector<VSAPoint> &vector)
{
QFile loadFile(json);
if (not loadFile.open(QIODevice::ReadOnly))
{
const QString error = QStringLiteral("Couldn't open json file. %1").arg(loadFile.errorString());
QFAIL(qUtf8Printable(error));
}
QByteArray saveData = loadFile.readAll();
QJsonDocument loadDoc(QJsonDocument::fromJson(saveData));
const int defaultAngle = static_cast<int>(PieceNodeAngle::ByLength);
const QString vectorKey = QStringLiteral("vector");
const QString typeKey = QStringLiteral("type");
const QString xKey = QStringLiteral("x");
const QString yKey = QStringLiteral("y");
const QString saBeforeKey = QStringLiteral("saBefore");
const QString saAfterKey = QStringLiteral("saAfter");
const QString angleKey = QStringLiteral("angle");
QJsonObject vectorObject = loadDoc.object();
if (not vectorObject.contains(vectorKey))
{
const QString error = QStringLiteral("Invalid json file '%1'. File doesn't contain root object.").arg(json);
QFAIL(qUtf8Printable(error));
}
QJsonArray vectorArray = loadDoc.object()[vectorKey].toArray();
for (int i = 0; i < vectorArray.size(); ++i)
{
QJsonObject pointObject = vectorArray[i].toObject();
if (not pointObject.contains(typeKey))
{
const QString error = QStringLiteral("Invalid json file '%1'. Json object doesn't provide class type.")
.arg(json);
QFAIL(qUtf8Printable(error));
}
if (pointObject[typeKey].toString() != QLatin1String("VSAPoint"))
{
const QString error = QStringLiteral("Invalid json file '%1'. Unexpected class '%2'.")
.arg(json, pointObject[typeKey].toString());
QFAIL(qUtf8Printable(error));
}
VSAPoint point;
if (pointObject.contains(xKey))
{
QJsonValue xValue = pointObject[xKey];
if (xValue.isDouble())
{
point.setX(xValue.toDouble());
}
else
{
const QString error = QStringLiteral("X coordinate is not double '%1'.").arg(xValue.toString());
QFAIL(qUtf8Printable(error));
}
}
else
{
const QString error = QStringLiteral("Json object does not contain X coordinate.");
QFAIL(qUtf8Printable(error));
}
if (pointObject.contains(yKey))
{
QJsonValue yValue = pointObject[yKey];
if (yValue.isDouble())
{
point.setY(yValue.toDouble());
}
else
{
const QString error = QStringLiteral("Y coordinate is not double '%1'.").arg(yValue.toString());
QFAIL(qUtf8Printable(error));
}
}
else
{
const QString error = QStringLiteral("Json object does not contain Y coordinate.");
QFAIL(qUtf8Printable(error));
}
if (pointObject.contains(saBeforeKey))
{
QJsonValue saBeforeValue = pointObject[saBeforeKey];
if (saBeforeValue.isDouble())
{
point.SetSABefore(saBeforeValue.toDouble(-1));
}
else
{
const QString error = QStringLiteral("SABefore is not double '%1'.").arg(saBeforeValue.toString());
QFAIL(qUtf8Printable(error));
}
}
if (pointObject.contains(saAfterKey))
{
QJsonValue saAfterValue = pointObject[saAfterKey];
if (saAfterValue.isDouble())
{
point.SetSABefore(saAfterValue.toDouble(-1));
}
else
{
const QString error = QStringLiteral("SAAfter is not double '%1'.").arg(saAfterValue.toString());
QFAIL(qUtf8Printable(error));
}
}
if (pointObject.contains(angleKey))
{
QJsonValue angleValue = pointObject[angleKey];
if (angleValue.isDouble())
{
point.SetAngleType(static_cast<PieceNodeAngle>(angleValue.toDouble(defaultAngle)));
}
else
{
const QString error = QStringLiteral("Angle type is not double '%1'.").arg(angleValue.toString());
QFAIL(qUtf8Printable(error));
}
}
vector.append(point);
}
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::Comparison(const QVector<QPointF> &ekv, const QVector<QPointF> &ekvOrig) const
{

View file

@ -34,6 +34,7 @@
#include <QString>
template <class T> class QVector;
class VSAPoint;
#include <ciso646>
@ -59,6 +60,9 @@ class AbstractTest : public QObject
public:
explicit AbstractTest(QObject *parent = nullptr);
void VectorFromJson(const QString &json, QVector<QPointF>& vector);
void VectorFromJson(const QString &json, QVector<VSAPoint>& vector);
protected:
void Comparison(const QVector<QPointF> &ekv, const QVector<QPointF> &ekvOrig) const;
void Comparison(const QPointF &result, const QPointF &expected) const;

View file

@ -225,3 +225,6 @@ else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpro
INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer
DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer
RESOURCES += \
share/test_data.qrc

View file

@ -59,6 +59,7 @@
int main(int argc, char** argv)
{
Q_INIT_RESOURCE(schema);
Q_INIT_RESOURCE(test_data);
TestVApplication app( argc, argv );// For QPrinter

View file

@ -0,0 +1,557 @@
{
"vector": [
{
"angle": 1,
"type": "VSAPoint",
"x": -196.7716535433071,
"y": 39.999874015748034
},
{
"angle": 1,
"type": "VSAPoint",
"x": -196.7716535433071,
"y": 39.999874015748034
},
{
"angle": 6,
"type": "VSAPoint",
"x": -195.21242706720307,
"y": 34.14652047360368
},
{
"angle": 6,
"type": "VSAPoint",
"x": -191.8243672555103,
"y": 22.98380075353889
},
{
"angle": 6,
"type": "VSAPoint",
"x": -188.11922553424526,
"y": 12.457117876219073
},
{
"angle": 6,
"type": "VSAPoint",
"x": -184.10416448319614,
"y": 2.5478629590622783
},
{
"angle": 6,
"type": "VSAPoint",
"x": -179.78634668215102,
"y": -6.76257288051344
},
{
"angle": 6,
"type": "VSAPoint",
"x": -175.17293471089806,
"y": -15.492798525090029
},
{
"angle": 6,
"type": "VSAPoint",
"x": -170.2710911492254,
"y": -23.661422857249427
},
{
"angle": 6,
"type": "VSAPoint",
"x": -165.08797857692116,
"y": -31.287054759573582
},
{
"angle": 6,
"type": "VSAPoint",
"x": -159.63075957377356,
"y": -38.388303114644444
},
{
"angle": 6,
"type": "VSAPoint",
"x": -153.90659671957062,
"y": -44.983776805043945
},
{
"angle": 6,
"type": "VSAPoint",
"x": -147.92265259410053,
"y": -51.09208471335405
},
{
"angle": 6,
"type": "VSAPoint",
"x": -141.6860897771514,
"y": -56.73183572215669
},
{
"angle": 6,
"type": "VSAPoint",
"x": -135.2040708485114,
"y": -61.92163871403382
},
{
"angle": 6,
"type": "VSAPoint",
"x": -128.48375838796866,
"y": -66.68010257156736
},
{
"angle": 6,
"type": "VSAPoint",
"x": -121.5323149753113,
"y": -71.02583617733929
},
{
"angle": 6,
"type": "VSAPoint",
"x": -114.35690319032747,
"y": -74.97744841393151
},
{
"angle": 6,
"type": "VSAPoint",
"x": -106.96468561280531,
"y": -78.55354816392602
},
{
"angle": 6,
"type": "VSAPoint",
"x": -99.36282482253294,
"y": -81.77274430990471
},
{
"angle": 6,
"type": "VSAPoint",
"x": -87.60658785191427,
"y": -86.01184887668629
},
{
"angle": 6,
"type": "VSAPoint",
"x": -71.23095795232594,
"y": -90.53212613553225
},
{
"angle": 6,
"type": "VSAPoint",
"x": -54.145681637923275,
"y": -93.9597488647901
},
{
"angle": 6,
"type": "VSAPoint",
"x": -36.40805954701136,
"y": -96.44358812511531
},
{
"angle": 6,
"type": "VSAPoint",
"x": -18.075392317895275,
"y": -98.1325149771635
},
{
"angle": 6,
"type": "VSAPoint",
"x": 0.795019411119881,
"y": -99.17540048159017
},
{
"angle": 6,
"type": "VSAPoint",
"x": 20.145875001729017,
"y": -99.72111569905093
},
{
"type": "VSAPoint",
"x": 30,
"y": -99.84264566929134
},
{
"type": "VSAPoint",
"x": 30,
"y": -99.84264566929134
},
{
"type": "VSAPoint",
"x": 30,
"y": -99.84264566929134
},
{
"angle": 6,
"type": "VSAPoint",
"x": 41.372113208694955,
"y": -99.8629416946242
},
{
"angle": 6,
"type": "VSAPoint",
"x": 62.96894259210174,
"y": -99.02518745646077
},
{
"angle": 6,
"type": "VSAPoint",
"x": 83.24139107407007,
"y": -97.12098927026987
},
{
"angle": 6,
"type": "VSAPoint",
"x": 102.24778703164577,
"y": -94.13653780112648
},
{
"angle": 6,
"type": "VSAPoint",
"x": 120.04645884187472,
"y": -90.05802371410553
},
{
"angle": 6,
"type": "VSAPoint",
"x": 136.69573488180282,
"y": -84.87163767428204
},
{
"angle": 6,
"type": "VSAPoint",
"x": 152.25394352847593,
"y": -78.56357034673097
},
{
"angle": 6,
"type": "VSAPoint",
"x": 166.77941315893992,
"y": -71.12001239652727
},
{
"angle": 6,
"type": "VSAPoint",
"x": 180.33047215024067,
"y": -62.52715448874596
},
{
"angle": 6,
"type": "VSAPoint",
"x": 192.96544887942403,
"y": -52.771187288461945
},
{
"angle": 6,
"type": "VSAPoint",
"x": 204.7426717235359,
"y": -41.83830146075026
},
{
"angle": 6,
"type": "VSAPoint",
"x": 215.72046905962208,
"y": -29.714687670685834
},
{
"angle": 6,
"type": "VSAPoint",
"x": 225.95716926472852,
"y": -16.386536583343656
},
{
"angle": 6,
"type": "VSAPoint",
"x": 235.51110071590108,
"y": -1.8400388637986993
},
{
"angle": 6,
"type": "VSAPoint",
"x": 244.44059179018558,
"y": 13.938614822874065
},
{
"angle": 6,
"type": "VSAPoint",
"x": 252.80397086462796,
"y": 30.963233811599665
},
{
"angle": 1,
"type": "VSAPoint",
"x": 256.77165354330714,
"y": 39.999874015748034
},
{
"angle": 1,
"type": "VSAPoint",
"x": 256.77165354330714,
"y": 39.999874015748034
},
{
"angle": 1,
"type": "VSAPoint",
"x": 256.77165354330714,
"y": 39.999874015748034
},
{
"angle": 6,
"type": "VSAPoint",
"x": 252.80397086462796,
"y": 49.036514219896404
},
{
"angle": 6,
"type": "VSAPoint",
"x": 244.44059179018558,
"y": 66.061133208622
},
{
"angle": 6,
"type": "VSAPoint",
"x": 235.51110071590108,
"y": 81.83978689529476
},
{
"angle": 6,
"type": "VSAPoint",
"x": 225.95716926472852,
"y": 96.38628461483972
},
{
"angle": 6,
"type": "VSAPoint",
"x": 215.72046905962208,
"y": 109.7144357021819
},
{
"angle": 6,
"type": "VSAPoint",
"x": 204.7426717235359,
"y": 121.83804949224633
},
{
"angle": 6,
"type": "VSAPoint",
"x": 192.96544887942403,
"y": 132.77093531995803
},
{
"angle": 6,
"type": "VSAPoint",
"x": 180.33047215024067,
"y": 142.52690252024206
},
{
"angle": 6,
"type": "VSAPoint",
"x": 166.77941315893992,
"y": 151.11976042802337
},
{
"angle": 6,
"type": "VSAPoint",
"x": 152.25394352847593,
"y": 158.56331837822705
},
{
"angle": 6,
"type": "VSAPoint",
"x": 136.69573488180282,
"y": 164.87138570577815
},
{
"angle": 6,
"type": "VSAPoint",
"x": 120.04645884187472,
"y": 170.05777174560163
},
{
"angle": 6,
"type": "VSAPoint",
"x": 102.24778703164574,
"y": 174.13628583262252
},
{
"angle": 6,
"type": "VSAPoint",
"x": 83.24139107407007,
"y": 177.12073730176593
},
{
"angle": 6,
"type": "VSAPoint",
"x": 62.96894259210174,
"y": 179.02493548795684
},
{
"angle": 6,
"type": "VSAPoint",
"x": 41.372113208694955,
"y": 179.86268972612024
},
{
"type": "VSAPoint",
"x": 30,
"y": 179.8423937007874
},
{
"type": "VSAPoint",
"x": 30,
"y": 179.8423937007874
},
{
"angle": 6,
"type": "VSAPoint",
"x": 20.145875001729017,
"y": 179.720863730547
},
{
"angle": 6,
"type": "VSAPoint",
"x": 0.7950194111198827,
"y": 179.1751485130862
},
{
"angle": 6,
"type": "VSAPoint",
"x": -18.07539231789527,
"y": 178.13226300865955
},
{
"angle": 6,
"type": "VSAPoint",
"x": -36.40805954701135,
"y": 176.44333615661134
},
{
"angle": 6,
"type": "VSAPoint",
"x": -54.14568163792326,
"y": 173.95949689628617
},
{
"angle": 6,
"type": "VSAPoint",
"x": -71.23095795232592,
"y": 170.53187416702832
},
{
"angle": 6,
"type": "VSAPoint",
"x": -87.60658785191424,
"y": 166.01159690818236
},
{
"angle": 6,
"type": "VSAPoint",
"x": -99.36282482253289,
"y": 161.77249234140078
},
{
"angle": 6,
"type": "VSAPoint",
"x": -106.96468561280525,
"y": 158.55329619542204
},
{
"angle": 6,
"type": "VSAPoint",
"x": -114.35690319032742,
"y": 154.97719644542758
},
{
"angle": 6,
"type": "VSAPoint",
"x": -121.53231497531124,
"y": 151.02558420883537
},
{
"angle": 6,
"type": "VSAPoint",
"x": -128.4837583879686,
"y": 146.67985060306344
},
{
"angle": 6,
"type": "VSAPoint",
"x": -135.20407084851135,
"y": 141.9213867455299
},
{
"angle": 6,
"type": "VSAPoint",
"x": -141.68608977715135,
"y": 136.73158375365276
},
{
"angle": 6,
"type": "VSAPoint",
"x": -147.92265259410047,
"y": 131.09183274485014
},
{
"angle": 6,
"type": "VSAPoint",
"x": -153.90659671957056,
"y": 124.98352483654003
},
{
"angle": 6,
"type": "VSAPoint",
"x": -159.6307595737735,
"y": 118.3880511461405
},
{
"angle": 6,
"type": "VSAPoint",
"x": -165.08797857692116,
"y": 111.28680279106965
},
{
"angle": 6,
"type": "VSAPoint",
"x": -170.2710911492254,
"y": 103.66117088874549
},
{
"angle": 6,
"type": "VSAPoint",
"x": -175.17293471089806,
"y": 95.49254655658609
},
{
"angle": 6,
"type": "VSAPoint",
"x": -179.78634668215096,
"y": 86.7623209120095
},
{
"angle": 6,
"type": "VSAPoint",
"x": -184.1041644831961,
"y": 77.45188507243378
},
{
"angle": 6,
"type": "VSAPoint",
"x": -188.11922553424526,
"y": 67.54263015527698
},
{
"angle": 6,
"type": "VSAPoint",
"x": -191.82436725551025,
"y": 57.01594727795717
},
{
"angle": 6,
"type": "VSAPoint",
"x": -195.21242706720307,
"y": 45.85322755789239
},
{
"angle": 1,
"type": "VSAPoint",
"x": -196.7716535433071,
"y": 39.999874015748034
}
]
}

View file

@ -0,0 +1,384 @@
{
"vector": [
{
"type": "QPointF",
"x": -214.40410048706303,
"y": 106.19227605396173
},
{
"type": "QPointF",
"x": -216.9781242298884,
"y": -20.89313392788361
},
{
"type": "QPointF",
"x": -215.35485836098246,
"y": -24.393354043554936
},
{
"type": "QPointF",
"x": -209.7562767157775,
"y": -34.987873101637184
},
{
"type": "QPointF",
"x": -203.7225994084282,
"y": -45.04262957134261
},
{
"type": "QPointF",
"x": -197.2592017411557,
"y": -54.551875369384206
},
{
"type": "QPointF",
"x": -190.3770084402063,
"y": -63.507382529616926
},
{
"type": "QPointF",
"x": -183.09315132337335,
"y": -71.8999613577031
},
{
"type": "QPointF",
"x": -175.43105114113442,
"y": -79.72130229205844
},
{
"type": "QPointF",
"x": -167.41981696287192,
"y": -86.96589636811274
},
{
"type": "QPointF",
"x": -159.09298767966857,
"y": -93.6327395233958
},
{
"type": "QPointF",
"x": -150.48678127764902,
"y": -99.72655173152252
},
{
"type": "QPointF",
"x": -141.6381213983865,
"y": -105.25834078893499
},
{
"type": "QPointF",
"x": -132.58274256986527,
"y": -110.24528047379701
},
{
"type": "QPointF",
"x": -123.3536295350981,
"y": -114.71000685261185
},
{
"type": "QPointF",
"x": -113.84186855865212,
"y": -118.73799751458611
},
{
"type": "QPointF",
"x": -99.63478481972699,
"y": -123.86083688137002
},
{
"type": "QPointF",
"x": -80.4254673057649,
"y": -129.16331633704564
},
{
"type": "QPointF",
"x": -60.80620147593467,
"y": -133.0993042749749
},
{
"type": "QPointF",
"x": -40.98267373188483,
"y": -135.87523761240038
},
{
"type": "QPointF",
"x": -20.991626730994923,
"y": -137.71694540420148
},
{
"type": "QPointF",
"x": -0.8595795941342494,
"y": -138.82955600512358
},
{
"type": "QPointF",
"x": 19.34176886539808,
"y": -139.3992560484097
},
{
"type": "QPointF",
"x": 29.510605466044545,
"y": -139.52466732639465
},
{
"type": "QPointF",
"x": 42.106126779057064,
"y": -139.5493542753628
},
{
"type": "QPointF",
"x": 65.59569198261529,
"y": -138.63817965558195
},
{
"type": "QPointF",
"x": 88.1798239338667,
"y": -136.51684423147074
},
{
"type": "QPointF",
"x": 109.76687822830704,
"y": -133.12716866923762
},
{
"type": "QPointF",
"x": 130.3950740635637,
"y": -128.40027734830377
},
{
"type": "QPointF",
"x": 150.07592388593054,
"y": -122.26953121100647
},
{
"type": "QPointF",
"x": 168.79110685051424,
"y": -114.68147034428995
},
{
"type": "QPointF",
"x": 186.49605055143408,
"y": -105.60859505724969
},
{
"type": "QPointF",
"x": 203.13204877377575,
"y": -95.05954726914332
},
{
"type": "QPointF",
"x": 218.64492845706968,
"y": -83.08143693178066
},
{
"type": "QPointF",
"x": 233.00419499996835,
"y": -69.75162023720404
},
{
"type": "QPointF",
"x": 246.21556214467594,
"y": -55.16130598767145
},
{
"type": "QPointF",
"x": 258.3230922830817,
"y": -39.397340281347255
},
{
"type": "QPointF",
"x": 269.40232183582737,
"y": -22.52847449065218
},
{
"type": "QPointF",
"x": 277.7495810952065,
"y": -7.778640262594529
},
{
"type": "QPointF",
"x": 278.4228013054904,
"y": 86.5887898651801
},
{
"type": "QPointF",
"x": 269.4023218358267,
"y": 102.52822252214926
},
{
"type": "QPointF",
"x": 258.3230922830817,
"y": 119.39708831284334
},
{
"type": "QPointF",
"x": 246.2155621446766,
"y": 135.16105401916667
},
{
"type": "QPointF",
"x": 233.00419499996818,
"y": 149.75136826870033
},
{
"type": "QPointF",
"x": 218.64492845706377,
"y": 163.0811849632816
},
{
"type": "QPointF",
"x": 203.1320487737801,
"y": 175.05929530063636
},
{
"type": "QPointF",
"x": 186.496050551439,
"y": 185.60834308874269
},
{
"type": "QPointF",
"x": 168.79110685050364,
"y": 194.6812183757909
},
{
"type": "QPointF",
"x": 150.07592388593088,
"y": 202.26927924250302
},
{
"type": "QPointF",
"x": 130.39507406357035,
"y": 208.40002537979836
},
{
"type": "QPointF",
"x": 109.7668782282991,
"y": 213.12691670073548
},
{
"type": "QPointF",
"x": 88.17982393386717,
"y": 216.5165922629673
},
{
"type": "QPointF",
"x": 65.59569198261497,
"y": 218.6379276870786
},
{
"type": "QPointF",
"x": 42.10612677907077,
"y": 219.54910230685883
},
{
"type": "QPointF",
"x": 29.929173473140324,
"y": 219.52736986819608
},
{
"type": "QPointF",
"x": 19.341768865397754,
"y": 219.39900407990578
},
{
"type": "QPointF",
"x": -0.8595795941341109,
"y": 218.82930403661962
},
{
"type": "QPointF",
"x": -20.991626730995304,
"y": 217.71669343569752
},
{
"type": "QPointF",
"x": -40.982673731885455,
"y": 215.87498564389634
},
{
"type": "QPointF",
"x": -60.80620147594401,
"y": 213.09905230646967
},
{
"type": "QPointF",
"x": -80.42546730575734,
"y": 209.1630643685438
},
{
"type": "QPointF",
"x": -99.63478481972697,
"y": 203.8605849128661
},
{
"type": "QPointF",
"x": -113.84186855865221,
"y": 198.73774554608212
},
{
"type": "QPointF",
"x": -123.35362953510266,
"y": 194.7097548841059
},
{
"type": "QPointF",
"x": -132.58274256986095,
"y": 190.24502850529544
},
{
"type": "QPointF",
"x": -141.6381213983788,
"y": 185.25808882043526
},
{
"type": "QPointF",
"x": -150.48678127765623,
"y": 179.72629976301346
},
{
"type": "QPointF",
"x": -159.0929876796657,
"y": 173.63248755489357
},
{
"type": "QPointF",
"x": -167.41981696287993,
"y": 166.96564439960179
},
{
"type": "QPointF",
"x": -175.43105114113746,
"y": 159.72105032355205
},
{
"type": "QPointF",
"x": -183.09315132337164,
"y": 151.8997093892008
},
{
"type": "QPointF",
"x": -190.37700844020992,
"y": 143.50713056110848
},
{
"type": "QPointF",
"x": -197.25920174115296,
"y": 134.55162340088413
},
{
"type": "QPointF",
"x": -203.72259940842815,
"y": 125.04237760283861
},
{
"type": "QPointF",
"x": -209.7562767157772,
"y": 114.98762113313367
},
{
"type": "QPointF",
"x": -214.40410048706303,
"y": 106.19227605396173
}
]
}

View file

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>input_loop_by_intersection.json</file>
<file>output_loop_by_intersection.json</file>
</qresource>
</RCC>

View file

@ -187,9 +187,15 @@ void TST_VAbstractPiece::EquidistantRemoveLoop_data()
<< OutputPointsIssue923Test6_6();
// See file src/app/share/collection/bugs/loop_by_intersection.val
QTest::newRow("Loop for angle by intersection") << InputLoopByIntersectionTest()
QVector<VSAPoint> input;
AbstractTest::VectorFromJson(QStringLiteral("://input_loop_by_intersection.json"), input);
QVector<QPointF> output;
AbstractTest::VectorFromJson(QStringLiteral("://output_loop_by_intersection.json"), output);
QTest::newRow("Loop for angle by intersection") << input
<< 39.685039370078741 // seam allowance width (1.05 cm)
<< OutputLoopByIntersectionTest();
<< output;
}
//---------------------------------------------------------------------------------------------------------------------
@ -11558,458 +11564,6 @@ QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue923Test6_6()
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<VSAPoint> TST_VAbstractPiece::InputLoopByIntersectionTest()
{
QVector<VSAPoint> points;
VSAPoint p = VSAPoint(-196.771653543307110, 39.999874015748034);
p.SetAngleType(PieceNodeAngle::ByPointsIntersection);
points += p;
p = VSAPoint(-196.771653543307110, 39.999874015748034);
p.SetAngleType(PieceNodeAngle::ByPointsIntersection);
points += p;
p = VSAPoint(-195.212427067203066, 34.146520473603680);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-191.824367255510310, 22.983800753538890);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-188.119225534245260, 12.457117876219073);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-184.104164483196143, 2.547862959062278);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-179.786346682151020, -6.762572880513440);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-175.172934710898062, -15.492798525090029);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-170.271091149225413, -23.661422857249427);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-165.087978576921159, -31.287054759573582);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-159.630759573773560, -38.388303114644444);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-153.906596719570615, -44.983776805043945);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-147.922652594100526, -51.092084713354048);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-141.686089777151409, -56.731835722156688);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-135.204070848511407, -61.921638714033818);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-128.483758387968663, -66.680102571567360);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-121.532314975311294, -71.025836177339286);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-114.356903190327472, -74.977448413931512);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-106.964685612805312, -78.553548163926024);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-99.362824822532943, -81.772744309904709);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-87.606587851914270, -86.011848876686287);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-71.230957952325937, -90.532126135532252);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-54.145681637923275, -93.959748864790100);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-36.408059547011362, -96.443588125115312);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-18.075392317895275, -98.132514977163495);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(0.795019411119881, -99.175400481590174);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(20.145875001729017, -99.721115699050927);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
points += VSAPoint(30.000000000000000, -99.842645669291343);
points += VSAPoint(30.000000000000000, -99.842645669291343);
points += VSAPoint(30.000000000000000, -99.842645669291343);
p = VSAPoint(41.372113208694955, -99.862941694624197);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(62.968942592101740, -99.025187456460770);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(83.241391074070066, -97.120989270269874);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(102.247787031645771, -94.136537801126480);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(120.046458841874724, -90.058023714105531);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(136.695734881802821, -84.871637674282042);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(152.253943528475929, -78.563570346730970);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(166.779413158939917, -71.120012396527272);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(180.330472150240666, -62.527154488745957);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(192.965448879424031, -52.771187288461945);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(204.742671723535892, -41.838301460750259);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(215.720469059622076, -29.714687670685834);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(225.957169264728520, -16.386536583343656);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(235.511100715901080, -1.840038863798699);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(244.440591790185579, 13.938614822874065);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(252.803970864627956, 30.963233811599665);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(256.771653543307139, 39.999874015748034);
p.SetAngleType(PieceNodeAngle::ByPointsIntersection);
points += p;
p = VSAPoint(256.771653543307139, 39.999874015748034);
p.SetAngleType(PieceNodeAngle::ByPointsIntersection);
points += p;
p = VSAPoint(256.771653543307139, 39.999874015748034);
p.SetAngleType(PieceNodeAngle::ByPointsIntersection);
points += p;
p = VSAPoint(252.803970864627956, 49.036514219896404);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(244.440591790185579, 66.061133208621996);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(235.511100715901080, 81.839786895294765);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(225.957169264728520, 96.386284614839724);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(215.720469059622076, 109.714435702181902);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(204.742671723535892, 121.838049492246327);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(192.965448879424031, 132.770935319958028);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(180.330472150240666, 142.526902520242061);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(166.779413158939917, 151.119760428023369);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(152.253943528475929, 158.563318378227052);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(136.695734881802821, 164.871385705778152);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(120.046458841874724, 170.057771745601627);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(102.247787031645743, 174.136285832622519);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(83.241391074070066, 177.120737301765928);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(62.968942592101740, 179.024935487956839);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(41.372113208694955, 179.862689726120237);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
points += VSAPoint(30.000000000000000, 179.842393700787397);
points += VSAPoint(30.000000000000000, 179.842393700787397);
p = VSAPoint(20.145875001729017, 179.720863730546995);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(0.795019411119883, 179.175148513086214);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-18.075392317895268, 178.132263008659550);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-36.408059547011348, 176.443336156611338);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-54.145681637923261, 173.959496896286169);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-71.230957952325923, 170.531874167028320);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-87.606587851914242, 166.011596908182355);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-99.362824822532886, 161.772492341400778);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-106.964685612805255, 158.553296195422035);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-114.356903190327415, 154.977196445427580);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-121.532314975311238, 151.025584208835369);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-128.483758387968606, 146.679850603063443);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-135.204070848511350, 141.921386745529901);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-141.686089777151352, 136.731583753652757);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-147.922652594100470, 131.091832744850137);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-153.906596719570558, 124.983524836540028);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-159.630759573773503, 118.388051146140498);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-165.087978576921159, 111.286802791069647);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-170.271091149225413, 103.661170888745488);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-175.172934710898062, 95.492546556586092);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-179.786346682150963, 86.762320912009500);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-184.104164483196087, 77.451885072433782);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-188.119225534245260, 67.542630155276981);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-191.824367255510253, 57.015947277957167);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-195.212427067203066, 45.853227557892389);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(-196.771653543307110, 39.999874015748034);
p.SetAngleType(PieceNodeAngle::ByPointsIntersection);
points += p;
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<QPointF> TST_VAbstractPiece::OutputLoopByIntersectionTest()
{
QVector<QPointF> points;
points += QPointF(-214.404100487063033, 106.192276053961734);
points += QPointF(-216.978124229888408, -20.893133927883611);
points += QPointF(-215.354858360982462, -24.393354043554936);
points += QPointF(-209.756276715777489, -34.987873101637184);
points += QPointF(-203.722599408428209, -45.042629571342609);
points += QPointF(-197.259201741155692, -54.551875369384206);
points += QPointF(-190.377008440206311, -63.507382529616926);
points += QPointF(-183.093151323373348, -71.899961357703106);
points += QPointF(-175.431051141134418, -79.721302292058439);
points += QPointF(-167.419816962871920, -86.965896368112737);
points += QPointF(-159.092987679668568, -93.632739523395799);
points += QPointF(-150.486781277649015, -99.726551731522520);
points += QPointF(-141.638121398386488, -105.258340788934987);
points += QPointF(-132.582742569865275, -110.245280473797010);
points += QPointF(-123.353629535098094, -114.710006852611855);
points += QPointF(-113.841868558652124, -118.737997514586112);
points += QPointF(-99.634784819726988, -123.860836881370020);
points += QPointF(-80.425467305764897, -129.163316337045643);
points += QPointF(-60.806201475934671, -133.099304274974912);
points += QPointF(-40.982673731884830, -135.875237612400383);
points += QPointF(-20.991626730994923, -137.716945404201482);
points += QPointF(-0.859579594134249, -138.829556005123578);
points += QPointF(19.341768865398080, -139.399256048409711);
points += QPointF(29.510605466044545, -139.524667326394649);
points += QPointF(42.106126779057064, -139.549354275362788);
points += QPointF(65.595691982615293, -138.638179655581951);
points += QPointF(88.179823933866700, -136.516844231470742);
points += QPointF(109.766878228307036, -133.127168669237619);
points += QPointF(130.395074063563698, -128.400277348303774);
points += QPointF(150.075923885930536, -122.269531211006466);
points += QPointF(168.791106850514240, -114.681470344289949);
points += QPointF(186.496050551434081, -105.608595057249687);
points += QPointF(203.132048773775750, -95.059547269143323);
points += QPointF(218.644928457069682, -83.081436931780658);
points += QPointF(233.004194999968348, -69.751620237204037);
points += QPointF(246.215562144675943, -55.161305987671447);
points += QPointF(258.323092283081678, -39.397340281347255);
points += QPointF(269.402321835827365, -22.528474490652179);
points += QPointF(277.749581095206509, -7.778640262594529);
points += QPointF(278.422801305490395, 86.588789865180104);
points += QPointF(269.402321835826683, 102.528222522149264);
points += QPointF(258.323092283081678, 119.397088312843337);
points += QPointF(246.215562144676596, 135.161054019166670);
points += QPointF(233.004194999968178, 149.751368268700332);
points += QPointF(218.644928457063770, 163.081184963281601);
points += QPointF(203.132048773780099, 175.059295300636364);
points += QPointF(186.496050551438998, 185.608343088742686);
points += QPointF(168.791106850503638, 194.681218375790905);
points += QPointF(150.075923885930877, 202.269279242503018);
points += QPointF(130.395074063570348, 208.400025379798365);
points += QPointF(109.766878228299106, 213.126916700735478);
points += QPointF(88.179823933867169, 216.516592262967293);
points += QPointF(65.595691982614966, 218.637927687078587);
points += QPointF(42.106126779070770, 219.549102306858828);
points += QPointF(29.929173473140324, 219.527369868196075);
points += QPointF(19.341768865397754, 219.399004079905779);
points += QPointF(-0.859579594134111, 218.829304036619618);
points += QPointF(-20.991626730995304, 217.716693435697522);
points += QPointF(-40.982673731885455, 215.874985643896338);
points += QPointF(-60.806201475944007, 213.099052306469673);
points += QPointF(-80.425467305757337, 209.163064368543786);
points += QPointF(-99.634784819726974, 203.860584912866102);
points += QPointF(-113.841868558652209, 198.737745546082124);
points += QPointF(-123.353629535102655, 194.709754884105905);
points += QPointF(-132.582742569860955, 190.245028505295437);
points += QPointF(-141.638121398378786, 185.258088820435262);
points += QPointF(-150.486781277656235, 179.726299763013458);
points += QPointF(-159.092987679665697, 173.632487554893572);
points += QPointF(-167.419816962879935, 166.965644399601786);
points += QPointF(-175.431051141137459, 159.721050323552049);
points += QPointF(-183.093151323371643, 151.899709389200808);
points += QPointF(-190.377008440209920, 143.507130561108482);
points += QPointF(-197.259201741152964, 134.551623400884125);
points += QPointF(-203.722599408428152, 125.042377602838613);
points += QPointF(-209.756276715777204, 114.987621133133672);
points += QPointF(-214.404100487063033, 106.192276053961734);
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<VSAPoint> TST_VAbstractPiece::InputPointsIssue937Case1() const
{