Resolved issue #937. Wrong symmetrical seam corners on pieces.

(grafted from f15fbf536959418dcd9a2f2caf7c0267ae46eaee)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-02-12 14:51:21 +02:00
parent 4bfe5201ad
commit 63e402ba8a
5 changed files with 516 additions and 96 deletions

View File

@ -25,6 +25,7 @@
- [#931] Variable translation for Greek and Chinese are broken.
- [#938] Dialog Seam Allowance doesn't block user from saving broken formula.
- [#939] Calling Formula Wizard through property explorer doesn't refresh formula.
- [#937] Wrong symmetrical seam corners on pieces.
# Version 0.6.1 October 23, 2018
- [#885] Regression. Broken support for multi size measurements.

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<pattern>
<!--Pattern created with Valentina v0.6.2.0 (https://valentinaproject.bitbucket.io/).-->
<version>0.7.12</version>
<unit>cm</unit>
<description/>
<notes/>
<measurements/>
<increments/>
<previewCalculations/>
<draw name="Pattern piece 1">
<calculation>
<point id="1" mx="-2.40606" my="-1.85332" name="A" showLabel="true" type="single" x="0.79375" y="1.05833"/>
<point angle="355.932" basePoint="1" id="2" length="20" lineColor="black" mx="0.132292" my="0.264583" name="A1" showLabel="true" type="endLine" typeLine="hair"/>
<point angle="251.459" basePoint="2" id="3" length="14.9822" lineColor="black" mx="0.132292" my="0.264583" name="A2" showLabel="true" type="endLine" typeLine="hair"/>
<point angle="178.955" basePoint="3" id="4" length="12.0303" lineColor="black" mx="0.132292" my="0.264583" name="A3" showLabel="true" type="endLine" typeLine="hair"/>
<line firstPoint="4" id="5" lineColor="black" secondPoint="1" typeLine="hair"/>
<spline aScale="0" angle1="241.973" angle2="77.5938" color="black" id="6" length1="5.7476" length2="4.49494" penStyle="hair" point1="2" point4="3" type="simpleInteractive"/>
<spline aScale="0" angle1="163.38" angle2="13.038" color="black" id="7" length1="3.0694" length2="4.28083" penStyle="hair" point1="3" point4="4" type="simpleInteractive"/>
<spline aScale="0" angle1="91.8092" angle2="288.882" color="black" id="8" length1="4.17256" length2="5.57256" penStyle="hair" point1="4" point4="1" type="simpleInteractive"/>
</calculation>
<modeling>
<point id="17" idObject="1" inUse="false" mx="-2.40606" my="-1.85332" showLabel="true" type="modeling"/>
<point id="18" idObject="2" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<point id="19" idObject="3" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<point id="20" idObject="4" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
</modeling>
<details>
<detail forbidFlipping="false" forceFlipping="false" hideMainPath="false" id="21" inLayout="true" mx="-4.07881" my="-12.9851" name="Case 1" seamAllowance="true" united="false" version="2" width="1">
<data annotation="" foldPosition="" fontSize="0" height="1" letter="" mx="0" my="0" onFold="false" orientation="" quantity="1" rotation="0" rotationWay="" tilt="" visible="false" width="1"/>
<patternInfo fontSize="0" height="1" mx="0" my="0" rotation="0" visible="false" width="1"/>
<grainline arrows="0" length="1" mx="0" my="0" rotation="90" visible="false"/>
<nodes>
<node idObject="17" type="NodePoint"/>
<node idObject="18" type="NodePoint"/>
<node after="4" angle="3" idObject="19" type="NodePoint"/>
<node angle="2" before="4" idObject="20" type="NodePoint"/>
</nodes>
</detail>
</details>
<groups/>
</draw>
<draw name="Pattern piece 2">
<calculation>
<point id="9" mx="0.132292" my="0.328592" name="B" showLabel="true" type="single" x="30" y="0"/>
<point angle="356.651" basePoint="9" id="10" length="13.0545" lineColor="black" mx="0.132292" my="0.264583" name="B1" showLabel="true" type="endLine" typeLine="hair"/>
<point angle="281.181" basePoint="10" id="11" length="11.2226" lineColor="black" mx="0.132292" my="0.264583" name="B2" showLabel="true" type="endLine" typeLine="hair"/>
<point angle="182.276" basePoint="11" id="12" length="19.3458" lineColor="black" mx="0.132292" my="0.264583" name="B3" showLabel="true" type="endLine" typeLine="hair"/>
<line firstPoint="12" id="13" lineColor="black" secondPoint="9" typeLine="hair"/>
<spline aScale="0" angle1="272.453" angle2="108.154" color="black" id="14" length1="4.48481" length2="4.10909" penStyle="hair" point1="10" point4="11" type="simpleInteractive"/>
<spline aScale="0" angle1="191.803" angle2="352.997" color="black" id="15" length1="4.38113" length2="7.35189" penStyle="hair" point1="11" point4="12" type="simpleInteractive"/>
<spline aScale="0" angle1="79.5634" angle2="243.393" color="black" id="16" length1="4.94668" length2="4.51623" penStyle="hair" point1="12" point4="9" type="simpleInteractive"/>
</calculation>
<modeling>
<point id="30" idObject="9" inUse="false" mx="0.132292" my="0.328592" showLabel="true" type="modeling"/>
<point id="31" idObject="10" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<point id="32" idObject="11" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<point id="33" idObject="12" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<point id="35" idObject="9" inUse="false" mx="0.132292" my="0.328592" showLabel="true" type="modeling"/>
<point id="36" idObject="10" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<spline id="37" idObject="14" inUse="false" type="modelingSpline"/>
<point id="38" idObject="11" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<spline id="39" idObject="15" inUse="false" type="modelingSpline"/>
<point id="40" idObject="12" inUse="false" mx="0.132292" my="0.264583" showLabel="true" type="modeling"/>
<spline id="41" idObject="16" inUse="false" type="modelingSpline"/>
</modeling>
<details>
<detail forbidFlipping="false" forceFlipping="false" hideMainPath="false" id="34" inLayout="true" mx="-2.365" my="-9.68292" name="Case 2" seamAllowance="true" united="false" version="2" width="1">
<data annotation="" foldPosition="" fontSize="0" height="1" letter="" mx="0" my="0" onFold="false" orientation="" quantity="1" rotation="0" rotationWay="" tilt="" visible="false" width="1"/>
<patternInfo fontSize="0" height="1" mx="0" my="0" rotation="0" visible="false" width="1"/>
<grainline arrows="0" length="1" mx="0" my="0" rotation="90" visible="false"/>
<nodes>
<node idObject="30" type="NodePoint"/>
<node idObject="31" type="NodePoint"/>
<node after="4" angle="3" idObject="32" type="NodePoint"/>
<node angle="2" before="4" idObject="33" type="NodePoint"/>
</nodes>
</detail>
<detail forbidFlipping="false" forceFlipping="false" hideMainPath="false" id="42" inLayout="true" mx="-0.31606" my="12.6064" name="Case 3" seamAllowance="true" united="false" version="2" width="1">
<data annotation="" foldPosition="" fontSize="0" height="1" letter="" mx="0" my="0" onFold="false" orientation="" quantity="1" rotation="0" rotationWay="" tilt="" visible="false" width="1"/>
<patternInfo fontSize="0" height="1" mx="0" my="0" rotation="0" visible="false" width="1"/>
<grainline arrows="0" length="1" mx="0" my="0" rotation="90" visible="false"/>
<nodes>
<node idObject="35" type="NodePoint"/>
<node idObject="36" type="NodePoint"/>
<node idObject="37" reverse="0" type="NodeSpline"/>
<node after="4" angle="3" idObject="38" type="NodePoint"/>
<node idObject="39" reverse="0" type="NodeSpline"/>
<node angle="2" before="4" idObject="40" type="NodePoint"/>
<node idObject="41" reverse="0" type="NodeSpline"/>
</nodes>
</detail>
</details>
<groups/>
</draw>
</pattern>

View File

@ -294,14 +294,14 @@ QVector<QPointF> AngleByIntersection(const QVector<QPointF> &points, QPointF p1,
QLineF::IntersectType type = edge2.intersect(bigLine1, &px);
if (type == QLineF::NoIntersection)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px))
{
if (QLineF(p2, px).length() > localWidth*maxL)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
pointsIntr.append(px);
}
@ -322,7 +322,7 @@ QVector<QPointF> AngleByIntersection(const QVector<QPointF> &points, QPointF p1,
type = edge1.intersect(bigLine2, &px);
if (type == QLineF::NoIntersection)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
if (IsOutsidePoint(bigLine2.p2(), bigLine2.p1(), px))
@ -351,30 +351,34 @@ QVector<QPointF> AngleByFirstSymmetry(const QVector<QPointF> &points, QPointF p1
*needRollback = false;
}
const qreal localWidth = p.MaxLocalSA(width);
QVector<QPointF> pointsIntr = points;
QLineF sEdge(VPointF::FlipPF(bigLine2, p1), VPointF::FlipPF(bigLine2, p2));
QPointF px;
QLineF::IntersectType type = sEdge.intersect(bigLine1, &px);
QPointF px1;
QLineF::IntersectType type = sEdge.intersect(bigLine1, &px1);
if (type == QLineF::NoIntersection)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px))
QPointF px2;
type = sEdge.intersect(bigLine2, &px2);
if (type == QLineF::NoIntersection)
{
if (QLineF(p2, px).length() > localWidth*maxL)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
pointsIntr.append(px);
QVector<QPointF> pointsIntr = points;
if (IsOutsidePoint(sp2, bigLine1.p1(), px1) && IsOutsidePoint(sp2, bigLine2.p2(), px2))
{
if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px1))
{
pointsIntr.append(px1);
}
else
{// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points
bool success = false;
pointsIntr = VAbstractPiece::RollbackSeamAllowance(pointsIntr, bigLine2, &success);
pointsIntr = VAbstractPiece::RollbackSeamAllowance(pointsIntr, sEdge, &success);
if (needRollback != nullptr)
{
@ -382,27 +386,22 @@ QVector<QPointF> AngleByFirstSymmetry(const QVector<QPointF> &points, QPointF p1
}
}
type = sEdge.intersect(bigLine2, &px);
if (type == QLineF::NoIntersection)
if (IsOutsidePoint(bigLine2.p2(), bigLine2.p1(), px2))
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
}
if (IsOutsidePoint(bigLine2.p2(), bigLine2.p1(), px))
{
if (QLineF(p2, px).length() > localWidth*maxL)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
}
pointsIntr.append(px);
pointsIntr.append(px2);
}
else
{
QLineF allowance(px, p2);
QLineF allowance(px2, p2);
allowance.setAngle(allowance.angle() + 90);
pointsIntr.append(allowance.p2());
pointsIntr.append(bigLine2.p1());
}
}
else
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
return pointsIntr;
}
@ -417,31 +416,36 @@ QVector<QPointF> AngleBySecondSymmetry(const QVector<QPointF> &points, QPointF p
*needRollback = false;
}
QLineF sEdge(VPointF::FlipPF(bigLine1, p2), VPointF::FlipPF(bigLine1, p3));
QPointF px1;
QLineF::IntersectType type = sEdge.intersect(bigLine1, &px1);
if (type == QLineF::NoIntersection)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
QPointF px2;
type = sEdge.intersect(bigLine2, &px2);
if (type == QLineF::NoIntersection)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
const qreal localWidth = p.MaxLocalSA(width);
QVector<QPointF> pointsIntr = points;
QLineF sEdge(VPointF::FlipPF(bigLine1, p2), VPointF::FlipPF(bigLine1, p3));
QPointF px;
QLineF::IntersectType type = sEdge.intersect(bigLine1, &px);
if (type == QLineF::NoIntersection)
if (IsOutsidePoint(sp2, bigLine1.p1(), px1) && IsOutsidePoint(sp2, bigLine2.p2(), px2))
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
}
bool rollbackFlag = false;
if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px))
if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px1))
{
if (QLineF(p2, px).length() > localWidth*maxL)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
}
pointsIntr.append(px);
pointsIntr.append(px1);
}
else
{// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points
bool success = false;
pointsIntr = VAbstractPiece::RollbackSeamAllowance(pointsIntr, bigLine2, &success);
pointsIntr = VAbstractPiece::RollbackSeamAllowance(pointsIntr, sEdge, &success);
rollbackFlag = true;
if (needRollback != nullptr)
@ -450,33 +454,27 @@ QVector<QPointF> AngleBySecondSymmetry(const QVector<QPointF> &points, QPointF p
}
}
type = sEdge.intersect(bigLine2, &px);
if (type == QLineF::NoIntersection)
if (IsOutsidePoint(bigLine2.p2(), bigLine2.p1(), px2))
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
}
if (IsOutsidePoint(bigLine2.p2(), bigLine2.p1(), px))
{
if (QLineF(p2, px).length() > localWidth*maxL)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
}
if (not rollbackFlag)
{
pointsIntr.append(px);
pointsIntr.append(px2);
}
}
else
{
QLineF allowance(p2, px);
QLineF allowance(p2, px2);
allowance.setLength(p.GetSAAfter(width)*0.98);
pointsIntr.append(allowance.p2());
allowance.setLength(allowance.length() + localWidth * 3.);
pointsIntr.append(allowance.p2());
pointsIntr.append(bigLine2.p2());
}
}
else
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
return pointsIntr;
}
@ -484,7 +482,7 @@ QVector<QPointF> AngleBySecondSymmetry(const QVector<QPointF> &points, QPointF p
//---------------------------------------------------------------------------------------------------------------------
QVector<QPointF> AngleByFirstRightAngle(const QVector<QPointF> &points, QPointF p1, QPointF p2,
const QLineF &bigLine1, QPointF sp2, const QLineF &bigLine2,
const VSAPoint &p, qreal width)
const VSAPoint &p, qreal width, bool *needRollback = nullptr)
{
const qreal localWidth = p.MaxLocalSA(width);
QVector<QPointF> pointsRA = points;
@ -494,7 +492,7 @@ QVector<QPointF> AngleByFirstRightAngle(const QVector<QPointF> &points, QPointF
QLineF::IntersectType type = edge.intersect(bigLine2, &px);
if (type == QLineF::NoIntersection)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
QLineF seam(px, p1);
@ -507,7 +505,7 @@ QVector<QPointF> AngleByFirstRightAngle(const QVector<QPointF> &points, QPointF
{
if (QLineF(p2, px).length() > localWidth*maxL)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
pointsRA.append(seam.p1());
}
@ -544,14 +542,14 @@ QVector<QPointF> AngleBySecondRightAngle(QVector<QPointF> points, QPointF p2, QP
QLineF::IntersectType type = edge.intersect(bigLine1, &px);
if (type == QLineF::NoIntersection)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
if (IsOutsidePoint(bigLine1.p1(), bigLine1.p2(), px))
{
if (QLineF(p2, px).length() > localWidth*maxL)
{
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width);
return AngleByLength(points, p2, bigLine1, sp2, bigLine2, p, width, needRollback);
}
points.append(px);
@ -902,7 +900,7 @@ QVector<QPointF> VAbstractPiece::Equidistant(QVector<VSAPoint> points, qreal wid
return QVector<QPointF>();
}
// DumpVector(points); // Uncomment for dumping test data
DumpVector(points); // Uncomment for dumping test data
points = CorrectEquidistantPoints(points);
if ( points.size() < 3 )
@ -1020,7 +1018,7 @@ QVector<QPointF> VAbstractPiece::Equidistant(QVector<VSAPoint> points, qreal wid
const bool removeFirstAndLast = false;
ekvPoints = CheckLoops(CorrectEquidistantPoints(ekvPoints, removeFirstAndLast));//Result path can contain loops
ekvPoints = CheckLoops(CorrectEquidistantPoints(ekvPoints, removeFirstAndLast));//Result path can contain loops
// DumpVector(ekvPoints); // Uncomment for dumping test data
DumpVector(ekvPoints); // Uncomment for dumping test data
return ekvPoints;
}
@ -1305,7 +1303,7 @@ QT_WARNING_DISABLE_GCC("-Wswitch-default")
p2Line1, width, needRollback);
case PieceNodeAngle::ByFirstEdgeRightAngle:
return AngleByFirstRightAngle(points, p1Line1, p2Line1, bigLine1, crosPoint, bigLine2,
p2Line1, width);
p2Line1, width, needRollback);
case PieceNodeAngle::BySecondEdgeRightAngle:
return AngleBySecondRightAngle(points, p2Line1, p1Line2, bigLine1, crosPoint, bigLine2,
p2Line1, width, needRollback);

View File

@ -5006,6 +5006,21 @@ void TST_VAbstractPiece::EquidistantAngleType_data() const
// See the file "collection/bugs/Issue_#880.val"
QTest::newRow("Issue #880. Piece: Detail_1.") << InputPointsIssue880_Piece_Detail_1() << 75.59055118110237
<< OutputPointsIssue880_Piece_Detail_1();
// See file src/app/share/collection/bugs/Issue_#934.val
QTest::newRow("Issue 934. Case1") << InputPointsIssue934Case1()
<< 37.795275590551185 // seam allowance width (1.0 cm)
<< OutputPointsIssue934Case1();
// See file src/app/share/collection/bugs/Issue_#934.val
QTest::newRow("Issue 934. Case2") << InputPointsIssue934Case2()
<< 37.795275590551185 // seam allowance width (1.0 cm)
<< OutputPointsIssue934Case2();
// See file src/app/share/collection/bugs/Issue_#934.val
QTest::newRow("Issue 934. Case3") << InputPointsIssue934Case3()
<< 37.795275590551185 // seam allowance width (1.0 cm)
<< OutputPointsIssue934Case3();
}
//---------------------------------------------------------------------------------------------------------------------
@ -10165,8 +10180,7 @@ QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue923Test3_3()
{
QVector<QPointF> points;
points += QPointF(-998.323622337918891, 229.426313313416387);
points += QPointF(-925.469085441362722, 240.352497361176461);
points += QPointF(-941.393414608898865, 276.182237988132670);
points += QPointF(-814.172528355339296, -10.064756082376469);
points += QPointF(-797.048974584331063, -48.592752067144829);
points += QPointF(-778.560274683193597, -50.549491761193529);
@ -10224,7 +10238,7 @@ QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue923Test3_3()
points += QPointF(-823.692975528084730, 369.271805550997954);
points += QPointF(-829.575336882823422, 366.626948794191208);
points += QPointF(-835.815139714856855, 362.892089667033019);
points += QPointF(-998.323622337918891, 229.426313313416387);
points += QPointF(-941.393414608898865, 276.182237988132670);
return points;
}
@ -10577,6 +10591,7 @@ QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue923Test4_4()
{
QVector<QPointF> points;
points += QPointF(-941.393414608898865, 276.182237988132670);
points += QPointF(-814.172528355339296, -10.064756082376469);
points += QPointF(-797.048974584331063, -48.592752067144829);
points += QPointF(-778.560274683193597, -50.549491761193529);
@ -10634,8 +10649,7 @@ QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue923Test4_4()
points += QPointF(-823.692975528084730, 369.271805550997954);
points += QPointF(-829.575336882823422, 366.626948794191208);
points += QPointF(-835.815139714856855, 362.892089667033019);
points += QPointF(-949.648673098827885, 294.756569590472964);
points += QPointF(-814.172528355339296, -10.064756082376469);
points += QPointF(-941.393414608898865, 276.182237988132670);
return points;
}
@ -11459,3 +11473,305 @@ QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue923Test6_6()
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<VSAPoint> TST_VAbstractPiece::InputPointsIssue934Case1() const
{
QVector<VSAPoint> points;
points += VSAPoint(30.000000000000000, 39.999874015748034);
points += VSAPoint(784.001052525227124, 93.624081022807857);
VSAPoint p = VSAPoint(603.941048041563704, 630.489688374883372);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::BySecondEdgeSymmetry);
points += p;
p = VSAPoint(149.328168036696184, 622.197225159899745);
p.SetSABefore(151.181);
p.SetAngleType(PieceNodeAngle::ByFirstEdgeSymmetry);
points += p;
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue934Case1() const
{
QVector<QPointF> points;
points += QPointF(-17.032721988884830, -1.235810543606590);
points += QPointF(835.348863103112194, 59.385174553028691);
points += QPointF(593.158150600486692, 781.499251666420946);
points += QPointF(141.710194441569911, 773.264518919985676);
points += QPointF(-17.032721988884830, -1.235810543606590);
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<VSAPoint> TST_VAbstractPiece::InputPointsIssue934Case2() const
{
QVector<VSAPoint> points;
points += VSAPoint(1133.858267716535465, 0.000000000000000);
points += VSAPoint(1626.414077999261963, 28.823250050281736);
VSAPoint p = VSAPoint(1708.662782184241905, 444.933722174073409);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::BySecondEdgeSymmetry);
points += p;
p = VSAPoint(978.059754412127063, 473.971248193821054);
p.SetSABefore(151.181);
p.SetAngleType(PieceNodeAngle::ByFirstEdgeSymmetry);
points += p;
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue934Case2() const
{
QVector<QPointF> points;
points += QPointF(1107.034334293208985, -39.429607754508027);
points += QPointF(1657.820450488061852, -7.198852132733364);
points += QPointF(1746.889006868886554, 443.414436116223328);
points += QPointF(1282.672343168622319, 613.165002913536910);
points += QPointF(1117.870570870988558, 619.714983640807873);
points += QPointF(937.748317798697030, 475.573410168327655);
points += QPointF(1107.034334293208985, -39.429607754508027);
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<VSAPoint> TST_VAbstractPiece::InputPointsIssue934Case3() const
{
QVector<VSAPoint> points;
points += VSAPoint(1133.858267716535465, 0.000000000000000);
points += VSAPoint(1626.414077999261963, 28.823250050281736);
points += VSAPoint(1626.414077999261963, 28.823250050281736);
VSAPoint p = VSAPoint(1627.925525207237797, 60.028107039649264);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1632.474444857430171, 117.651054706235584);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1638.880247750070112, 170.780189339920014);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1647.171437175555184, 220.804740431454292);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1657.376516424283182, 269.113937471590248);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1669.523988786652353, 317.097009951079542);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1683.642357553060720, 366.143187360674062);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1699.760126013905392, 417.641699191125440);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1708.662782184241905, 444.933722174073409);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::BySecondEdgeSymmetry);
points += p;
p = VSAPoint(1708.662782184241905, 444.933722174073409);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::BySecondEdgeSymmetry);
points += p;
p = VSAPoint(1708.662782184241905, 444.933722174073409);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::BySecondEdgeSymmetry);
points += p;
p = VSAPoint(1677.251229240104976, 451.246684764538941);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1605.086594041950320, 463.155242122690083);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1544.272339765547713, 471.094839513925308);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1501.274196476889529, 475.816264599789406);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1456.403111491504887, 479.956529052348401);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1409.875251575960647, 483.430528153818273);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1361.906783496823664, 486.153157186415115);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1312.713874020660569, 488.039311432354793);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1262.512689914038219, 489.003886173853402);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1211.519397943523927, 488.961776693126922);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1159.950164875684550, 487.827878272391445);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1108.021157477086035, 485.517086193862838);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1055.948542514296605, 481.944295739757194);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1003.948486753882094, 477.024402192290495);
p.SetSABefore(151.181);
p.SetSAAfter(151.181);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(978.059754412127063, 473.971248193821054);
p.SetSABefore(151.181);
p.SetAngleType(PieceNodeAngle::ByFirstEdgeSymmetry);
points += p;
p = VSAPoint(978.059754412127063, 473.971248193821054);
p.SetSABefore(151.181);
p.SetAngleType(PieceNodeAngle::ByFirstEdgeSymmetry);
points += p;
p = VSAPoint(978.059754412127063, 473.971248193821054);
p.SetSABefore(151.181);
p.SetAngleType(PieceNodeAngle::ByFirstEdgeSymmetry);
points += p;
p = VSAPoint(984.500664049167881, 439.858339084691238);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(998.403341335729920, 374.895601998811230);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1013.735113164965696, 313.199834991297735);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1030.722718345428348, 254.050229972719023);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1049.592895685671465, 196.725978853643085);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1070.572383994247502, 140.506273544638077);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1093.887922079709597, 84.670305956272159);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
p = VSAPoint(1119.766248750610885, 28.497267999113369);
p.SetAngleType(PieceNodeAngle::ByLengthCurve);
points += p;
points += VSAPoint(1133.858267716535465, 0.000000000000000);
return points;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<QPointF> TST_VAbstractPiece::OutputPointsIssue934Case3() const
{
QVector<QPointF> points;
points += QPointF(1111.075514893730315, -39.193127021735194);
points += QPointF(1662.522212799755380, -6.923715654880951);
points += QPointF(1665.648765146942878, 57.626086911110946);
points += QPointF(1670.091199415827987, 113.900142527237790);
points += QPointF(1676.303630411694712, 165.425468596995557);
points += QPointF(1684.322260121831278, 213.805541833033089);
points += QPointF(1694.200361802327961, 260.566879872136496);
points += QPointF(1706.013423451030349, 307.229014708540717);
points += QPointF(1719.842343091969724, 355.269667089451730);
points += QPointF(1735.830074328750925, 406.352691903936886);
points += QPointF(1745.972128474848887, 437.435445733357710);
points += QPointF(1575.039217266384640, 508.928892866275987);
points += QPointF(1302.519921954974052, 639.444186565335031);
points += QPointF(1263.902550577329066, 640.186187808469754);
points += QPointF(1209.795108673992672, 640.141506710349972);
points += QPointF(1154.927472101428293, 638.935083369183076);
points += QPointF(1099.485310435284873, 636.467959223881508);
points += QPointF(1043.652191269731475, 632.637154196705978);
points += QPointF(987.972975362633747, 627.369163402013896);
points += QPointF(940.434492417377328, 469.533961825903646);
points += QPointF(947.446497080812378, 432.396369275163750);
points += QPointF(961.574442359626801, 366.381027352609578);
points += QPointF(977.219989780144260, 303.422612688453626);
points += QPointF(994.595947496389158, 242.920792401422716);
points += QPointF(1013.924089039867795, 184.205327277493041);
points += QPointF(1035.416023464977798, 126.612396404806589);
points += QPointF(1059.274426966970623, 69.476376649892870);
points += QPointF(1085.656320891028145, 12.210265605542077);
points += QPointF(1111.075514893730315, -39.193127021735194);
return points;
}

View File

@ -161,6 +161,15 @@ private:
QVector<VSAPoint> InputPointsIssue923Test6_6();
QVector<QPointF> OutputPointsIssue923Test6_6();
QVector<VSAPoint> InputPointsIssue934Case1() const;
QVector<QPointF> OutputPointsIssue934Case1() const;
QVector<VSAPoint> InputPointsIssue934Case2() const;
QVector<QPointF> OutputPointsIssue934Case2() const;
QVector<VSAPoint> InputPointsIssue934Case3() const;
QVector<QPointF> OutputPointsIssue934Case3() const;
};
#endif // TST_VABSTRACTPIECE_H