Fixed issue #604. Seams allowances gets "weird" and turns inward when changing
measurment file. --HG-- branch : develop
This commit is contained in:
parent
fe8179d1bf
commit
a842e2c2d1
|
@ -54,6 +54,7 @@
|
||||||
- [#594] Broken export on Mac.
|
- [#594] Broken export on Mac.
|
||||||
- Math parser allows apostrophe in variable name.
|
- Math parser allows apostrophe in variable name.
|
||||||
- [#603] Wrong layout caused by wrong seam allowance.
|
- [#603] Wrong layout caused by wrong seam allowance.
|
||||||
|
- [#604] Seams allowances gets "weird" and turns inward when changing measurment file.
|
||||||
|
|
||||||
# Version 0.4.5 October 15, 2016
|
# Version 0.4.5 October 15, 2016
|
||||||
- [#435] Valentina doesn't change the cursor.
|
- [#435] Valentina doesn't change the cursor.
|
||||||
|
|
123
src/app/share/collection/bugs/Issue_#604.val
Normal file
123
src/app/share/collection/bugs/Issue_#604.val
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<pattern>
|
||||||
|
<!--Pattern created with Valentina (http://www.valentina-project.org/).-->
|
||||||
|
<version>0.3.9</version>
|
||||||
|
<unit>cm</unit>
|
||||||
|
<author/>
|
||||||
|
<description/>
|
||||||
|
<notes/>
|
||||||
|
<measurements>3XL.vit</measurements>
|
||||||
|
<increments/>
|
||||||
|
<draw name="Élément de patron 1">
|
||||||
|
<calculation>
|
||||||
|
<point type="single" x="0.79375" y="1.05833" id="1" name="A" mx="-6.18962" my="-7.97306"/>
|
||||||
|
<point type="endLine" typeLine="none" id="2" name="A1" basePoint="1" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="@G*0.88/2"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="3" name="A2" firstPoint="1" secondPoint="2" mx="-9.68467" lineColor="black" my="-4.4749" length="CurrentLength/2"/>
|
||||||
|
<point type="normal" typeLine="hair" id="4" name="A3" firstPoint="2" secondPoint="3" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="@T-9"/>
|
||||||
|
<point type="endLine" typeLine="hair" id="5" name="A4" basePoint="1" mx="0.132292" lineColor="black" angle="270" my="0.264583" length="@T-6"/>
|
||||||
|
<point type="normal" typeLine="hair" id="6" name="A5" firstPoint="3" secondPoint="1" mx="2.48227" lineColor="black" angle="0" my="1.40403" length="3"/>
|
||||||
|
<point type="normal" typeLine="hair" id="7" name="A6" firstPoint="4" secondPoint="2" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="2.5"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="9" name="A8" firstPoint="4" secondPoint="2" mx="0.132292" lineColor="black" my="0.264583" length="6"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="10" name="A9" firstPoint="5" secondPoint="1" mx="-4.08231" lineColor="black" my="-0.0547053" length="5"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="11" name="A10" firstPoint="4" secondPoint="9" mx="0.132292" lineColor="black" my="0.264583" length="4"/>
|
||||||
|
<point type="normal" typeLine="hair" id="12" name="A11" firstPoint="11" secondPoint="9" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="3.3"/>
|
||||||
|
<point type="normal" typeLine="hair" id="13" name="A12" firstPoint="10" secondPoint="5" mx="-2.20285" lineColor="black" angle="0" my="2.40087" length="1.5"/>
|
||||||
|
<point type="normal" typeLine="hair" id="14" name="A13" firstPoint="9" secondPoint="2" mx="-10.1488" lineColor="black" angle="0" my="4.22376" length="4.3"/>
|
||||||
|
<point type="normal" typeLine="hair" id="15" name="A14" firstPoint="4" secondPoint="7" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="5"/>
|
||||||
|
<point type="normal" typeLine="hair" id="16" name="A15" firstPoint="15" secondPoint="4" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="2"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="17" name="A16" firstPoint="1" secondPoint="10" mx="0.132292" lineColor="black" my="0.264583" length="CurrentLength/2"/>
|
||||||
|
<point type="pointOfIntersection" id="18" name="A7" firstPoint="1" secondPoint="6" mx="0.132292" my="0.264583"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="19" name="A17" firstPoint="18" secondPoint="6" mx="0.132292" lineColor="black" my="0.264583" length="CurrentLength/2-1.5"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="20" name="A18" firstPoint="6" secondPoint="12" mx="5.23231" lineColor="black" my="-5.3509" length="CurrentLength/2"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="21" name="A19" firstPoint="6" secondPoint="20" mx="-7.14744" lineColor="black" my="10.4179" length="CurrentLength/2"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="22" name="A20" firstPoint="20" secondPoint="12" mx="0.132292" lineColor="black" my="0.264583" length="CurrentLength/2"/>
|
||||||
|
<point type="normal" typeLine="hair" id="23" name="A21" firstPoint="21" secondPoint="20" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="3"/>
|
||||||
|
<point type="normal" typeLine="hair" id="24" name="A22" firstPoint="20" secondPoint="22" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="4.5"/>
|
||||||
|
<point type="normal" typeLine="hair" id="25" name="A23" firstPoint="22" secondPoint="12" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="3.5"/>
|
||||||
|
<point type="pointOfIntersection" id="26" name="A24" firstPoint="13" secondPoint="17" mx="0.132292" my="0.264583"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="27" name="A25" firstPoint="26" secondPoint="19" mx="0.132292" lineColor="black" my="0.264583" length="CurrentLength/2"/>
|
||||||
|
<point type="normal" typeLine="hair" id="28" name="A26" firstPoint="27" secondPoint="19" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="2"/>
|
||||||
|
<spline point4="26" type="simpleInteractive" angle1="165.852" angle2="82.3061" id="29" length1="9.46509" color="black" length2="7.16949" point1="6"/>
|
||||||
|
<point type="normal" typeLine="hair" id="30" name="A27" firstPoint="1" secondPoint="3" mx="-14.555" lineColor="black" angle="0" my="1.09473" length="0.5"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="31" name="A28" firstPoint="2" secondPoint="9" mx="0.132292" lineColor="black" my="0.264583" length="0.5"/>
|
||||||
|
<spline point4="3" type="simpleInteractive" angle1="359.381" angle2="179.793" id="32" length1="5.9263" color="black" length2="5.5587" point1="30"/>
|
||||||
|
<spline point4="14" type="simpleInteractive" angle1="354.316" angle2="117.117" id="34" length1="10.2446" color="black" length2="3.23394" point1="6"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="35" name="A29" firstPoint="9" secondPoint="31" mx="0.132292" lineColor="black" my="0.264583" length="0.5"/>
|
||||||
|
<spline point4="14" type="simpleInteractive" angle1="0" angle2="21.2782" id="36" length1="0" color="black" length2="1.32127" point1="35"/>
|
||||||
|
<spline point4="16" type="simpleInteractive" angle1="286.462" angle2="98.3582" id="37" length1="1.9649" color="black" length2="3.65423" point1="14"/>
|
||||||
|
<point type="normal" typeLine="hair" id="39" name="A30" firstPoint="6" secondPoint="18" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="6.2"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="47" name="A35" firstPoint="3" secondPoint="39" mx="0.962441" lineColor="black" my="-1.20414" length="3.5"/>
|
||||||
|
<point type="pointOfIntersection" id="48" name="A36" firstPoint="30" secondPoint="47" mx="-6.70048" my="1.54174"/>
|
||||||
|
<line typeLine="hair" id="49" firstPoint="48" secondPoint="47" lineColor="black"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="50" name="A37" firstPoint="48" secondPoint="30" mx="-16.4068" lineColor="black" my="-4.07774" length="5"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="51" name="A38" firstPoint="47" secondPoint="6" mx="1.50028" lineColor="black" my="2.38547" length="0"/>
|
||||||
|
<operation type="rotation" suffix="a1" id="52" center="51" angle="347">
|
||||||
|
<source>
|
||||||
|
<item idObject="30"/>
|
||||||
|
<item idObject="32"/>
|
||||||
|
<item idObject="3"/>
|
||||||
|
<item idObject="47"/>
|
||||||
|
<item idObject="48"/>
|
||||||
|
</source>
|
||||||
|
<destination>
|
||||||
|
<item idObject="53" mx="-1.40029" my="-3.43916"/>
|
||||||
|
<item idObject="54" mx="2.14748e+09" my="2.14748e+09"/>
|
||||||
|
<item idObject="55" mx="-9.10953" my="1.82874"/>
|
||||||
|
<item idObject="56" mx="-9.14742" my="4.69111"/>
|
||||||
|
<item idObject="57" mx="-15.896" my="-2.22587"/>
|
||||||
|
</destination>
|
||||||
|
</operation>
|
||||||
|
<spline point4="48" type="simpleInteractive" angle1="255.907" angle2="87.9297" id="59" length1="2.09975" color="black" length2="2.78289" point1="53"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="87" name="A39" firstPoint="55" secondPoint="39" mx="3.60993" lineColor="black" my="-2.36139" length="2"/>
|
||||||
|
<line typeLine="hair" id="116" firstPoint="55" secondPoint="6" lineColor="black"/>
|
||||||
|
<point type="normal" typeLine="hair" id="128" name="A31" firstPoint="53" secondPoint="55" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="1"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="129" name="A32" firstPoint="6" secondPoint="55" mx="6.58701" lineColor="black" my="-3.30873" length="4"/>
|
||||||
|
<line typeLine="hair" id="131" firstPoint="129" secondPoint="6" lineColor="black"/>
|
||||||
|
<point type="normal" typeLine="hair" id="132" name="A33" firstPoint="3" secondPoint="31" mx="-6.0275" lineColor="black" angle="0" my="0.188515" length="1"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="154" name="A34" firstPoint="6" secondPoint="132" mx="-3.05823" lineColor="black" my="-10.8077" length="Line_A32_A5"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="156" name="A40" firstPoint="129" secondPoint="128" mx="4.04072" lineColor="black" my="-3.64384" length="40"/>
|
||||||
|
<line typeLine="hair" id="157" firstPoint="128" secondPoint="129" lineColor="black"/>
|
||||||
|
<line typeLine="hair" id="158" firstPoint="48" secondPoint="10" lineColor="black"/>
|
||||||
|
<point type="normal" typeLine="hair" id="159" name="A41" firstPoint="128" secondPoint="156" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="Spl_A27a1_A36+Line_A36_A9"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="160" name="A42" firstPoint="128" secondPoint="159" mx="0.132292" lineColor="black" my="0.264583" length="40"/>
|
||||||
|
<point type="normal" typeLine="hair" id="161" name="A43" firstPoint="159" secondPoint="160" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="2"/>
|
||||||
|
<line typeLine="hair" id="162" firstPoint="17" secondPoint="10" lineColor="black"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="163" name="A44" firstPoint="159" secondPoint="128" mx="0.132292" lineColor="black" my="0.264583" length="Line_A16_A9"/>
|
||||||
|
<point type="normal" typeLine="hair" id="164" name="A45" firstPoint="163" secondPoint="159" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="2"/>
|
||||||
|
<line typeLine="hair" id="165" firstPoint="164" secondPoint="161" lineColor="black"/>
|
||||||
|
<spline point4="164" type="simpleInteractive" angle1="167.443" angle2="68.8099" id="166" length1="13.1825" color="black" length2="9.07056" point1="6"/>
|
||||||
|
<line typeLine="hair" id="167" firstPoint="26" secondPoint="13" lineColor="black"/>
|
||||||
|
<point type="normal" typeLine="hair" id="176" name="A46" firstPoint="31" secondPoint="2" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="2"/>
|
||||||
|
<point type="alongLine" typeLine="hair" id="188" name="A47" firstPoint="27" secondPoint="28" mx="0.132292" lineColor="black" my="0.264583" length="3.8"/>
|
||||||
|
<spline point4="154" type="simpleInteractive" angle1="179.373" angle2="353.062" id="207" length1="3.1466" color="black" length2="5.58067" point1="176"/>
|
||||||
|
<point type="endLine" typeLine="hair" id="235" name="A48" basePoint="39" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="5"/>
|
||||||
|
<spline point4="14" type="simpleInteractive" angle1="0.283531" angle2="122.878" id="236" length1="7.34718" color="black" length2="5.3045" point1="235"/>
|
||||||
|
<line typeLine="hair" id="237" firstPoint="154" secondPoint="39" lineColor="black"/>
|
||||||
|
<point type="alongLine" typeLine="hair" id="238" name="A49" firstPoint="129" secondPoint="6" mx="0.132292" lineColor="black" my="0.264583" length="Line_A34_A30"/>
|
||||||
|
<point type="normal" typeLine="hair" id="239" name="A50" firstPoint="238" secondPoint="129" mx="0.132292" lineColor="black" angle="0" my="0.264583" length="7"/>
|
||||||
|
<spline point4="239" type="simpleInteractive" angle1="56.0748" angle2="163.688" id="240" length1="4.87388" color="black" length2="2.12533" point1="164"/>
|
||||||
|
<point type="cutSpline" id="339" name="A51" spline="207" mx="0.512539" my="-2.4918" length="Spl_A46_A34-0.5"/>
|
||||||
|
<point type="alongLine" typeLine="none" id="340" name="A52" firstPoint="129" secondPoint="128" mx="-3.89273" lineColor="black" my="-3.24586" length="0.5"/>
|
||||||
|
<spline point4="238" type="simpleInteractive" angle1="261.197" angle2="75.6262" id="341" length1="2.07227" color="black" length2="2.29922" point1="340"/>
|
||||||
|
<spline point4="39" type="simpleInteractive" angle1="262.702" angle2="93.2162" id="342" length1="1.91484" color="black" length2="3.11854" point1="339"/>
|
||||||
|
</calculation>
|
||||||
|
<modeling>
|
||||||
|
<point type="modeling" inUse="true" id="355" idObject="128" mx="0.132292" my="0.264583"/>
|
||||||
|
<point type="modeling" inUse="true" id="356" idObject="340" mx="0.454236" my="-3.22064"/>
|
||||||
|
<point type="modeling" inUse="true" id="358" idObject="238" mx="0.132292" my="0.264583"/>
|
||||||
|
<point type="modeling" inUse="true" id="363" idObject="159" mx="0.132292" my="0.264583"/>
|
||||||
|
</modeling>
|
||||||
|
<details>
|
||||||
|
<detail closed="0" id="364" name="Pièce de patron" forbidFlipping="0" supplement="1" width="0.3" mx="-29.7142" my="-4.53267">
|
||||||
|
<data rotation="0" letter="" fontSize="12" visible="false" mx="0" width="0" my="0" height="0"/>
|
||||||
|
<patternInfo rotation="0" fontSize="12" visible="false" mx="0" width="0" my="0" height="0"/>
|
||||||
|
<grainline arrows="0" rotation="90" visible="false" mx="0" my="0" length="0"/>
|
||||||
|
<node type="NodePoint" nodeType="Contour" idObject="355" mx="0" my="0"/>
|
||||||
|
<node type="NodePoint" nodeType="Contour" idObject="356" mx="0" my="0"/>
|
||||||
|
<node type="NodePoint" nodeType="Contour" idObject="358" mx="0" my="0"/>
|
||||||
|
<node type="NodePoint" nodeType="Contour" idObject="363" mx="0" my="0"/>
|
||||||
|
</detail>
|
||||||
|
</details>
|
||||||
|
<groups/>
|
||||||
|
</draw>
|
||||||
|
</pattern>
|
53
src/app/share/collection/bugs/Issue_#604.vit
Normal file
53
src/app/share/collection/bugs/Issue_#604.vit
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<vit>
|
||||||
|
<!--Measurements created with Valentina (http://www.valentina-project.org/).-->
|
||||||
|
<version>0.3.3</version>
|
||||||
|
<read-only>false</read-only>
|
||||||
|
<notes/>
|
||||||
|
<unit>cm</unit>
|
||||||
|
<pm_system>998</pm_system>
|
||||||
|
<personal>
|
||||||
|
<family-name/>
|
||||||
|
<given-name/>
|
||||||
|
<birth-date>1800-01-01</birth-date>
|
||||||
|
<gender>unknown</gender>
|
||||||
|
<email/>
|
||||||
|
</personal>
|
||||||
|
<body-measurements>
|
||||||
|
<m full_name="LONGUEUR TAILLE DOS" value="43.5+1" name="@A"/>
|
||||||
|
<m full_name="HAUTEUR SLIP DVT" value="18+0.5" description="0.5" name="@HSD"/>
|
||||||
|
<m value="11" description="0" name="@HCRO"/>
|
||||||
|
<m full_name="LARGEUR SLIP DVT" value="16.4+0.6" description="0,6" name="@LSD"/>
|
||||||
|
<m full_name="LONGUEUR TAILLE DEVANT" value="39.5+1" name="@B"/>
|
||||||
|
<m full_name="TOUR DE POITRINE" value="108+8" name="@C"/>
|
||||||
|
<m full_name="HAUTEUR POITRINE (TETON - COU)" value="37+1" name="@D"/>
|
||||||
|
<m full_name="1/2 ECART POITRINE" value="10.5+0.5" name="@E"/>
|
||||||
|
<m full_name="TOUR DE TAILLE" value="88+8" name="@F"/>
|
||||||
|
<m full_name="TOUR PETITES HANCHES" value="97+8+8" name="@G"/>
|
||||||
|
<m full_name="TOUR DE HANCHES" value="106+8+8" name="@H"/>
|
||||||
|
<m full_name="DEMI TOUR ENCOLURE" value="19.5+1+1" name="@I"/>
|
||||||
|
<m full_name="DEMI CARRURE DOS" value="18.25+0.5+0.5" name="@J"/>
|
||||||
|
<m full_name="DEMI CARRURE DVT" value="17.25+0.5+0.5" name="@K"/>
|
||||||
|
<m full_name="LONGUEUR EPAULE" value="13.2+0.8+0.8" name="@L"/>
|
||||||
|
<m full_name="TOUR EMMANCHURE" value="42.5+2+2" name="@M"/>
|
||||||
|
<m full_name="HAUTEUR DESSOUS DE BRAS" value="22.25+0.5+0.5" name="@N"/>
|
||||||
|
<m full_name="LONGUEUR BRAS" value="60" name="@O"/>
|
||||||
|
<m full_name="TOUR DE BICEPS" value="29+2+2" name="@P"/>
|
||||||
|
<m full_name="EPAULE À COUDE" value="35" name="@Q"/>
|
||||||
|
<m full_name="TOUR DE POIGNET" value="16.75+0.5+0.5" name="@R"/>
|
||||||
|
<m full_name="HAUTEUR TAILLE-HANCHES" value="22" name="@S"/>
|
||||||
|
<m full_name="HAUTEUR MONTANT DEVANT" value="28 +1+1" name="@T"/>
|
||||||
|
<m full_name="ENFOURCHURE TOTALE" value="66+4+4" name="@U"/>
|
||||||
|
<m full_name="HAUTEUR TAILLE GENOU" value="61+2+2" name="@V"/>
|
||||||
|
<m full_name="HAUTEUR TAILLE SOL" value="107+1+1" name="@W"/>
|
||||||
|
<m full_name="HAUTEUR COTE TAILLE AU SOL" value="107.5+1+1" name="@X"/>
|
||||||
|
<m full_name="TOUR DESSOUS DE POITRINE" value="87+8+8" description="+4" name="@TSP"/>
|
||||||
|
<m full_name="TOUR DE CUISSE" value="63+6+6" description="+3" name="@TCU"/>
|
||||||
|
<m full_name="TOUR DE GENOU" value="39.2+2.8+2.8" description="+1,4" name="@TG"/>
|
||||||
|
<m full_name="TOUR DE CHEVILLE" value="24.8+1.2+1.2" description="+0,6" name="@TCH"/>
|
||||||
|
<m full_name="HAUTEUR COU TAILLE" value="42.5+1+1" description="+0,5" name="@HCT"/>
|
||||||
|
<m full_name="HAUTEUR EMMANCHURE DOS" value="22+0.4+0.4" description="+0.2" name="@HED"/>
|
||||||
|
<m full_name="HAUTEUR FOURCHE COTÉ" value="30.4+1.6+1.6 " description="+0.8" name="@FC"/>
|
||||||
|
<m full_name="HAUTEUR TAILLE GENOU" value="60.8+0.8+0.8+0.8+0.8 " description="0,8" name="@HG"/>
|
||||||
|
</body-measurements>
|
||||||
|
</vit>
|
|
@ -614,7 +614,8 @@ QPointF VAbstractDetail::UnclosedEkvPoint(const QLineF &line, const QLineF &help
|
||||||
return QPointF();
|
return QPointF();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (not (line.p2() == helpLine.p2() || line.p1() == helpLine.p1()))
|
const bool firstPoint = line.p1() == helpLine.p1();
|
||||||
|
if (not (line.p2() == helpLine.p2() || firstPoint))
|
||||||
{
|
{
|
||||||
qDebug()<<"Two points of two lines must be equal.";
|
qDebug()<<"Two points of two lines must be equal.";
|
||||||
return QPointF();
|
return QPointF();
|
||||||
|
@ -634,9 +635,10 @@ QPointF VAbstractDetail::UnclosedEkvPoint(const QLineF &line, const QLineF &help
|
||||||
// User can create very wrong path that will create crospoint far from main path.
|
// User can create very wrong path that will create crospoint far from main path.
|
||||||
// Such an annomaly we try to catch and fix.
|
// Such an annomaly we try to catch and fix.
|
||||||
// If don't do this the program will crash.
|
// If don't do this the program will crash.
|
||||||
QLineF test( line.p2(), CrosPoint );
|
QLineF test;
|
||||||
|
firstPoint ? test = QLineF(line.p1(), CrosPoint) : test = QLineF(line.p2(), CrosPoint);
|
||||||
const qreal length = test.length();
|
const qreal length = test.length();
|
||||||
if (length > width*50) // Why 50? Try to avoid cutting correct cases.
|
if (length > width*2.4)
|
||||||
{
|
{
|
||||||
test.setLength(width);
|
test.setLength(width);
|
||||||
return test.p2();
|
return test.p2();
|
||||||
|
@ -649,7 +651,14 @@ QPointF VAbstractDetail::UnclosedEkvPoint(const QLineF &line, const QLineF &help
|
||||||
}
|
}
|
||||||
case (QLineF::NoIntersection):
|
case (QLineF::NoIntersection):
|
||||||
/*If we have correct lines this means lines lie on a line.*/
|
/*If we have correct lines this means lines lie on a line.*/
|
||||||
return bigLine.p2();
|
if (firstPoint)
|
||||||
|
{
|
||||||
|
return bigLine.p1();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return bigLine.p2();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -570,37 +570,80 @@ void TST_VAbstractDetail::PathRemoveLoop() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TST_VAbstractDetail::BrokenDetailEquidistant() const
|
void TST_VAbstractDetail::BrokenDetailEquidistant_data() const
|
||||||
{
|
{
|
||||||
|
QTest::addColumn<QVector<QPointF>>("points");
|
||||||
|
QTest::addColumn<int>("eqv");
|
||||||
|
QTest::addColumn<qreal>("width");
|
||||||
|
QTest::addColumn<QVector<QPointF>>("ekvOrig");
|
||||||
|
|
||||||
// For more details see the file "collection/bugs/GAVAUDAN Laure - corsage - figure 4.val".
|
// For more details see the file "collection/bugs/GAVAUDAN Laure - corsage - figure 4.val".
|
||||||
// We will test only one detail. The second require too accurate data that we cannot get from debuger.
|
// We will test only one detail. The second require too accurate data that we cannot get from debuger.
|
||||||
// The test check an open equdistant of correct detail.
|
// The test check an open equdistant of correct detail.
|
||||||
QVector<QPointF> points;// Input points.
|
QVector<QPointF> points;// Input points.
|
||||||
points.append(QPointF(787.5835464566929, 1701.3138897637796));
|
points.append(QPointF(787.5835464566929, 1701.3138897637796));
|
||||||
points.append(QPointF(938.7646488188976, 1701.3138897637796));
|
points.append(QPointF(938.7646488188976, 1701.3138897637796));
|
||||||
|
points.append(QPointF(928.6149958683911, 1732.4440719866434));
|
||||||
points.append(QPointF(910.0209091217698, 1792.3369853889722));
|
points.append(QPointF(910.0209091217698, 1792.3369853889722));
|
||||||
|
points.append(QPointF(893.3643262819251, 1849.7845131987456));
|
||||||
points.append(QPointF(878.5244039283091, 1905.2261617043234));
|
points.append(QPointF(878.5244039283091, 1905.2261617043234));
|
||||||
points.append(QPointF(863.9159293830619, 1968.2534932384856));
|
points.append(QPointF(865.3802986403739, 1959.101437194065));
|
||||||
|
points.append(QPointF(863.9366982685195, 1965.6834024491068));
|
||||||
points.append(QPointF(852.8936778444679, 1919.6965437838999));
|
points.append(QPointF(852.8936778444679, 1919.6965437838999));
|
||||||
|
points.append(QPointF(837.0628180560684, 1860.2846653184251));
|
||||||
points.append(QPointF(819.0677656132684, 1798.6758641921479));
|
points.append(QPointF(819.0677656132684, 1798.6758641921479));
|
||||||
|
points.append(QPointF(798.7585839758027, 1734.54810216256));
|
||||||
points.append(QPointF(787.5835464566929, 1701.3138897637796));
|
points.append(QPointF(787.5835464566929, 1701.3138897637796));
|
||||||
points.append(QPointF(797.0323653543306, 2608.4005039370077));
|
|
||||||
|
|
||||||
const EquidistantType eqv = EquidistantType::OpenEquidistant; // Open path
|
EquidistantType eqv = EquidistantType::OpenEquidistant; // Open path
|
||||||
const qreal width = 37.795275590551185; // seam allowance width
|
qreal width = 37.795275590551185; // seam allowance width
|
||||||
|
|
||||||
const QVector<QPointF> ekv = VAbstractDetail::Equidistant(points, eqv, width);// Take result
|
|
||||||
|
|
||||||
QVector<QPointF> ekvOrig;
|
QVector<QPointF> ekvOrig;
|
||||||
ekvOrig.append(QPointF(938.7646488188976, 1663.5186141732283));
|
ekvOrig.append(QPointF(774.8748468280837, 1663.5186141732283));
|
||||||
ekvOrig.append(QPointF(990.3348131440238, 1663.5186141732283));
|
ekvOrig.append(QPointF(990.8407795072413, 1663.5186141732283));
|
||||||
ekvOrig.append(QPointF(946.2541789190154, 1803.1092111713983));
|
ekvOrig.append(QPointF(964.6314912875667, 1743.9055911653147));
|
||||||
ekvOrig.append(QPointF(915.1544461790318, 1914.5762831871607));
|
ekvOrig.append(QPointF(946.2221157804494, 1803.203536155223));
|
||||||
ekvOrig.append(QPointF(893.9371203604946, 2006.1170819537472));
|
ekvOrig.append(QPointF(929.7733291125676, 1859.9343877726233));
|
||||||
ekvOrig.append(QPointF(833.7229784629903, 2005.9802605640884));
|
ekvOrig.append(QPointF(915.1430746962241, 1914.5927211230298));
|
||||||
ekvOrig.append(QPointF(816.2424908106893, 1928.9724774988724));
|
ekvOrig.append(QPointF(902.2033544443959, 1967.630259856634));
|
||||||
ekvOrig.append(QPointF(782.8721775719547, 1809.5818175001634));
|
ekvOrig.append(QPointF(894.4064781634931, 2003.1794116713015));
|
||||||
ekvOrig.append(QPointF(751.6217900811182, 1712.9429454154488));
|
ekvOrig.append(QPointF(834.213891302752, 2003.7742535883901));
|
||||||
|
ekvOrig.append(QPointF(816.2523103379473, 1928.9761772004185));
|
||||||
|
ekvOrig.append(QPointF(800.6574884611877, 1870.4501290629887));
|
||||||
|
ekvOrig.append(QPointF(782.9077417718742, 1809.6811695225983));
|
||||||
|
ekvOrig.append(QPointF(786.7126382487066, 1698.723835966227));
|
||||||
|
|
||||||
|
QTest::newRow("GAVAUDAN Laure.") << points << static_cast<int>(eqv) << width << ekvOrig;
|
||||||
|
|
||||||
|
points.clear();
|
||||||
|
points.append(QPointF(97.33089106412862, -223.03306117556497));
|
||||||
|
points.append(QPointF(990.7494050554426, 2.819093995045));
|
||||||
|
points.append(QPointF(908.3966357321774, 379.5839357215547));
|
||||||
|
points.append(QPointF(-135.41154226686143, 697.6417881399819));
|
||||||
|
|
||||||
|
eqv = EquidistantType::OpenEquidistant;
|
||||||
|
width = 11.338582677165354;
|
||||||
|
|
||||||
|
ekvOrig.clear();
|
||||||
|
ekvOrig.append(QPointF(100.10981413873267, -234.02583351343978));
|
||||||
|
ekvOrig.append(QPointF(1004.1704360325447, -5.483401649771952));
|
||||||
|
ekvOrig.append(QPointF(918.0553412376563, 388.4941212347381));
|
||||||
|
ekvOrig.append(QPointF(-138.65807550610091, 710.4843173601864));
|
||||||
|
|
||||||
|
// See the file "collection/bugs/Issue_#604.val" (since 0.5.0)
|
||||||
|
QTest::newRow("Issue #604.") << points << static_cast<int>(eqv) << width << ekvOrig;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void TST_VAbstractDetail::BrokenDetailEquidistant() const
|
||||||
|
{
|
||||||
|
QFETCH(QVector<QPointF>, points);
|
||||||
|
QFETCH(int, eqv);
|
||||||
|
QFETCH(qreal, width);
|
||||||
|
QFETCH(QVector<QPointF>, ekvOrig);
|
||||||
|
|
||||||
|
const QVector<QPointF> ekv = VAbstractDetail::Equidistant(points, static_cast<EquidistantType>(eqv),
|
||||||
|
width);// Take result
|
||||||
|
|
||||||
// Begin comparison
|
// Begin comparison
|
||||||
Comparison(ekv, ekvOrig);
|
Comparison(ekv, ekvOrig);
|
||||||
|
|
|
@ -45,6 +45,7 @@ private slots:
|
||||||
void SumTrapezoids() const;
|
void SumTrapezoids() const;
|
||||||
void PathRemoveLoop_data() const;
|
void PathRemoveLoop_data() const;
|
||||||
void PathRemoveLoop() const;
|
void PathRemoveLoop() const;
|
||||||
|
void BrokenDetailEquidistant_data() const;
|
||||||
void BrokenDetailEquidistant() const;
|
void BrokenDetailEquidistant() const;
|
||||||
void CorrectEquidistantPoints_data() const;
|
void CorrectEquidistantPoints_data() const;
|
||||||
void CorrectEquidistantPoints() const;
|
void CorrectEquidistantPoints() const;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user