From d03f378a592bcb3550cc59467dbf9bf5f11641ab Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 29 Oct 2022 15:58:14 +0300 Subject: [PATCH] Fix incorrect seam allowance. Closes #181 Case #2. --- .../bugs/smart_pattern_#184_case2.val | 913 ++++++++++++++++++ .../bugs/smart_pattern_#184_case2.vit | 47 + src/libs/vlayout/vabstractpiece.h | 47 +- .../share/smart_pattern_#184_case2/input.json | 532 ++++++++++ .../smart_pattern_#184_case2/output.json | 309 ++++++ src/test/ValentinaTest/share/test_data.qrc | 2 + src/test/ValentinaTest/tst_vabstractpiece.cpp | 6 + 7 files changed, 1847 insertions(+), 9 deletions(-) create mode 100644 src/app/share/collection/bugs/smart_pattern_#184_case2.val create mode 100644 src/app/share/collection/bugs/smart_pattern_#184_case2.vit create mode 100644 src/test/ValentinaTest/share/smart_pattern_#184_case2/input.json create mode 100644 src/test/ValentinaTest/share/smart_pattern_#184_case2/output.json diff --git a/src/app/share/collection/bugs/smart_pattern_#184_case2.val b/src/app/share/collection/bugs/smart_pattern_#184_case2.val new file mode 100644 index 000000000..b078872c3 --- /dev/null +++ b/src/app/share/collection/bugs/smart_pattern_#184_case2.val @@ -0,0 +1,913 @@ + + + + 0.9.2 + cm + Jeans mit gerader Seitennaht +Müller u. Sohn Zeitschrift Ausgabe 10.20 , Seite 47-50 vom PDf (bzw. 14 - 17 vom Herrenteil) + 17.10.20: +Anpassugen für die Kurzhose -> enger am Saum (-3.5) +Hosenschlitzuntertritt gerade an der oberen Kante + Jeans Selvedge + #4 + CrazyRori + + 2000-01-01 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/share/collection/bugs/smart_pattern_#184_case2.vit b/src/app/share/collection/bugs/smart_pattern_#184_case2.vit new file mode 100644 index 000000000..5cb510489 --- /dev/null +++ b/src/app/share/collection/bugs/smart_pattern_#184_case2.vit @@ -0,0 +1,47 @@ + + + + 0.5.1 + false + Nach Messung wegen Büste am 16.03.2021 +Brustumfang : 88 -> 86 +Taille: 79 -> 76 +Hüfte: 92 -> 94 +Halsumfang: 39.5 -> 37 + cm + 998 + + Ronan + 1987-04-03 + male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libs/vlayout/vabstractpiece.h b/src/libs/vlayout/vabstractpiece.h index e2a524266..6b6dd8761 100644 --- a/src/libs/vlayout/vabstractpiece.h +++ b/src/libs/vlayout/vabstractpiece.h @@ -333,7 +333,13 @@ inline auto VAbstractPiece::RemoveDublicates(const QVector &points, bool remo template inline auto VAbstractPiece::ComparePoints(QVector &points, const T &p1, const T &p2, qreal accuracy) -> bool { - if (not VFuzzyComparePoints(p1, p2, accuracy)) + qreal testAccuracy = accuracy; + if (p2.TurnPoint()) + { + testAccuracy = accuracyPointOnLine; + } + + if (not VFuzzyComparePoints(p1, p2, testAccuracy)) { points.append(p2); return false; @@ -358,7 +364,7 @@ inline auto VAbstractPiece::ComparePoints(QVector &points, const VR qreal accuracy) -> bool { qreal testAccuracy = accuracy; - if (p1.Primary() && p2.Primary()) + if ((p1.Primary() && p2.Primary()) || p2.TurnPoint()) { testAccuracy = accuracyPointOnLine; } @@ -400,17 +406,30 @@ inline auto VAbstractPiece::ComparePoints(QVector &points, con template inline auto VAbstractPiece::CompareFirstAndLastPoints(QVector &points, qreal accuracy) -> void { - const T& l = ConstLast(points); - if (VFuzzyComparePoints(ConstFirst(points), l, accuracy)) + if (points.isEmpty()) + { + return; + } + + const T& first = ConstFirst(points); + const T& last = ConstLast(points); + + qreal testAccuracy = accuracy; + if (last.TurnPoint()) + { + testAccuracy = accuracyPointOnLine; + } + + if (VFuzzyComparePoints(first, last, testAccuracy)) { points.removeLast(); - if (not points.isEmpty() && l.TurnPoint()) + if (last.TurnPoint()) { points.last().SetTurnPoint(true); } - if (not points.isEmpty() && l.CurvePoint()) + if (last.CurvePoint()) { points.last().SetCurvePoint(true); } @@ -421,11 +440,16 @@ inline auto VAbstractPiece::CompareFirstAndLastPoints(QVector &points, qreal template <> inline auto VAbstractPiece::CompareFirstAndLastPoints(QVector &points, qreal accuracy) -> void { + if (points.isEmpty()) + { + return; + } + const VRawSAPoint& first = ConstFirst(points); const VRawSAPoint& last = ConstLast(points); qreal testAccuracy = accuracy; - if (first.Primary() && last.Primary()) + if ((first.Primary() && last.Primary()) || last.TurnPoint()) { testAccuracy = accuracyPointOnLine; } @@ -434,12 +458,12 @@ inline auto VAbstractPiece::CompareFirstAndLastPoints(QVector &poin { points.removeLast(); - if (not points.isEmpty() && last.TurnPoint()) + if (last.TurnPoint()) { points.last().SetTurnPoint(true); } - if (not points.isEmpty() && last.CurvePoint()) + if (last.CurvePoint()) { points.last().SetCurvePoint(true); } @@ -450,6 +474,11 @@ inline auto VAbstractPiece::CompareFirstAndLastPoints(QVector &poin template <> inline auto VAbstractPiece::CompareFirstAndLastPoints(QVector &points, qreal accuracy) -> void { + if (points.isEmpty()) + { + return; + } + if (VFuzzyComparePoints(ConstFirst(points), ConstLast(points), accuracy)) { points.removeLast(); diff --git a/src/test/ValentinaTest/share/smart_pattern_#184_case2/input.json b/src/test/ValentinaTest/share/smart_pattern_#184_case2/input.json new file mode 100644 index 000000000..4c7512592 --- /dev/null +++ b/src/test/ValentinaTest/share/smart_pattern_#184_case2/input.json @@ -0,0 +1,532 @@ +{ + "vector": [ + { + "curvePoint": true, + "turnPoint": true, + "type": "VSAPoint", + "x": 224.6048503937008, + "y": 216.60472440944795 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 245.9831330966033, + "y": 220.17257958063607 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 291.46679343041006, + "y": 227.0461179118596 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 364.52518055401504, + "y": 236.70247215334314 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 469.1325076000883, + "y": 247.86857553312865 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 577.5743326676327, + "y": 256.7058416346813 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 658.7810280868638, + "y": 261.4134166599198 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 711.933684463613, + "y": 263.6292804346774 + }, + { + "curvePoint": true, + "saAfter": 26.45669291338583, + "turnPoint": true, + "type": "VSAPoint", + "x": 713.3613080810678, + "y": 263.64411171143365 + }, + { + "saAfter": 26.45669291338583, + "turnPoint": true, + "type": "VSAPoint", + "x": 713.3613080810678, + "y": 263.64411171143365 + }, + { + "curvePoint": true, + "saAfter": 26.45669291338583, + "turnPoint": true, + "type": "VSAPoint", + "x": 713.3613080810678, + "y": 263.64411171143365 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 713.3035236769979, + "y": 279.12505681465785 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 711.5329324608736, + "y": 308.3182431387012 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 707.8596291446635, + "y": 335.45485602052304 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 702.376185716696, + "y": 360.60808570086215 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 695.1751741652995, + "y": 383.85112242045693 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 686.3491664788025, + "y": 405.257156420046 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 675.9907346455333, + "y": 424.8993779403678 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 664.1924506538203, + "y": 442.8509772221611 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 651.0468864919919, + "y": 459.1851445061642 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 636.6466141483768, + "y": 473.97507003311586 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 621.084205611303, + "y": 487.2939440437546 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 604.452232869099, + "y": 499.214956778819 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 586.8432679100935, + "y": 509.8112984790474 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 568.3498827226143, + "y": 519.1561593851786 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 549.0646492949903, + "y": 527.322729737951 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 529.0801396155499, + "y": 534.3841997781034 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 508.4889256726213, + "y": 540.4137597463741 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 487.383579454533, + "y": 545.4845998835017 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 465.8566729496133, + "y": 549.669910430225 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 444.00077814619067, + "y": 553.0428816272822 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 410.8147788967925, + "y": 556.8179762623377 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 366.2399233588707, + "y": 559.5681654473192 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 322.01541041684857, + "y": 560.386421566931 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 278.88181597735314, + "y": 559.8582665470818 + }, + { + "angle": 6, + "curvePoint": true, + "saAfter": 26.45669291338583, + "saBefore": 26.45669291338583, + "type": "VSAPoint", + "x": 217.47911152245808, + "y": 557.807668134329 + }, + { + "curvePoint": true, + "saBefore": 26.45669291338583, + "turnPoint": true, + "type": "VSAPoint", + "x": 180.83408330506586, + "y": 556.5191060511406 + }, + { + "saBefore": 26.45669291338583, + "turnPoint": true, + "type": "VSAPoint", + "x": 180.83408330506586, + "y": 556.5191060511406 + }, + { + "curvePoint": true, + "saBefore": 26.45669291338583, + "turnPoint": true, + "type": "VSAPoint", + "x": 180.83408330506586, + "y": 556.5191060511406 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 182.38398581146782, + "y": 532.9852435860578 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 185.44048157061547, + "y": 494.0257283032287 + }, + { + "curvePoint": true, + "turnPoint": true, + "type": "VSAPoint", + "x": 186.8095748031496, + "y": 481.1716535433062 + }, + { + "turnPoint": true, + "type": "VSAPoint", + "x": 186.8095748031496, + "y": 481.1716535433062 + }, + { + "curvePoint": true, + "turnPoint": true, + "type": "VSAPoint", + "x": 186.8095748031496, + "y": 481.1716535433062 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 187.15428302912747, + "y": 476.5477474703052 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 187.87944258838428, + "y": 467.3298344951331 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 188.64644719709133, + "y": 458.15010131230974 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 189.4541338782364, + "y": 449.01110435222677 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 190.30133965480724, + "y": 439.91540004527576 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 191.18690154979166, + "y": 430.86554482184846 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 192.1096565861774, + "y": 421.86409511233677 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 193.0684417869523, + "y": 412.9136073471322 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 194.06209417510402, + "y": 404.0166379566264 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 195.0894507736204, + "y": 395.17574337121135 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 196.14934860548925, + "y": 386.3934800212787 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 197.24062469369824, + "y": 377.67240433722 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 198.93027019270912, + "y": 364.70266253339594 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 201.28713618302152, + "y": 347.6583143252233 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 203.74858161247448, + "y": 330.9047325275976 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 206.30530266497027, + "y": 314.4623685836526 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 208.94799552441106, + "y": 298.35167393652205 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 211.66735637469895, + "y": 282.5931000293396 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 214.45408139973614, + "y": 267.20709830523896 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 217.29886678342484, + "y": 252.2141202073538 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 220.19240870966712, + "y": 237.63461717881785 + }, + { + "angle": 6, + "curvePoint": true, + "type": "VSAPoint", + "x": 223.1254033623652, + "y": 223.4890406627648 + }, + { + "curvePoint": true, + "turnPoint": true, + "type": "VSAPoint", + "x": 224.6048503937008, + "y": 216.60472440944795 + }, + { + "turnPoint": true, + "type": "VSAPoint", + "x": 224.6048503937008, + "y": 216.60472440944795 + } + ] +} diff --git a/src/test/ValentinaTest/share/smart_pattern_#184_case2/output.json b/src/test/ValentinaTest/share/smart_pattern_#184_case2/output.json new file mode 100644 index 000000000..4ae1978a2 --- /dev/null +++ b/src/test/ValentinaTest/share/smart_pattern_#184_case2/output.json @@ -0,0 +1,309 @@ +{ + "vector": [ + { + "type": "QPointF", + "x": 195.15567853216373, + "y": 173.75248244594135 + }, + { + "type": "QPointF", + "x": 251.8496589775841, + "y": 182.60601155627035 + }, + { + "type": "QPointF", + "x": 296.85954307337846, + "y": 189.6349115552444 + }, + { + "type": "QPointF", + "x": 369.007905102917, + "y": 199.17098494982014 + }, + { + "type": "QPointF", + "x": 472.6737981640372, + "y": 210.2365968105307 + }, + { + "type": "QPointF", + "x": 580.2032976753702, + "y": 218.99951462712536 + }, + { + "type": "QPointF", + "x": 660.6187507187317, + "y": 223.66122110878825 + }, + { + "type": "QPointF", + "x": 714.5017169480079, + "y": 225.7839525376434 + }, + { + "type": "QPointF", + "x": 739.9503605644416, + "y": 228.2332063215173 + }, + { + "type": "QPointF", + "x": 739.7600322895237, + "y": 279.22380876899564 + }, + { + "type": "QPointF", + "x": 737.8818342069875, + "y": 310.89705814643605 + }, + { + "type": "QPointF", + "x": 733.9350112494886, + "y": 340.05430368020205 + }, + { + "type": "QPointF", + "x": 727.9838826838848, + "y": 367.3528626302937 + }, + { + "type": "QPointF", + "x": 720.0917296872077, + "y": 392.8267284322239 + }, + { + "type": "QPointF", + "x": 710.3329330819713, + "y": 416.4950889579415 + }, + { + "type": "QPointF", + "x": 698.798965618762, + "y": 438.3664250411599 + }, + { + "type": "QPointF", + "x": 685.6020167016862, + "y": 458.446153488792 + }, + { + "type": "QPointF", + "x": 670.8743765270159, + "y": 476.746146958088 + }, + { + "type": "QPointF", + "x": 654.7631831372755, + "y": 493.2932888939297 + }, + { + "type": "QPointF", + "x": 637.4220853257717, + "y": 508.1344297370945 + }, + { + "type": "QPointF", + "x": 619.0025505856497, + "y": 521.3366825073729 + }, + { + "type": "QPointF", + "x": 599.6472647992664, + "y": 532.9838873473826 + }, + { + "type": "QPointF", + "x": 580.2818460317859, + "y": 542.7693940535123 + }, + { + "type": "QPointF", + "x": 559.3811987652081, + "y": 551.6851066117657 + }, + { + "type": "QPointF", + "x": 537.8944645780342, + "y": 559.3294252805705 + }, + { + "type": "QPointF", + "x": 515.9238296398861, + "y": 565.8042855958079 + }, + { + "type": "QPointF", + "x": 493.56426020701815, + "y": 571.2092142702913 + }, + { + "type": "QPointF", + "x": 470.9058986086158, + "y": 575.6403151278347 + }, + { + "type": "QPointF", + "x": 448.036009293878, + "y": 579.1900327053227 + }, + { + "type": "QPointF", + "x": 413.8050913239095, + "y": 583.1051334213272 + }, + { + "type": "QPointF", + "x": 367.86915615355093, + "y": 585.9746457204247 + }, + { + "type": "QPointF", + "x": 322.5048368658643, + "y": 586.8385871052027 + }, + { + "type": "QPointF", + "x": 278.55788777337693, + "y": 586.312976343862 + }, + { + "type": "QPointF", + "x": 216.5960588135848, + "y": 584.2496199878984 + }, + { + "type": "QPointF", + "x": 141.30500035849337, + "y": 581.6021751325729 + }, + { + "type": "QPointF", + "x": 144.6704098156269, + "y": 530.5014878469375 + }, + { + "type": "QPointF", + "x": 147.7609847369758, + "y": 491.0696539926844 + }, + { + "type": "QPointF", + "x": 147.82560243889475, + "y": 490.3374055310549 + }, + { + "type": "QPointF", + "x": 149.50392925590208, + "y": 473.22120820648 + }, + { + "type": "QPointF", + "x": 150.2005794295075, + "y": 464.36569414414555 + }, + { + "type": "QPointF", + "x": 150.98241475569833, + "y": 455.00311589457493 + }, + { + "type": "QPointF", + "x": 151.80560259391274, + "y": 445.68380077440054 + }, + { + "type": "QPointF", + "x": 152.6689554001555, + "y": 436.4101878867955 + }, + { + "type": "QPointF", + "x": 153.5712882007978, + "y": 427.1847175582135 + }, + { + "type": "QPointF", + "x": 154.51141851569164, + "y": 418.00983111504837 + }, + { + "type": "QPointF", + "x": 155.4881662934569, + "y": 408.88797065230546 + }, + { + "type": "QPointF", + "x": 156.50035385891144, + "y": 399.82157879320533 + }, + { + "type": "QPointF", + "x": 157.54680587271017, + "y": 390.8130984383848 + }, + { + "type": "QPointF", + "x": 158.62634930339635, + "y": 381.8649725032467 + }, + { + "type": "QPointF", + "x": 159.73781341212927, + "y": 372.9796436417701 + }, + { + "type": "QPointF", + "x": 161.45169639136878, + "y": 359.82010554108183 + }, + { + "type": "QPointF", + "x": 163.8481003157607, + "y": 342.4813026103761 + }, + { + "type": "QPointF", + "x": 166.3547364853786, + "y": 325.4108082856301 + }, + { + "type": "QPointF", + "x": 168.95883039150078, + "y": 308.6551432829877 + }, + { + "type": "QPointF", + "x": 171.65116175672443, + "y": 292.2337455394885 + }, + { + "type": "QPointF", + "x": 174.42255615162088, + "y": 276.1659923354588 + }, + { + "type": "QPointF", + "x": 177.26389081868388, + "y": 260.47118103208635 + }, + { + "type": "QPointF", + "x": 180.1661026452782, + "y": 245.16850565456124 + }, + { + "type": "QPointF", + "x": 183.1201989181002, + "y": 230.27702802640368 + }, + { + "type": "QPointF", + "x": 186.11727175090903, + "y": 215.815641703057 + }, + { + "type": "QPointF", + "x": 195.15567853216373, + "y": 173.75248244594135 + } + ] +} diff --git a/src/test/ValentinaTest/share/test_data.qrc b/src/test/ValentinaTest/share/test_data.qrc index 85b2e5a06..3f753fe63 100644 --- a/src/test/ValentinaTest/share/test_data.qrc +++ b/src/test/ValentinaTest/share/test_data.qrc @@ -157,5 +157,7 @@ hood_2/output.json smart_pattern_#184_case1/input.json smart_pattern_#184_case1/output.json + smart_pattern_#184_case2/input.json + smart_pattern_#184_case2/output.json diff --git a/src/test/ValentinaTest/tst_vabstractpiece.cpp b/src/test/ValentinaTest/tst_vabstractpiece.cpp index a823a9728..092d3c7a4 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.cpp +++ b/src/test/ValentinaTest/tst_vabstractpiece.cpp @@ -961,6 +961,12 @@ void TST_VAbstractPiece::BrokenDetailEquidistant_data() ASSERT_TEST_CASE("Issue #184 case 1", QStringLiteral("://smart_pattern_#184_case1/input.json"), QStringLiteral("://smart_pattern_#184_case1/output.json"), + 0.88157480314960635 /*seam allowance width*/); + + // See the file "collection/bugs/smart_pattern_#184_case2.val" + ASSERT_TEST_CASE("Issue #184 case 2", + QStringLiteral("://smart_pattern_#184_case2/input.json"), + QStringLiteral("://smart_pattern_#184_case2/output.json"), 37.795275590551185 /*seam allowance width*/); }