Resolved issue #861. Valentina hangs if pattern has too many loops.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-07-12 20:21:24 +03:00
parent da36b9541c
commit ef6dd49202
2 changed files with 532 additions and 120 deletions

View File

@ -874,12 +874,12 @@ bool VAbstractPiece::CheckIntersection(const QVector<QPointF> &points, int i, in
{ {
QVector<QPointF> sub1 = SubPath(points, iNext, j); QVector<QPointF> sub1 = SubPath(points, iNext, j);
sub1.append(crossPoint); sub1.append(crossPoint);
sub1 = CheckLoops(CorrectEquidistantPoints(sub1, false)); sub1 = CorrectEquidistantPoints(sub1, false);
const qreal sub1Sum = SumTrapezoids(sub1); const qreal sub1Sum = SumTrapezoids(sub1);
QVector<QPointF> sub2 = SubPath(points, jNext, i); QVector<QPointF> sub2 = SubPath(points, jNext, i);
sub2.append(crossPoint); sub2.append(crossPoint);
sub2 = CheckLoops(CorrectEquidistantPoints(sub2, false)); sub2 = CorrectEquidistantPoints(sub2, false);
const qreal sub2Sum = SumTrapezoids(sub2); const qreal sub2Sum = SumTrapezoids(sub2);
if (sub1Sum < 0 && sub2Sum < 0) if (sub1Sum < 0 && sub2Sum < 0)

View File

@ -3592,129 +3592,541 @@ void TST_VAbstractPiece::PossibleInfiniteClearLoops_data() const
QTest::addColumn<QVector<QPointF>>("expect"); QTest::addColumn<QVector<QPointF>>("expect");
QVector<QPointF> path; QVector<QPointF> path;
path << QPointF(-670.6449010946802, 4046.36220472441); path << QPointF(-632.849625504129, 4084.1574803149606);
path << QPointF(-1025.9051277126944, 4046.36220472441); path << QPointF(-1063.1826742777307, 4084.157480314961);
path << QPointF(-1026.4460203880594, 4010.5247429150854); path << QPointF(-1064.731669053407, 3971.857538662673);
path << QPointF(-1027.2972172274538, 3924.202328582098); path << QPointF(-1065.9335577016843, 3768.725259939178);
path << QPointF(-1028.1383921346433, 3768.5948526129496); path << QPointF(-1066.3064907565738, 3389.730086730216);
path << QPointF(-1028.5065585022217, 3521.575730066707); path << QPointF(-1064.2157605861642, 2590.593584914368);
path << QPointF(-1028.2712136539103, 3252.2436039362233); path << QPointF(-1063.7002274798474, 2353.011824334406);
path << QPointF(-1027.2910122410117, 2850.1024469719814); path << QPointF(-1063.5730500368766, 2323.3511600791016);
path << QPointF(-1025.9446023682538, 2439.350819630564); path << QPointF(-1061.2277890821085, 2265.404475234159);
path << QPointF(-1025.8983315247287, 2338.629525677473); path << QPointF(-1056.6870752377622, 2208.99511667452);
path << QPointF(-1025.3536572186458, 2309.970015878699); path << QPointF(-1050.3195580618494, 2154.1593979456843);
path << QPointF(-1024.2100836932389, 2281.714612342931); path << QPointF(-1042.4881941434103, 2100.7853411906426);
path << QPointF(-1022.5102766116828, 2253.846781520112); path << QPointF(-1033.5464923745499, 2048.7106381836265);
path << QPointF(-1020.2969016371525, 2226.349989860186); path << QPointF(-1018.9140925348769, 1972.9298208633923);
path << QPointF(-1017.6126244328227, 2199.207703813094); path << QPointF(-998.7073870145719, 1875.5283486595902);
path << QPointF(-1014.5001106618688, 2172.403389828782); path << QPointF(-984.743852909139, 1804.5663725038373);
path << QPointF(-1011.0020259874652, 2145.9205143571917); path << QPointF(-976.5700399899772, 1758.126392406043);
path << QPointF(-1005.1601480132764, 2106.7277181407126); path << QPointF(-969.6857320440495, 1712.1364207718836);
path << QPointF(-996.3625412018714, 2055.4921956731814); path << QPointF(-964.4132563582218, 1666.50830864049);
path << QPointF(-986.7906327138169, 2005.2448233555149); path << QPointF(-961.0600449902615, 1621.1025089368645);
path << QPointF(-976.785747854512, 1955.8533327872588); path << QPointF(-959.9236450523174, 1575.5823241167095);
path << QPointF(-961.6606968634906, 1883.0158867454916); path << QPointF(-960.3877919929658, 1553.2712054750111);
path << QPointF(-947.5864881030896, 1811.4914675744105); path << QPointF(-1000.3562458795624, 801.8642724069981);
path << QPointF(-939.2629508127773, 1764.2008199992524); path << QPointF(-954.5715133777537, 803.7344759255401);
path << QPointF(-933.8852659113251, 1728.8707137815559); path << QPointF(-946.442743379301, 803.5582812808202);
path << QPointF(-930.742733377741, 1705.3464944792456); path << QPointF(-934.1053985018102, 802.2501117597377);
path << QPointF(-928.0252775410311, 1681.829576238578); path << QPointF(-917.288618935481, 798.3566841198939);
path << QPointF(-925.7755640643697, 1658.3034255094963); path << QPointF(-900.5071817401116, 792.3119964649148);
path << QPointF(-924.036258610932, 1634.7515087419433); path << QPointF(-883.7147885675736, 784.220662585902);
path << QPointF(-922.850026843893, 1611.1572923858625); path << QPointF(-867.1260743218684, 774.3001167278098);
path << QPointF(-922.2595344264276, 1587.504242891197); path << QPointF(-850.9648599763401, 762.8198974992881);
path << QPointF(-922.3074470217107, 1563.7758267078902); path << QPointF(-835.447350962678, 750.0867405201303);
path << QPointF(-922.613405031688, 1551.8740157480315); path << QPointF(-820.7766612220335, 736.4325408317882);
path << QPointF(-960.4086806222392, 841.3228346456693); path << QPointF(-807.1431378915719, 722.2070808806341);
path << QPointF(-954.9336313684444, 841.5464781141166); path << QPointF(-794.7272455389146, 707.7755421404892);
path << QPointF(-944.0363771538431, 841.3102753632543); path << QPointF(-783.7035642522673, 693.5210466193306);
path << QPointF(-933.2160856340209, 840.291423017261); path << QPointF(-774.2455412061727, 679.8541880091894);
path << QPointF(-922.4878118569704, 838.5316299985567); path << QPointF(-766.5311200750891, 667.2357322468891);
path << QPointF(-911.8666108706839, 836.0726052295611); path << QPointF(-760.7485749482415, 656.23004395692);
path << QPointF(-901.3675377231535, 832.9560576326933); path << QPointF(-756.9262152588784, 647.247947787771);
path << QPointF(-891.005647462372, 829.2236961303737); path << QPointF(-755.9943940773794, 644.3431344612932);
path << QPointF(-880.7959951363317, 824.9172296450213); path << QPointF(-754.3168933441153, 638.3087537000382);
path << QPointF(-870.7536357930251, 820.0783670990559); path << QPointF(-751.4615751472361, 624.0253762908213);
path << QPointF(-860.893624480444, 814.7488174148973); path << QPointF(-749.4776362727711, 608.4387853126539);
path << QPointF(-851.2310162465817, 808.9702895149649); path << QPointF(-748.2151911179384, 591.5292381129454);
path << QPointF(-841.7808661394299, 802.7844923216785); path << QPointF(-746.9479910213331, 542.1593888936636);
path << QPointF(-832.5582292069812, 796.2331347574575); path << QPointF(-745.6944329547541, 462.8644227516688);
path << QPointF(-823.578160497228, 789.3579257447218); path << QPointF(-746.1883646034397, 475.16878663047623);
path << QPointF(-810.5607800373014, 778.5565764202543); path << QPointF(-746.2871460461391, 402.8988101963411);
path << QPointF(-794.2367125298769, 763.3635567727296); path << QPointF(-746.6738371191002, 321.4553283654042);
path << QPointF(-779.1539087770976, 747.6258919346988); path << QPointF(-748.4567648247277, 258.62151802315526);
path << QPointF(-765.4328091629026, 731.6772532855191); path << QPointF(-750.7314894991164, 217.2362191509505);
path << QPointF(-753.193854071231, 715.8513122045474); path << QPointF(-754.2100293185232, 176.77268647996522);
path << QPointF(-742.557483886022, 700.4817400711408); path << QPointF(-759.1411805604763, 137.7638902918793);
path << QPointF(-733.644138991215, 685.9022082646563); path << QPointF(-767.9139385171914, 85.8954360711639);
path << QPointF(-726.5742597707488, 672.446388164451); path << QPointF(-193.4615393890781, -82.57772819388018);
path << QPointF(-721.4682866085625, 660.447951149882); path << QPointF(-182.84881484970134, -44.475315462966144);
path << QPointF(-718.6229063234249, 651.1532303788147); path << QPointF(-181.7932001092176, -42.33768474083549);
path << QPointF(-716.6036430255488, 642.9038041285014); path << QPointF(-179.7528132464526, -39.70760839675285);
path << QPointF(-714.137568179324, 630.1235656609365); path << QPointF(-175.73839974706917, -36.02046568979708);
path << QPointF(-711.8605525364693, 612.2344502588126); path << QPointF(-169.4580785677048, -31.6599263589561);
path << QPointF(-710.4560555432737, 593.4222205889721); path << QPointF(-160.89874469571305, -27.009347306192694);
path << QPointF(-709.4234847119759, 563.5940176156308); path << QPointF(-150.1810493329971, -22.35672237054398);
path << QPointF(-708.952111561728, 520.4666582691573); path << QPointF(-137.46941549286484, -17.896128595814076);
path << QPointF(-708.4401766852314, 497.3858267716535); path << QPointF(-122.93209920666818, -13.753254741366646);
path << QPointF(-400.92922424489655, 469.03937007874015); path << QPointF(-106.85016673407813, -10.037145814867706);
path << QPointF(-708.4401766852314, 440.6929133858268); path << QPointF(-79.81702769536884, -5.199728384059749);
path << QPointF(-708.7078446526739, 341.66122584661264); path << QPointF(-38.971630241556646, -0.5839317964807336);
path << QPointF(-709.3427685457568, 299.60322373665383); path << QPointF(6.260161746717735, 1.9210182870405856);
path << QPointF(-710.6909230403871, 257.048095841136); path << QPointF(69.51425695996898, 2.8396504979139623);
path << QPointF(-713.0251717477311, 214.57984397612822); path << QPointF(-7.937007874015748, 1590.5905795945973);
path << QPointF(-715.632864794307, 183.1716335401434); path << QPointF(-7.937007874015748, 2353.1338582677163);
path << QPointF(-717.7953694429818, 162.55016633308693); path << QPointF(-7.937007874015748, 4084.157480314961);
path << QPointF(-720.3578834261159, 142.27891915519677); path << QPointF(-335.49606299212604, 4084.157480314961);
path << QPointF(-723.3545146951046, 122.43089223348173); path << QPointF(-335.49606299212604, 2116.117122071213);
path << QPointF(-725.0465030138121, 112.71059563115871); path << QPointF(-260.2892300303194, 1589.6692913385828);
path << QPointF(-219.59055118110237, -35.52755905511811); path << QPointF(-297.70078740157464, 1327.7883897398);
path << QPointF(-218.99352387527398, -33.21125072212394); path << QPointF(-335.11234477282926, 1589.6692913385828);
path << QPointF(-217.35724543521775, -28.699086141666157); path << QPointF(-259.9055118110237, 2116.1171220712135);
path << QPointF(-215.20035586903225, -24.33136255454731); path << QPointF(-259.9055118110237, 4084.1574803149606);
path << QPointF(-212.53403014110648, -20.10796717265881); path << QPointF(-708.4401766852314, 4084.157480314961);
path << QPointF(-209.36944321582945, -16.02878720789205); path << QPointF(-708.4401766852314, 2022.3251007369636);
path << QPointF(-205.71777005759026, -12.093709872138447); path << QPointF(-660.76090517769, 1570.7716535433071);
path << QPointF(-201.59018563077785, -8.302622377289406); path << QPointF(-670.6449010946802, 1477.1638385065562);
path << QPointF(-196.99786489978123, -4.65541193523633); path << QPointF(-680.5288970116704, 1570.7716535433071);
path << QPointF(-189.3170483291933, 0.5638303631539586); path << QPointF(-632.849625504129, 2022.3251007369636);
path << QPointF(-177.47808861476295, 6.996342387787443); path << QPointF(-632.849625504129, 4084.1574803149606);
path << QPointF(-163.981333042598, 12.855376387191757);
path << QPointF(-148.91618132781048, 18.141834666235646);
path << QPointF(-132.37203318551252, 22.856619529787864);
path << QPointF(-114.43828833081622, 27.00063328271716);
path << QPointF(-95.20434647883366, 30.574778229892296);
path << QPointF(-74.75960734467688, 33.57995667618201);
path << QPointF(-53.193470643458, 36.01707092645505);
path << QPointF(-30.595336090289106, 37.887023285580185);
path << QPointF(-7.0546034002822875, 39.19071605842615);
path << QPointF(17.339327711450373, 39.929051549861704);
path << QPointF(29.858267716535437, 40.06299212598426);
path << QPointF(-45.73228346456693, 1589.6692913385828);
path << QPointF(-45.73228346456693, 4046.36220472441);
path << QPointF(-297.70078740157487, 4046.36220472441);
path << QPointF(-297.70078740157487, 2118.8031496062995);
path << QPointF(-222.1102362204725, 1589.6692913385828);
path << QPointF(-297.70078740157487, 1060.535433070866);
path << QPointF(-373.2913385826772, 1589.6692913385828);
path << QPointF(-297.70078740157487, 2118.8031496062995);
path << QPointF(-297.70078740157487, 4046.36220472441);
path << QPointF(-670.6449010946802, 4046.36220472441);
path << QPointF(-670.6449010946802, 2024.3149606299214);
path << QPointF(-622.7555214134819, 1570.7716535433071);
path << QPointF(-670.6449010946802, 1117.2283464566929);
path << QPointF(-718.5342807758785, 1570.7716535433071);
path << QPointF(-670.6449010946802, 2024.3149606299214);
QVector<QPointF> expect; QVector<QPointF> expect;
expect << QPointF(-670.6449010946802, 4046.36220472441); expect << QPointF(-632.849625504129, 4084.1574803149606);
expect << QPointF(-670.6449010946802, 4046.36220472441); expect << QPointF(-708.4401766852314, 4084.1574803149606);
expect << QPointF(-670.6449010946802, 2024.3149606299214); expect << QPointF(-708.4401766852314, 2022.3251007369636);
expect << QPointF(-670.6449010946802, 2024.3149606299214); expect << QPointF(-670.6449010946802, 1664.3794685800578);
expect << QPointF(-670.6449010946802, 2024.3149606299214); expect << QPointF(-632.849625504129, 2022.3251007369636);
expect << QPointF(-632.849625504129, 4084.1574803149606);
// See the file "collection/bugs/possible_inf_loop.val" // See the file "collection/bugs/possible_inf_loop.val"
QTest::newRow("Possible infinite loop") << path << expect; QTest::newRow("Possible infinite loop") << path << expect;
path.clear();
path << QPointF(-3289.176398074803, 40.766068311507865);
path << QPointF(-3279.1328092842814, 44.06682404485686);
path << QPointF(-3243.351504267316, 53.60167948872853);
path << QPointF(-3161.3876778623217, 73.60874477474869);
path << QPointF(-3008.115647695134, 110.74574486101676);
path << QPointF(-2873.894366307849, 145.10523784601025);
path << QPointF(-2781.1049285829295, 170.2972871433074);
path << QPointF(-2688.4201916276343, 197.16160944863682);
path << QPointF(-2598.5847429336654, 225.43041639032083);
path << QPointF(-2534.9681776342786, 247.42186866516417);
path << QPointF(-2494.760470256757, 262.35858401482426);
path << QPointF(-2456.8089154086483, 277.4957895645043);
path << QPointF(-2421.456586526415, 292.80001176774465);
path << QPointF(-2389.0465570465194, 308.2377770780854);
path << QPointF(-2359.921900405425, 323.77561194906696);
path << QPointF(-2343.699902721956, 333.52460494453004);
path << QPointF(-2334.425690039593, 339.3800428342297);
path << QPointF(-2312.900999385486, 355.0175961871137);
path << QPointF(-2299.713043139396, 366.746565883471);
path << QPointF(-2292.2509689428207, 374.5588029608982);
path << QPointF(-2285.9747534821863, 382.360491785372);
path << QPointF(-2280.9272809370514, 390.1474481635852);
path << QPointF(-2277.151435486974, 397.91548790223015);
path << QPointF(-2274.690101311511, 405.6604268079995);
path << QPointF(-2273.5861625902216, 413.37808068758574);
path << QPointF(-2273.882503502662, 421.06426534768144);
path << QPointF(-2274.6302053736044, 424.8926764304512);
path << QPointF(-2309.0574148331825, 416.983936602572);
path << QPointF(-2348.386009272143, 408.01259973815553);
path << QPointF(-2274.6302053736044, 424.8926764304512);
path << QPointF(-2309.0574148331825, 416.983936602572);
path << QPointF(-2433.4520429888726, 388.9054430736358);
path << QPointF(-2559.7817761868337, 362.0219130711671);
path << QPointF(-2653.193005658679, 343.24683221834414);
path << QPointF(-2751.5676350679787, 324.7189598281001);
path << QPointF(-2852.1850451511273, 307.35120581311685);
path << QPointF(-2952.3246166445188, 292.0564800860765);
path << QPointF(-3025.315374842363, 282.6097398689543);
path << QPointF(-3072.47620108711, 277.37300126453033);
path << QPointF(-3117.98721934864, 273.1680315579757);
path << QPointF(-3161.5083522190007, 270.1089444883756);
path << QPointF(-3202.6995222902424, 268.3098537948152);
path << QPointF(-3241.220652154415, 267.8848732163797);
path << QPointF(-3276.7316644035664, 268.94811649215455);
path << QPointF(-3308.8924816297463, 271.6136973612248);
path << QPointF(-3337.3630264250037, 275.9957295626757);
path << QPointF(-3355.9556969262208, 280.5372011460504);
path << QPointF(-3367.1044424307042, 284.1225373764538);
path << QPointF(-3377.139326285485, 288.2011754181878);
path << QPointF(-3386.017838814569, 292.7873794886382);
path << QPointF(-3393.697470341963, 297.8954138051904);
path << QPointF(-3400.135711191672, 303.53954258523015);
path << QPointF(-3405.2900516877025, 309.7340300461432);
path << QPointF(-3409.117982154061, 316.49314040531516);
path << QPointF(-3411.5769929147536, 323.8311378801317);
path << QPointF(-3412.624574293787, 331.7622866879784);
path << QPointF(-3412.5443282791143, 335.98035656218394);
path << QPointF(-3412.0938304049364, 344.2251941754913);
path << QPointF(-3410.765527360113, 357.87225607730386);
path << QPointF(-3408.9498259459265, 368.2785594139036);
path << QPointF(-3406.6749154805993, 375.6334124347902);
path << QPointF(-3403.9689852823512, 380.1261233894636);
path << QPointF(-3400.8602246694027, 381.9460005274235);
path << QPointF(-3397.376822959974, 381.28235209816967);
path << QPointF(-3393.546969472286, 378.3244863512019);
path << QPointF(-3387.2487536004646, 370.2277603925629);
path << QPointF(-3377.848607774182, 352.8184239863409);
path << QPointF(-3367.5700625628333, 329.63976680025917);
path << QPointF(-3356.6386325121834, 302.20625483031586);
path << QPointF(-3339.521778740742, 256.44961474613956);
path << QPointF(-3316.447784152815, 194.2270540550615);
path << QPointF(-3300.0812187711917, 154.2221830826118);
path << QPointF(-3289.9682851457983, 133.06332832546101);
path << QPointF(-3283.0129680216724, 121.51001513705947);
path << QPointF(-3278.693072922096, 115.97435552382811);
path << QPointF(-3274.675080363335, 112.49856833137764);
path << QPointF(-3270.987179663609, 111.27196180920784);
path << QPointF(-3269.2913385826773, 111.6668077543023);
path << QPointF(-2348.386009272143, 408.01259973815553);
path << QPointF(-2403.6231556871917, 395.59097294992216);
path << QPointF(-2433.4520429888726, 388.9054430736358);
path << QPointF(-2458.895984464084, 383.4393884984055);
path << QPointF(-2514.4918458536054, 371.5235994548911);
path << QPointF(-2559.7817761868337, 362.0219130711671);
path << QPointF(-2653.193005658679, 343.24683221834414);
path << QPointF(-2751.5676350679787, 324.7189598281001);
path << QPointF(-2852.1850451511273, 307.35120581311685);
path << QPointF(-2952.3246166445188, 292.0564800860765);
path << QPointF(-3025.315374842363, 282.6097398689543);
path << QPointF(-3072.47620108711, 277.37300126453033);
path << QPointF(-3117.98721934864, 273.1680315579757);
path << QPointF(-3161.5083522190007, 270.1089444883756);
path << QPointF(-3202.6995222902424, 268.3098537948152);
path << QPointF(-3241.220652154415, 267.8848732163797);
path << QPointF(-3276.7316644035664, 268.94811649215455);
path << QPointF(-3308.8924816297463, 271.6136973612248);
path << QPointF(-3337.3630264250037, 275.9957295626757);
path << QPointF(-3355.9556969262208, 280.5372011460504);
path << QPointF(-3367.1044424307042, 284.1225373764538);
path << QPointF(-3377.139326285485, 288.2011754181878);
path << QPointF(-3386.017838814569, 292.7873794886382);
path << QPointF(-3393.697470341963, 297.8954138051904);
path << QPointF(-3400.135711191672, 303.53954258523015);
path << QPointF(-3405.2900516877025, 309.7340300461432);
path << QPointF(-3409.117982154061, 316.49314040531516);
path << QPointF(-3411.5769929147536, 323.8311378801317);
path << QPointF(-3412.624574293787, 331.7622866879784);
path << QPointF(-3412.5443282791143, 335.98035656218394);
path << QPointF(-3412.0938304049364, 344.2251941754913);
path << QPointF(-3410.765527360113, 357.87225607730386);
path << QPointF(-3408.9498259459265, 368.2785594139036);
path << QPointF(-3406.6749154805993, 375.6334124347902);
path << QPointF(-3403.9689852823512, 380.1261233894636);
path << QPointF(-3400.8602246694027, 381.9460005274235);
path << QPointF(-3397.376822959974, 381.28235209816967);
path << QPointF(-3393.546969472286, 378.3244863512019);
path << QPointF(-3387.2487536004646, 370.2277603925629);
path << QPointF(-3377.848607774182, 352.8184239863409);
path << QPointF(-3367.5700625628333, 329.63976680025917);
path << QPointF(-3356.6386325121834, 302.20625483031586);
path << QPointF(-3339.521778740742, 256.44961474613956);
path << QPointF(-3316.447784152815, 194.2270540550615);
path << QPointF(-3300.0812187711917, 154.2221830826118);
path << QPointF(-3289.9682851457983, 133.06332832546101);
path << QPointF(-3283.0129680216724, 121.51001513705947);
path << QPointF(-3278.693072922096, 115.97435552382811);
path << QPointF(-3274.675080363335, 112.49856833137764);
path << QPointF(-3270.987179663609, 111.27196180920784);
path << QPointF(-3269.2913385826773, 111.6668077543023);
path << QPointF(0.0, 0.0);
path << QPointF(-2274.6302053736044, 424.8926764304512);
path << QPointF(-2309.0574148331825, 416.983936602572);
path << QPointF(-2433.4520429888726, 388.9054430736358);
path << QPointF(-2559.7817761868337, 362.0219130711671);
path << QPointF(-2653.193005658679, 343.24683221834414);
path << QPointF(-2751.5676350679787, 324.7189598281001);
path << QPointF(-2852.1850451511273, 307.35120581311685);
path << QPointF(-2952.3246166445188, 292.0564800860765);
path << QPointF(-3025.315374842363, 282.6097398689543);
path << QPointF(-3072.47620108711, 277.37300126453033);
path << QPointF(-3117.98721934864, 273.1680315579757);
path << QPointF(-3161.5083522190007, 270.1089444883756);
path << QPointF(-3202.6995222902424, 268.3098537948152);
path << QPointF(-3241.220652154415, 267.8848732163797);
path << QPointF(-3276.7316644035664, 268.94811649215455);
path << QPointF(-3308.8924816297463, 271.6136973612248);
path << QPointF(-3337.3630264250037, 275.9957295626757);
path << QPointF(-3355.9556969262208, 280.5372011460504);
path << QPointF(-3367.1044424307042, 284.1225373764538);
path << QPointF(-3377.139326285485, 288.2011754181878);
path << QPointF(-3386.017838814569, 292.7873794886382);
path << QPointF(-3393.697470341963, 297.8954138051904);
path << QPointF(-3400.135711191672, 303.53954258523015);
path << QPointF(-3405.2900516877025, 309.7340300461432);
path << QPointF(-3409.117982154061, 316.49314040531516);
path << QPointF(-3411.5769929147536, 323.8311378801317);
path << QPointF(-3412.624574293787, 331.7622866879784);
path << QPointF(-3412.5443282791143, 335.98035656218394);
path << QPointF(-3412.0938304049364, 344.2251941754913);
path << QPointF(-3410.765527360113, 357.87225607730386);
path << QPointF(-3408.9498259459265, 368.2785594139036);
path << QPointF(-3406.6749154805993, 375.6334124347902);
path << QPointF(-3403.9689852823512, 380.1261233894636);
path << QPointF(-3400.8602246694027, 381.9460005274235);
path << QPointF(-3397.376822959974, 381.28235209816967);
path << QPointF(-3393.546969472286, 378.3244863512019);
path << QPointF(-3387.2487536004646, 370.2277603925629);
path << QPointF(-3377.848607774182, 352.8184239863409);
path << QPointF(-3367.5700625628333, 329.63976680025917);
path << QPointF(-3356.6386325121834, 302.20625483031586);
path << QPointF(-3339.521778740742, 256.44961474613956);
path << QPointF(-3316.447784152815, 194.2270540550615);
path << QPointF(-3300.7674537894027, 155.9181480771437);
path << QPointF(-3300.0812187711917, 154.2221830826118);
path << QPointF(-3289.9682851457983, 133.06332832546101);
path << QPointF(-3283.0129680216724, 121.51001513705947);
path << QPointF(-3278.693072922096, 115.97435552382811);
path << QPointF(-3274.675080363335, 112.49856833137764);
path << QPointF(-3270.987179663609, 111.27196180920784);
path << QPointF(-3269.2913385826773, 111.6668077543023);
path << QPointF(-3311.8508415297547, 110.88125437102264);
path << QPointF(-3685.6514075461932, 107.5655498368449);
path << QPointF(-4814.263342905703, 99.20635184924856);
path << QPointF(-7383.401022460118, 81.87816887323245);
path << QPointF(-10941.483518468456, 59.05418050192678);
path << QPointF(-15308.1805254157, 32.04268850318564);
path << QPointF(-20303.161737786842, 2.15199464486304);
path << QPointF(-25746.09685006686, -29.30959930518696);
path << QPointF(-31456.65555674075, -61.033791579110314);
path << QPointF(-37254.50755229348, -91.71228040905298);
path << QPointF(-42959.322531210055, -120.03676402716093);
path << QPointF(-47055.629053465884, -138.8031751224513);
path << QPointF(-49669.199119026714, -149.97338011526602);
path << QPointF(-52158.074133576316, -159.81916406070422);
path << QPointF(-54499.712808925295, -168.17698923778406);
path << QPointF(-56671.57385688429, -174.8833179255238);
path << QPointF(-58651.11598926391, -179.77461240294173);
path << QPointF(-60415.79791787479, -182.68733494905598);
path << QPointF(-61943.07835452756, -183.45794784288492);
path << QPointF(-62910.53243592165, -182.4558854979162);
path << QPointF(-63474.98907760189, -181.08129309219626);
path << QPointF(-63967.41587168608, -179.07918330535267);
path << QPointF(-64384.99515715055, -176.4291139222629);
path << QPointF(-64724.90927297162, -173.11064272780402);
path << QPointF(-64984.340558125616, -169.10332750685347);
path << QPointF(-65121.73298586071, -165.61084561925315);
path << QPointF(-65188.44494822773, -163.07139041223155);
path << QPointF(-65233.45126860215, -160.34822545258044);
path << QPointF(-65252.05224375721, -158.17787437745008);
path << QPointF(-65257.945977798765, -156.67611401106774);
path << QPointF(-65258.55112619724, -155.90551181102362);
path << QPointF(0.0, 0.0);
path << QPointF(-3278.855552452029, 0.0);
path << QPointF(-3297.926352438392, 0.0667852955320001);
path << QPointF(-3333.3540289999983, 0.8343743582029102);
path << QPointF(-3365.6017560461587, 2.3018835161185054);
path << QPointF(-3394.7548208856488, 4.401643801852556);
path << QPointF(-3420.8985108272445, 7.065986247978833);
path << QPointF(-3444.1181131797193, 10.227241887071106);
path << QPointF(-3464.4989152518488, 13.817741751703146);
path << QPointF(-3482.1262043524084, 17.769816874448722);
path << QPointF(-3497.0852677901735, 22.0157982878816);
path << QPointF(-3509.461392873918, 26.48801702457557);
path << QPointF(-3519.3398669124185, 31.118804117104382);
path << QPointF(-3526.805977214449, 35.84049059804182);
path << QPointF(-3531.9450110887838, 40.58540749996163);
path << QPointF(-3534.8422558442003, 45.28588585543761);
path << QPointF(-3535.582998789472, 49.87425669704352);
path << QPointF(-3534.252527233375, 54.28285105735314);
path << QPointF(-3530.9361284846827, 58.44399996894022);
path << QPointF(-3525.7190898521712, 62.29003446437855);
path << QPointF(-3518.6866986446166, 65.75328557624188);
path << QPointF(-3509.9242421707922, 68.76608433710399);
path << QPointF(-3499.517007739474, 71.26076177953868);
path << QPointF(-3487.5502826594366, 73.16964893611967);
path << QPointF(-3474.109354239456, 74.42507683942075);
path << QPointF(-3459.2795097883068, 74.9593765220157);
path << QPointF(-3443.1460366147635, 74.70487901647832);
path << QPointF(-3425.794222027602, 73.59391535538228);
path << QPointF(-3407.309353335596, 71.55881657130146);
path << QPointF(-3387.7767178475224, 68.53191369680957);
path << QPointF(-3367.281602872156, 64.4455377644804);
path << QPointF(-3345.909295718271, 59.23201980688771);
path << QPointF(-3323.7450836946427, 52.82369085660529);
path << QPointF(-3300.8742541100464, 45.15288194620689);
path << QPointF(-3289.176398074803, 40.766068311507865);
path << QPointF(-2433.84144243598, 1.1920928955078125e-07);
path << QPointF(-3278.855552452029, 0.0);
path << QPointF(-3297.926352438392, 0.0667852955320001);
path << QPointF(-3333.3540289999983, 0.8343743582029102);
path << QPointF(-3365.6017560461587, 2.3018835161185054);
path << QPointF(-3394.7548208856488, 4.401643801852556);
path << QPointF(-3420.8985108272445, 7.065986247978833);
path << QPointF(-3444.1181131797193, 10.227241887071106);
path << QPointF(-3464.4989152518488, 13.817741751703146);
path << QPointF(-3482.1262043524084, 17.769816874448722);
path << QPointF(-3497.0852677901735, 22.0157982878816);
path << QPointF(-3509.461392873918, 26.48801702457557);
path << QPointF(-3519.3398669124185, 31.118804117104382);
path << QPointF(-3526.805977214449, 35.84049059804182);
path << QPointF(-3531.9450110887838, 40.58540749996163);
path << QPointF(-3534.8422558442003, 45.28588585543761);
path << QPointF(-3535.582998789472, 49.87425669704352);
path << QPointF(-3534.252527233375, 54.28285105735314);
path << QPointF(-3530.9361284846827, 58.44399996894022);
path << QPointF(-3525.7190898521712, 62.29003446437855);
path << QPointF(-3518.6866986446166, 65.75328557624188);
path << QPointF(-3509.9242421707922, 68.76608433710399);
path << QPointF(-3499.517007739474, 71.26076177953868);
path << QPointF(-3487.5502826594366, 73.16964893611967);
path << QPointF(-3474.109354239456, 74.42507683942075);
path << QPointF(-3459.2795097883068, 74.9593765220157);
path << QPointF(-3443.1460366147635, 74.70487901647832);
path << QPointF(-3425.794222027602, 73.59391535538228);
path << QPointF(-3407.309353335596, 71.55881657130146);
path << QPointF(-3387.7767178475224, 68.53191369680957);
path << QPointF(-3367.281602872156, 64.4455377644804);
path << QPointF(-3345.909295718271, 59.23201980688771);
path << QPointF(-3323.7450836946427, 52.82369085660529);
path << QPointF(-3300.8742541100464, 45.15288194620689);
path << QPointF(-3289.176398074803, 40.766068311507865);
path << QPointF(-2375.6588995456696, -1.1920928955078125e-07);
path << QPointF(-3278.855552452029, 0.0);
path << QPointF(-3297.926352438392, 0.0667852955320001);
path << QPointF(-3333.3540289999983, 0.8343743582029102);
path << QPointF(-3365.6017560461587, 2.3018835161185054);
path << QPointF(-3394.7548208856488, 4.401643801852556);
path << QPointF(-3420.8985108272445, 7.065986247978833);
path << QPointF(-3444.1181131797193, 10.227241887071106);
path << QPointF(-3464.4989152518488, 13.817741751703146);
path << QPointF(-3482.1262043524084, 17.769816874448722);
path << QPointF(-3497.0852677901735, 22.0157982878816);
path << QPointF(-3509.461392873918, 26.48801702457557);
path << QPointF(-3519.3398669124185, 31.118804117104382);
path << QPointF(-3526.805977214449, 35.84049059804182);
path << QPointF(-3531.9450110887838, 40.58540749996163);
path << QPointF(-3534.8422558442003, 45.28588585543761);
path << QPointF(-3535.582998789472, 49.87425669704352);
path << QPointF(-3534.252527233375, 54.28285105735314);
path << QPointF(-3530.9361284846827, 58.44399996894022);
path << QPointF(-3525.7190898521712, 62.29003446437855);
path << QPointF(-3518.6866986446166, 65.75328557624188);
path << QPointF(-3509.9242421707922, 68.76608433710399);
path << QPointF(-3499.517007739474, 71.26076177953868);
path << QPointF(-3487.5502826594366, 73.16964893611967);
path << QPointF(-3474.109354239456, 74.42507683942075);
path << QPointF(-3459.2795097883068, 74.9593765220157);
path << QPointF(-3443.1460366147635, 74.70487901647832);
path << QPointF(-3425.794222027602, 73.59391535538228);
path << QPointF(-3407.309353335596, 71.55881657130146);
path << QPointF(-3387.7767178475224, 68.53191369680957);
path << QPointF(-3367.281602872156, 64.4455377644804);
path << QPointF(-3345.909295718271, 59.23201980688771);
path << QPointF(-3323.7450836946427, 52.82369085660529);
path << QPointF(-3300.8742541100464, 45.15288194620689);
path << QPointF(-3289.176398074803, 40.766068311507865);
path << QPointF(-2317.7482029497623, 1.1920928955078125e-07);
path << QPointF(-3159.9587076218127, -3.0211712963817957e-16);
path << QPointF(-3278.855552452029, 0.0);
path << QPointF(-3297.926352438392, 0.0667852955320001);
path << QPointF(-3333.3540289999983, 0.8343743582029102);
path << QPointF(-3365.6017560461587, 2.3018835161185054);
path << QPointF(-3394.7548208856488, 4.401643801852556);
path << QPointF(-3420.8985108272445, 7.065986247978833);
path << QPointF(-3444.1181131797193, 10.227241887071106);
path << QPointF(-3464.4989152518488, 13.817741751703146);
path << QPointF(-3482.1262043524084, 17.769816874448722);
path << QPointF(-3497.0852677901735, 22.0157982878816);
path << QPointF(-3509.461392873918, 26.48801702457557);
path << QPointF(-3519.3398669124185, 31.118804117104382);
path << QPointF(-3526.805977214449, 35.84049059804182);
path << QPointF(-3531.9450110887838, 40.58540749996163);
path << QPointF(-3534.8422558442003, 45.28588585543761);
path << QPointF(-3535.582998789472, 49.87425669704352);
path << QPointF(-3534.252527233375, 54.28285105735314);
path << QPointF(-3530.9361284846827, 58.44399996894022);
path << QPointF(-3525.7190898521712, 62.29003446437855);
path << QPointF(-3518.6866986446166, 65.75328557624188);
path << QPointF(-3509.9242421707922, 68.76608433710399);
path << QPointF(-3499.517007739474, 71.26076177953868);
path << QPointF(-3487.5502826594366, 73.16964893611967);
path << QPointF(-3474.109354239456, 74.42507683942075);
path << QPointF(-3459.2795097883068, 74.9593765220157);
path << QPointF(-3443.1460366147635, 74.70487901647832);
path << QPointF(-3425.794222027602, 73.59391535538228);
path << QPointF(-3407.309353335596, 71.55881657130146);
path << QPointF(-3387.7767178475224, 68.53191369680957);
path << QPointF(-3367.281602872156, 64.4455377644804);
path << QPointF(-3345.909295718271, 59.23201980688771);
path << QPointF(-3323.7450836946427, 52.82369085660529);
path << QPointF(-3300.8742541100464, 45.15288194620689);
expect.clear();
expect << QPointF(-3289.176398074803, 40.766068311507865);
expect << QPointF(-3279.1328092842814, 44.06682404485686);
expect << QPointF(-3243.351504267316, 53.60167948872853);
expect << QPointF(-3161.3876778623217, 73.60874477474869);
expect << QPointF(-3037.0528777920667, 103.7344074667516);
expect << QPointF(0.0, 0.0);
expect << QPointF(-2274.6302053736044, 424.8926764304512);
expect << QPointF(-2309.0574148331825, 416.983936602572);
expect << QPointF(-2433.4520429888726, 388.9054430736358);
expect << QPointF(-2559.7817761868337, 362.0219130711671);
expect << QPointF(-2653.193005658679, 343.24683221834414);
expect << QPointF(-2751.5676350679787, 324.7189598281001);
expect << QPointF(-2852.1850451511273, 307.35120581311685);
expect << QPointF(-2952.3246166445188, 292.0564800860765);
expect << QPointF(-3025.315374842363, 282.6097398689543);
expect << QPointF(-3072.47620108711, 277.37300126453033);
expect << QPointF(-3117.98721934864, 273.1680315579757);
expect << QPointF(-3161.5083522190007, 270.1089444883756);
expect << QPointF(-3202.6995222902424, 268.3098537948152);
expect << QPointF(-3241.220652154415, 267.8848732163797);
expect << QPointF(-3276.7316644035664, 268.94811649215455);
expect << QPointF(-3308.8924816297463, 271.6136973612248);
expect << QPointF(-3337.3630264250037, 275.9957295626757);
expect << QPointF(-3347.7860794585613, 278.5416790087658);
expect << QPointF(-3339.521778740742, 256.44961474613956);
expect << QPointF(-3316.447784152815, 194.2270540550615);
expect << QPointF(-3300.7674537894027, 155.9181480771437);
expect << QPointF(-3300.0812187711917, 154.2221830826118);
expect << QPointF(-3289.9682851457983, 133.06332832546101);
expect << QPointF(-3283.0129680216724, 121.51001513705947);
expect << QPointF(-3278.693072922096, 115.97435552382811);
expect << QPointF(-3274.675080363335, 112.49856833137764);
expect << QPointF(-3272.0227399663845, 111.61639218434759);
expect << QPointF(-3311.8508415297547, 110.88125437102264);
expect << QPointF(-3685.6514075461932, 107.5655498368449);
expect << QPointF(-4814.263342905703, 99.20635184924856);
expect << QPointF(-7383.401022460118, 81.87816887323245);
expect << QPointF(-10941.483518468456, 59.05418050192678);
expect << QPointF(-15308.1805254157, 32.04268850318564);
expect << QPointF(-20303.161737786842, 2.15199464486304);
expect << QPointF(-25746.09685006686, -29.30959930518696);
expect << QPointF(-31456.65555674075, -61.033791579110314);
expect << QPointF(-36320.89133149458, -86.77218624604188);
expect << QPointF(0.0, 0.0);
expect << QPointF(-3159.958705487363, 0.0);
expect << QPointF(-3159.9587076218127, -3.0211712963817957e-16);
expect << QPointF(-3278.855552452029, 0.0);
expect << QPointF(-3297.926352438392, 0.0667852955320001);
expect << QPointF(-3333.3540289999983, 0.8343743582029102);
expect << QPointF(-3365.6017560461587, 2.3018835161185054);
expect << QPointF(-3394.7548208856488, 4.401643801852556);
expect << QPointF(-3420.8985108272445, 7.065986247978833);
expect << QPointF(-3444.1181131797193, 10.227241887071106);
expect << QPointF(-3464.4989152518488, 13.817741751703146);
expect << QPointF(-3482.1262043524084, 17.769816874448722);
expect << QPointF(-3497.0852677901735, 22.0157982878816);
expect << QPointF(-3509.461392873918, 26.48801702457557);
expect << QPointF(-3519.3398669124185, 31.118804117104382);
expect << QPointF(-3526.805977214449, 35.84049059804182);
expect << QPointF(-3531.9450110887838, 40.58540749996163);
expect << QPointF(-3534.8422558442003, 45.28588585543761);
expect << QPointF(-3535.582998789472, 49.87425669704352);
expect << QPointF(-3534.252527233375, 54.28285105735314);
expect << QPointF(-3530.9361284846827, 58.44399996894022);
expect << QPointF(-3525.7190898521712, 62.29003446437855);
expect << QPointF(-3518.6866986446166, 65.75328557624188);
expect << QPointF(-3509.9242421707922, 68.76608433710399);
expect << QPointF(-3499.517007739474, 71.26076177953868);
expect << QPointF(-3487.5502826594366, 73.16964893611967);
expect << QPointF(-3474.109354239456, 74.42507683942075);
expect << QPointF(-3459.2795097883068, 74.9593765220157);
expect << QPointF(-3443.1460366147635, 74.70487901647832);
expect << QPointF(-3425.794222027602, 73.59391535538228);
expect << QPointF(-3407.309353335596, 71.55881657130146);
expect << QPointF(-3387.7767178475224, 68.53191369680957);
expect << QPointF(-3367.281602872156, 64.4455377644804);
expect << QPointF(-3345.909295718271, 59.23201980688771);
expect << QPointF(-3323.7450836946427, 52.82369085660529);
expect << QPointF(-3300.8742541100464, 45.15288194620689);
// See the file "collection/bugs/Issue_#861.val from private collection"
QTest::newRow("Check if hangs") << path << expect;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------