Merge branch 'develop' into feature/manual-layout

This commit is contained in:
Roman Telezhynskyi 2021-04-24 13:05:13 +03:00
commit f4eb8330b3
127 changed files with 4768 additions and 1454 deletions

View File

@ -1,4 +1,23 @@
# Version 0.7.45 (unreleased)
# Version 0.7.47 (unreleased)
- [smart-pattern/valentina#118] Incorrect seam allowance.
- [smart-pattern/valentina#119] Improve tool Point of intersection curves.
- [smart-pattern/valentina#120] Incorrect seam allowance.
- Fix export to DXF AAMA/ASTM.
- [smart-pattern/valentina#121] Incorrect elliptical arc end angle.
- [smart-pattern/valentina#122] Extend piece bounding rect.
- Remember last selected export format.
# Version 0.7.46 Mar 31, 2021
- Fix incorrect calculation of value for multisize measurements in Valentina.
- [smart-pattern/valentina#109] Pattern label template placeholder with dimension label value.
- Incorrect duplication of a piece. Missing restoring pins.
- [smart-pattern/valentina#112] Incorrect seam allowance.
- [smart-pattern/valentina#113] Incorrect seam allowance.
- [smart-pattern/valentina#114] Incorrect seam allowance.
- Fixed bugs.
- Updated translations.
# Version 0.7.45 Feb 26, 2021
- Fix incorrect seam allowance for angle type second edge right angle.
- Fix regression with country flags.
- Fix bug in seam allowance.

View File

@ -258,7 +258,7 @@ deploy:
package: valentina-win_auto-upload
publish: true
override: true
version: 0.7.44
version: 0.7.46
on:
DEPLOY: true
artifact: valentina-win-$(QT_VERSION)-$(APPVEYOR_REPO_BRANCH)-$(APPVEYOR_REPO_COMMIT)

View File

@ -1,5 +1,5 @@
valentina (0.7.44) trusty; urgency=low
valentina (0.7.46) trusty; urgency=low
* Auto build.
-- dismine <dismine@dismine-To-be-filled-by-O-E-M> Tue, 09 Feb 2021 19:48:00 +0300
-- dismine <dismine@dismine-To-be-filled-by-O-E-M> Wed, 31 Mar 2021 17:20:00 +0300

View File

@ -6,7 +6,6 @@ Build-Depends: debhelper (>= 8.0.0),
qtbase5-dev (>= 5.4.0),
libqt5svg5-dev (>= 5.4.0),
g++ (>= 4.8.0),
qt5-default (>= 5.4.0),
qttools5-dev-tools (>= 5.4.0),
libqt5xmlpatterns5-dev (>= 5.4.0),
libqt5opengl5-dev (>= 5.4.0)

View File

@ -1,5 +1,5 @@
valentina (0.7.44) trusty; urgency=low
valentina (0.7.46) trusty; urgency=low
* Auto build.
-- dismine <dismine@dismine-To-be-filled-by-O-E-M> Tue, 09 Feb 2021 19:48:00 +0300
-- dismine <dismine@dismine-To-be-filled-by-O-E-M> Wed, 31 Mar 2021 17:20:00 +0300

1
dist/debian/control vendored
View File

@ -6,7 +6,6 @@ Build-Depends: debhelper (>= 8.0.0),
qtbase5-dev (>= 5.4.0),
libqt5svg5-dev (>= 5.4.0),
g++ (>= 4.8.0),
qt5-default (>= 5.4.0),
qttools5-dev-tools (>= 5.4.0),
libqt5xmlpatterns5-dev (>= 5.4.0),
libqt5opengl5-dev (>= 5.4.0)

View File

@ -19,9 +19,9 @@
<key>CFBundleIdentifier</key>
<string>io.bitbucket.valentinaproject.@EXECUTABLE@</string>
<key>CFBundleShortVersionString</key>
<string>0.7.44</string>
<string>0.7.46</string>
<key>CFBundleVersion</key>
<string>0.7.44.0</string>
<string>0.7.46.0</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDocumentTypes</key>

View File

@ -19,9 +19,9 @@
<key>CFBundleIdentifier</key>
<string>io.bitbucket.valentinaproject.@EXECUTABLE@</string>
<key>CFBundleShortVersionString</key>
<string>0.7.44</string>
<string>0.7.46</string>
<key>CFBundleVersion</key>
<string>0.7.44.0</string>
<string>0.7.46.0</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDocumentTypes</key>

2
dist/rpm/_service vendored
View File

@ -1,7 +1,7 @@
<services>
<service name="tar_scm">
<param name="url">git://github.com/dismine/Valentina_git.git</param>
<param name="versionprefix">0.7.44</param>
<param name="versionprefix">0.7.46</param>
<param name="filename">valentina</param>
<param name="scm">git</param>
<param name="exclude">.git</param>

View File

@ -95,7 +95,7 @@ Requires: poppler-tools
Requires: poppler-utils
%endif
Version: 0.7.44
Version: 0.7.46
Release: 0
URL: https://gitlab.com/smart-pattern/valentina
License: GPL-3.0+

10
dist/valentina.dsc vendored
View File

@ -2,11 +2,11 @@ Format: 3.0 (native)
Source: valentina
Binary: valentina
Architecture: i386 amd64
Version: 0.7.44
Version: 0.7.46
Maintainer: Roman Telezhynskyi <dismine@gmail.com>
Homepage: https://valentinaproject.bitbucket.io
Standards-Version: 3.9.5
Vcs-Browser: https://bitbucket.org/dismine/valentina
Vcs-Browser: https://gitlab.com/smart-pattern/valentina
Build-Depends: debhelper (>= 8.0.0),
qtbase5-dev (>= 5.4.0),
libqt5svg5-dev (>= 5.4.0),
@ -18,8 +18,8 @@ Build-Depends: debhelper (>= 8.0.0),
Package-List:
valentina deb graphics optional
Checksums-Sha1:
581eb1bf36b4ab7126b5983d809130f15396859e 24838101 valentina_0.7.44.tar
581eb1bf36b4ab7126b5983d809130f15396859e 24838101 valentina_0.7.46.tar
Checksums-Sha256:
9b156c7120a69b90373efb8ca9998c3e0563a60ad337210166cfd41b00b0f13c 24838101 valentina_0.7.44.tar
9b156c7120a69b90373efb8ca9998c3e0563a60ad337210166cfd41b00b0f13c 24838101 valentina_0.7.46.tar
Files:
95677e29d3a59cf5b064f7be236a4b78 24838101 valentina_0.7.44.tar
95677e29d3a59cf5b064f7be236a4b78 24838101 valentina_0.7.46.tar

View File

@ -43,7 +43,7 @@ do
done
end=$(date +%s)
runtime=$(python -c "print 'Time passed %u:%02u seconds' % ((${end} - ${start})/60, (${end} - ${start})%60)")
runtime=$(python -c "print('Time passed %u:%02u seconds' % ((${end} - ${start})/60, (${end} - ${start})%60))")
echo $runtime
echo For updating files run: build all.

View File

@ -15,10 +15,10 @@
},
"version": {
"name": "0.7.44",
"name": "0.7.46",
"desc": "Test branch release",
"released": "2021-02-09",
"vcs_tag": "v0.7.44",
"released": "2021-03-31",
"vcs_tag": "v0.7.46",
"gpgSign": false
},

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2066,6 +2066,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -1746,6 +1746,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -1399,6 +1399,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -1638,6 +1638,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2102,6 +2102,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -1942,6 +1942,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -1911,6 +1911,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -2110,6 +2110,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -1559,6 +1559,26 @@
<source>Measurement: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Size label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hip label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Waist label</source>
<comment>dimension</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogEditWrongFormula</name>

View File

@ -1,111 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<pattern>
<!--Pattern created with Valentina (http://www.valentina-project.org/).-->
<version>0.2.4</version>
<unit>cm</unit>
<author/>
<description/>
<notes/>
<measurements>mesures GAVAUDAN Laure.vit</measurements>
<increments/>
<draw name="Élément de patron 2">
<calculation>
<point id="1" mx="-1.96425" x="0.838148" y="1.01393" name="A" type="single" my="-1.2931"/>
<point id="2" basePoint="1" typeLine="hair" mx="1.11306" length="46" name="B" lineColor="black" type="endLine" angle="0" my="-1.69695"/>
<point id="3" basePoint="2" typeLine="hair" mx="0.132292" length="68" name="C" lineColor="black" type="endLine" angle="270" my="0.264583"/>
<point id="4" basePoint="3" typeLine="hair" mx="0.132292" length="46" name="D" lineColor="black" type="endLine" angle="180" my="0.264583"/>
<line id="5" firstPoint="1" typeLine="hair" secondPoint="4" lineColor="black"/>
<point id="6" firstPoint="1" typeLine="none" mx="-0.560014" secondPoint="2" length="22" name="K" lineColor="black" type="alongLine" my="-3.08156"/>
<point id="7" firstPoint="4" typeLine="none" mx="0.132292" secondPoint="3" length="22" name="L" lineColor="black" type="alongLine" my="0.264583"/>
<line id="8" firstPoint="7" typeLine="dashDotLine" secondPoint="6" lineColor="black"/>
<point id="9" firstPoint="1" typeLine="none" mx="-1.02155" secondPoint="6" length="8" name="BB" lineColor="black" type="alongLine" my="-2.67772"/>
<point id="10" firstPoint="2" typeLine="none" mx="-3.96385" secondPoint="6" length="8" name="BB1" lineColor="black" type="alongLine" my="-2.50464"/>
<point id="11" firstPoint="4" typeLine="none" mx="0.132292" secondPoint="7" length="8" name="BB2" lineColor="black" type="alongLine" my="0.264583"/>
<point id="12" firstPoint="3" typeLine="none" mx="0.132292" secondPoint="7" length="8" name="BB3" lineColor="black" type="alongLine" my="0.264583"/>
<line id="13" firstPoint="12" typeLine="dashDotDotLine" secondPoint="10" lineColor="black"/>
<line id="14" firstPoint="9" typeLine="dashDotDotLine" secondPoint="11" lineColor="black"/>
<point id="15" firstPoint="1" typeLine="none" mx="0.132292" secondPoint="4" length="@H_sommet_epaule_taille_DOS" name="G" lineColor="black" type="alongLine" my="0.264583"/>
<point id="16" firstPoint="2" typeLine="none" mx="0.25048" secondPoint="3" length="@H_sommet_epaule_taille_DOS" name="H" lineColor="black" type="alongLine" my="0.0873015"/>
<line id="17" firstPoint="15" typeLine="dashDotDotLine" secondPoint="16" lineColor="black"/>
<point id="19" firstPoint="2" typeLine="none" mx="0.132292" secondPoint="16" length="@H_sommet_épaule_ligne_poitrine" name="F" lineColor="black" type="alongLine" my="0.264583"/>
<point id="20" firstPoint="1" typeLine="none" mx="-0.635928" secondPoint="15" length="@H_sommet_épaule_ligne_poitrine" name="E" lineColor="black" type="alongLine" my="0.146395"/>
<line id="21" firstPoint="20" typeLine="dashDotDotLine" secondPoint="19" lineColor="black"/>
<point id="22" firstPoint="20" typeLine="none" mx="-1.59847" secondPoint="1" length="@H_ligne_poitrine_ligne_carrure" name="I" lineColor="black" type="alongLine" my="-1.12003"/>
<point id="23" firstPoint="19" typeLine="none" mx="1.17075" secondPoint="2" length="@H_ligne_poitrine_ligne_carrure" name="J" lineColor="black" type="alongLine" my="-1.00464"/>
<line id="24" firstPoint="22" typeLine="dashDotDotLine" secondPoint="23" lineColor="black"/>
<point id="25" firstPoint="20" typeLine="none" mx="0.132292" secondPoint="19" length="22" name="M" lineColor="black" type="alongLine" my="0.264583"/>
<point id="26" firstPoint="15" typeLine="none" mx="0.132292" secondPoint="16" length="22" name="N" lineColor="black" type="alongLine" my="0.264583"/>
<point id="27" firstPoint="26" typeLine="none" mx="0.132292" secondPoint="16" length="2" name="W" lineColor="black" type="alongLine" my="0.264583"/>
<point id="28" firstPoint="26" typeLine="none" mx="0.132292" secondPoint="15" length="2" name="X" lineColor="black" type="alongLine" my="0.264583"/>
<line id="29" firstPoint="27" typeLine="hair" secondPoint="25" lineColor="black"/>
<line id="30" firstPoint="28" typeLine="hair" secondPoint="25" lineColor="black"/>
<point id="31" firstPoint="27" typeLine="none" mx="0.132292" secondPoint="25" length="Line_W_M+4" name="Y" lineColor="black" type="alongLine" my="0.264583"/>
<line id="32" firstPoint="31" typeLine="hair" secondPoint="25" lineColor="black"/>
<point id="33" firstPoint="28" typeLine="none" mx="0.132292" secondPoint="25" length="Line_X_M+4" name="Z" lineColor="black" type="alongLine" my="0.264583"/>
<line id="34" firstPoint="33" typeLine="hair" secondPoint="25" lineColor="black"/>
<point id="35" firstPoint="3" typeLine="none" mx="-1.89213" secondPoint="7" length="25.75" name="Ab" lineColor="black" type="alongLine" my="0.404198"/>
<point id="36" firstPoint="4" typeLine="none" mx="0.132292" secondPoint="7" length="23.75" name="Aa" lineColor="black" type="alongLine" my="0.264583"/>
<point id="37" firstPoint="35" typeLine="hair" mx="0.132292" secondPoint="36" length="5" name="A1" lineColor="darkRed" type="normal" angle="0" my="0.264583"/>
<point id="38" firstPoint="36" typeLine="hair" mx="0.132292" secondPoint="12" length="5" name="A2" lineColor="black" type="normal" angle="0" my="0.264583"/>
<spline id="39" angle2="288.781" kAsm1="0.895078" kAsm2="1.0522" angle1="91.2766" point4="28" type="simple" point1="36" kCurve="1" color="black"/>
<spline id="40" angle2="88.1667" kAsm1="0.98307" kAsm2="1.03228" angle1="251.79" point4="35" type="simple" point1="27" kCurve="1" color="black"/>
<point id="41" firstPoint="2" typeLine="none" mx="0.0169077" secondPoint="10" length="7" name="R" lineColor="black" type="alongLine" my="-2.73541"/>
<point id="42" basePoint="2" typeLine="hair" mx="0.132292" length="7" name="S" lineColor="black" type="endLine" angle="270" my="0.264583"/>
<line id="43" firstPoint="41" typeLine="hair" secondPoint="42" lineColor="black"/>
<point id="44" firstPoint="41" typeLine="none" mx="3.65151" secondPoint="42" length="Line_R_S/2" name="BB4" lineColor="black" type="alongLine" my="-1.17772"/>
<point id="45" firstPoint="44" typeLine="hair" mx="0.132292" secondPoint="41" length="2.1" name="BB5" lineColor="black" type="normal" angle="0" my="0.264583"/>
<point id="46" firstPoint="19" typeLine="none" mx="0.132292" secondPoint="20" length="8" name="P" lineColor="black" type="alongLine" my="0.264583"/>
<arc id="47" radius="@Epaule_sommet_extremite" angle2="200" center="41" angle1="185" type="simple" color="black"/>
<arc id="49" radius="@point_poitrine_extremite_epaule" angle2="120" center="46" angle1="110" type="simple" color="black"/>
<point id="50" firstArc="49" mx="-2.8677" secondArc="47" crossPoint="1" name="T" type="pointOfIntersectionArcs" my="-0.946952"/>
<line id="52" firstPoint="50" typeLine="dashDotDotLine" secondPoint="46" lineColor="darkRed"/>
<point id="53" firstPoint="23" typeLine="none" mx="0.132292" secondPoint="22" length="(@Largeur_carrure_DVT+1)/2" name="V" lineColor="black" type="alongLine" my="0.264583"/>
<line id="54" firstPoint="50" typeLine="dashDotDotLine" secondPoint="41" lineColor="darkRed"/>
<point id="55" mx="-1.99161" p1Line2="46" p1Line1="41" name="BB6" type="lineIntersect" my="-5.8904" p2Line1="50" p2Line2="10"/>
<point id="56" firstPoint="55" typeLine="none" mx="0.132292" secondPoint="50" length="2.5" name="U" lineColor="black" type="alongLine" my="0.264583"/>
<line id="57" firstPoint="56" typeLine="dashDotDotLine" secondPoint="46" lineColor="darkRed"/>
<point id="58" mx="-1.99161" p1Line2="56" p1Line1="23" name="V2" type="lineIntersect" my="-1.90266" p2Line1="53" p2Line2="46"/>
<line id="74" firstPoint="53" typeLine="hair" secondPoint="58" lineColor="black"/>
<line id="75" firstPoint="50" typeLine="hair" secondPoint="56" lineColor="black"/>
<line id="76" firstPoint="56" typeLine="hair" secondPoint="46" lineColor="black"/>
<line id="77" firstPoint="46" typeLine="hair" secondPoint="53" lineColor="black"/>
<line id="78" firstPoint="53" typeLine="hair" secondPoint="50" lineColor="black"/>
</calculation>
<modeling>
<point id="59" idObject="28" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<point id="60" idObject="26" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<spline id="61" idObject="40" inUse="true" type="modelingSpline"/>
<spline id="62" idObject="39" inUse="true" type="modelingSpline"/>
<point id="63" idObject="35" inUse="true" mx="-1.89213" type="modeling" my="0.404198"/>
<point id="65" idObject="1" inUse="true" mx="-1.96425" type="modeling" my="-1.2931"/>
<point id="66" idObject="2" inUse="true" mx="1.11306" type="modeling" my="-1.69695"/>
<point id="67" idObject="3" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<point id="68" idObject="11" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<point id="69" idObject="4" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<point id="70" idObject="15" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<point id="71" idObject="20" inUse="true" mx="-0.635928" type="modeling" my="0.146395"/>
<point id="72" idObject="22" inUse="true" mx="-1.59847" type="modeling" my="-1.12003"/>
<point id="79" idObject="50" inUse="true" mx="-2.8677" type="modeling" my="-0.946952"/>
<point id="80" idObject="56" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<point id="81" idObject="58" inUse="true" mx="-1.99161" type="modeling" my="-1.90266"/>
<point id="82" idObject="46" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
<point id="83" idObject="53" inUse="true" mx="0.132292" type="modeling" my="0.264583"/>
</modeling>
<details>
<detail id="64" width="1" mx="0" supplement="1" closed="0" name="Détail" my="0">
<node idObject="59" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
<node idObject="60" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
<node idObject="61" reverse="0" mx="0" nodeType="Contour" type="NodeSpline" my="0"/>
<node idObject="62" reverse="0" mx="0" nodeType="Contour" type="NodeSpline" my="0"/>
<node idObject="63" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
</detail>
<detail id="84" width="1" mx="0" supplement="1" closed="0" name="Détail" my="0">
<node idObject="79" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
<node idObject="80" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
<node idObject="81" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
<node idObject="82" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
<node idObject="83" mx="0" nodeType="Contour" type="NodePoint" my="0"/>
</detail>
</details>
</draw>
</pattern>

View File

@ -1,53 +0,0 @@
<?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>Gavaudan</family-name>
<given-name>Laure</given-name>
<birth-date>2003-10-08</birth-date>
<gender>female</gender>
<email/>
</personal>
<body-measurements>
<m value="156" description="hauteur totale" name="@Stature"/>
<m value="88" name="@Tour_poitrine"/>
<m value="0" name="@Tour_petites_hanches"/>
<m value="95" name="@Tour_grandes_hanches"/>
<m value="24" name="@H_sommet_épaule_ligne_poitrine"/>
<m value="20" name="@H_pointpoitrine_taille"/>
<m value="100" name="@H_taille_sol_DVT"/>
<m value="16" name="@Ecart_poitrine"/>
<m value="32" name="@Encolure_taille_DVT"/>
<m value="32" name="@Tour_cou"/>
<m value="14" name="@Largeur_encolure"/>
<m value="12" name="@Epaule_sommet_extremite"/>
<m value="24" name="@point_poitrine_extremite_epaule"/>
<m value="33" name="@Largeur_carrure_DVT"/>
<m value="35" name="@Largeur_carrure_dos"/>
<m value="21" name="@H_sommet_epaule_point_carrure_DVT"/>
<m value="44" name="@H_sommet_epaule_taille_DOS"/>
<m value="33.5" name="@Encolure_taille_DOS"/>
<m value="30" name="@Extremite_epaul_taille_DOS"/>
<m value="19" name="@Entournure_taille_COTE"/>
<m value="55" name="@L_bras"/>
<m value="30" name="@L_epaule_coude"/>
<m value="26" name="@Tour_Bras"/>
<m value="15.5" name="@Tour_poignet"/>
<m value="99" name="@H_taille_sol_COTE"/>
<m value="99.5" name="@H_taille_sol_DOS"/>
<m value="72" name="@H_entrejambe_sol"/>
<m value="28" name="@H_taille_montant"/>
<m value="39" name="@H_genou_sol"/>
<m value="58" name="@Tour_cuisse"/>
<m value="35.5" name="@Tour_genou"/>
<m value="35" name="@Tour_mollet"/>
<m value="22.5" name="@Tour_cheville"/>
<m value="11.5" name="@H_ligne_poitrine_ligne_carrure"/>
<m value="0" name="@M_1"/>
</body-measurements>
</vit>

View File

@ -611,6 +611,7 @@ void TMainWindow::changeEvent(QEvent *event)
InitDimensionsBaseValue();
InitDimensionControls();
InitDimesionShifts();
RetranslateTableHeaders();
}
else
{
@ -2874,36 +2875,7 @@ void TMainWindow::InitTable()
{
ui->tableWidget->setColumnHidden( ColumnFormula, true );// formula
const QList< MeasurementDimension_p > dimensions = m->Dimensions().values();
if (dimensions.size() > 0)
{
MeasurementDimension_p dimension = dimensions.at(0);
ui->tableWidget->horizontalHeaderItem(ColumnShiftA)->setText(
tr("%1 shift").arg(VAbstartMeasurementDimension::DimensionName(dimension->Type())));
}
if (dimensions.size() < 2)
{
ui->tableWidget->setColumnHidden( ColumnShiftB, true );
}
else
{
MeasurementDimension_p dimension = dimensions.at(1);
ui->tableWidget->horizontalHeaderItem(ColumnShiftB)->setText(
tr("%1 shift").arg(VAbstartMeasurementDimension::DimensionName(dimension->Type())));
}
if (dimensions.size() < 3)
{
ui->tableWidget->setColumnHidden( ColumnShiftC, true );
}
else
{
MeasurementDimension_p dimension = dimensions.at(2);
ui->tableWidget->horizontalHeaderItem(ColumnShiftC)->setText(
tr("%1 shift").arg(VAbstartMeasurementDimension::DimensionName(dimension->Type())));
}
RetranslateTableHeaders();
}
else
{
@ -4452,6 +4424,44 @@ void TMainWindow::InitMeasurementDimension()
ui->comboBoxDimension->blockSignals(false);
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::RetranslateTableHeaders()
{
if (mType == MeasurementsType::Multisize)
{
const QList< MeasurementDimension_p > dimensions = m->Dimensions().values();
if (not dimensions.isEmpty())
{
const MeasurementDimension_p& dimension = dimensions.at(0);
ui->tableWidget->horizontalHeaderItem(ColumnShiftA)->setText(
tr("%1 shift").arg(VAbstartMeasurementDimension::DimensionName(dimension->Type())));
}
if (dimensions.size() < 2)
{
ui->tableWidget->setColumnHidden( ColumnShiftB, true );
}
else
{
const MeasurementDimension_p &dimension = dimensions.at(1);
ui->tableWidget->horizontalHeaderItem(ColumnShiftB)->setText(
tr("%1 shift").arg(VAbstartMeasurementDimension::DimensionName(dimension->Type())));
}
if (dimensions.size() < 3)
{
ui->tableWidget->setColumnHidden( ColumnShiftC, true );
}
else
{
const MeasurementDimension_p &dimension = dimensions.at(2);
ui->tableWidget->horizontalHeaderItem(ColumnShiftC)->setText(
tr("%1 shift").arg(VAbstartMeasurementDimension::DimensionName(dimension->Type())));
}
}
}
//---------------------------------------------------------------------------------------------------------------------
template <class T>
void TMainWindow::HackWidget(T **widget)

View File

@ -190,6 +190,8 @@ private:
void InitGender(QComboBox *gender);
void InitMeasurementDimension();
void RetranslateTableHeaders();
void ShowNewMData(bool fresh);
void ShowUnits();
void ShowHeaderUnits(QTableWidget *table, int column, const QString &unit);

View File

@ -87,8 +87,11 @@ DialogHistory::~DialogHistory()
void DialogHistory::DialogAccepted()
{
QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0);
quint32 id = qvariant_cast<quint32>(item->data(Qt::UserRole));
emit ShowHistoryTool(id, false);
if (item != nullptr)
{
auto id = qvariant_cast<quint32>(item->data(Qt::UserRole));
emit ShowHistoryTool(id, false);
}
emit DialogClosed(QDialog::Accepted);
}

View File

@ -927,6 +927,8 @@ void DialogSaveLayout::ReadSettings()
{
ui->toolButtonLandscape->setChecked(true);
}
SelectFormat(static_cast<LayoutExportFormats>(settings->GetLayoutExportFormat()));
}
//---------------------------------------------------------------------------------------------------------------------
@ -969,5 +971,7 @@ void DialogSaveLayout::WriteSettings() const
{
settings->SetTiledPDFOrientation(PageOrientation::Landscape);
}
settings->SetLayoutExportFormat(static_cast<qint8>(Format()));
}

View File

@ -555,20 +555,7 @@ bool MainWindow::LoadMeasurements(const QString &path)
return false;
}
if (m->Type() == MeasurementsType::Multisize)
{
StoreMultisizeMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
StoreIndividualMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
StoreDimensions();
return true;
}
@ -623,20 +610,7 @@ bool MainWindow::UpdateMeasurements(const QString &path, qreal baseA, qreal base
return false;
}
if (m->Type() == MeasurementsType::Multisize)
{
StoreMultisizeMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
StoreIndividualMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
return true;
}
@ -1868,6 +1842,11 @@ void MainWindow::UnloadMeasurements()
VAbstractValApplication::VApp()->SetDimensionHip(0);
VAbstractValApplication::VApp()->SetDimensionWaist(0);
VAbstractValApplication::VApp()->SetDimensionHeightLabel(QString());
VAbstractValApplication::VApp()->SetDimensionSizeLabel(QString());
VAbstractValApplication::VApp()->SetDimensionHipLabel(QString());
VAbstractValApplication::VApp()->SetDimensionWaistLabel(QString());
if (oldType == MeasurementsType::Multisize)
{
m_currentDimensionA = 0;
@ -1999,6 +1978,7 @@ void MainWindow::SyncMeasurements()
statusBar()->showMessage(msg, 5000);
VWidgetPopup::PopupMessage(this, msg);
doc->LiteParseTree(Document::FullLiteParse);
StoreDimensions();
mChanges = false;
mChangesAsked = true;
measurementsSyncTimer->stop();
@ -2093,16 +2073,21 @@ void MainWindow::StoreMultisizeMDimensions()
if (dimensions.size() > index)
{
const MeasurementDimension_p& dimension = dimensions.at(index);
const DimesionLabels labels = dimension->Labels();
switch(dimension->Type())
{
case MeasurementDimension::X:
VAbstractValApplication::VApp()->SetDimensionHeight(currentBase);
VAbstractValApplication::VApp()->SetDimensionHeightLabel(
labels.value(currentBase, QString::number(currentBase)));
break;
case MeasurementDimension::Y:
{
const bool fc = m->IsFullCircumference();
VAbstractValApplication::VApp()->SetDimensionSize(fc ? currentBase*2 : currentBase);
VAbstractValApplication::VApp()->SetDimensionSizeLabel(
labels.value(currentBase, QString::number(fc ? currentBase*2 : currentBase)));
const bool circumference = dimension->IsCircumference();
VAbstractValApplication::VApp()
->SetDimensionSizeUnits(circumference ? m->MUnit() : Unit::LAST_UNIT_DO_NOT_USE);
@ -2112,12 +2097,16 @@ void MainWindow::StoreMultisizeMDimensions()
{
const bool fc = m->IsFullCircumference();
VAbstractValApplication::VApp()->SetDimensionWaist(fc ? currentBase*2 : currentBase);
VAbstractValApplication::VApp()->SetDimensionWaistLabel(
labels.value(currentBase, QString::number(fc ? currentBase*2 : currentBase)));
break;
}
case MeasurementDimension::Z:
{
const bool fc = m->IsFullCircumference();
VAbstractValApplication::VApp()->SetDimensionHip(fc ? currentBase*2 : currentBase);
VAbstractValApplication::VApp()->SetDimensionHipLabel(
labels.value(currentBase, QString::number(fc ? currentBase*2 : currentBase)));
break;
}
default:
@ -2140,19 +2129,24 @@ void MainWindow::StoreIndividualMDimensions()
{
const QString name = VAbstractApplication::VApp()->TrVars()->VarToUser(m->MeasurementForDimension(type));
const bool valid = not name.isEmpty() && measurements.contains(name);
const qreal value = valid ? *measurements.value(name)->GetValue() : 0;
switch(type)
{
case IMD::X:
VAbstractValApplication::VApp()->SetDimensionHeight(valid ? *measurements.value(name)->GetValue() : 0);
VAbstractValApplication::VApp()->SetDimensionHeight(value);
VAbstractValApplication::VApp()->SetDimensionHeightLabel(QString::number(value));
break;
case IMD::Y:
VAbstractValApplication::VApp()->SetDimensionSize(valid ? *measurements.value(name)->GetValue() : 0);
VAbstractValApplication::VApp()->SetDimensionSize(value);
VAbstractValApplication::VApp()->SetDimensionSizeLabel(QString::number(value));
break;
case IMD::W:
VAbstractValApplication::VApp()->SetDimensionWaist(valid ? *measurements.value(name)->GetValue() : 0);
VAbstractValApplication::VApp()->SetDimensionWaist(value);
VAbstractValApplication::VApp()->SetDimensionWaistLabel(QString::number(value));
break;
case IMD::Z:
VAbstractValApplication::VApp()->SetDimensionHip(valid ? *measurements.value(name)->GetValue() : 0);
VAbstractValApplication::VApp()->SetDimensionHip(value);
VAbstractValApplication::VApp()->SetDimensionHipLabel(QString::number(value));
break;
case IMD::N:
default:
@ -2231,6 +2225,25 @@ void MainWindow::SetDimensionBases()
SetBase(2, dimensionC, m_currentDimensionC);
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::StoreDimensions()
{
if (m->Type() == MeasurementsType::Multisize)
{
StoreMultisizeMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
StoreIndividualMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_OS_MAC)
void MainWindow::OpenAt(QAction *where)
@ -3569,6 +3582,7 @@ void MainWindow::Clear()
ui->actionLoadWatermark->setEnabled(false);
ui->actionRemoveWatermark->setEnabled(false);
ui->actionEditCurrentWatermark->setEnabled(false);
PatternChangesWereSaved(true);
}
//---------------------------------------------------------------------------------------------------------------------
@ -4075,6 +4089,7 @@ void MainWindow::GradationChanged()
m_currentDimensionA, m_currentDimensionB, m_currentDimensionC))
{
doc->LiteParseTree(Document::FullLiteParse);
StoreDimensions();
emit sceneDetails->DimensionsChanged();
}
else

View File

@ -417,6 +417,8 @@ private:
QVector<qreal> DimensionRestrictedValues(int index, const MeasurementDimension_p &dimension);
void SetDimensionBases();
void StoreDimensions();
};
#endif // MAINWINDOW_H

View File

@ -690,6 +690,13 @@ void VPattern::customEvent(QEvent *event)
}
}
//---------------------------------------------------------------------------------------------------------------------
void VPattern::Clear()
{
m_parsing = true;
VAbstractPattern::Clear();
}
//---------------------------------------------------------------------------------------------------------------------
VNodeDetail VPattern::ParseDetailNode(const QDomElement &domElement) const
{
@ -1368,7 +1375,7 @@ void VPattern::ParseLineElement(VMainGraphicsScene *scene, const QDomElement &do
try
{
VToolLineInitData initData;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.firstPoint = GetParametrUInt(domElement, AttrFirstPoint, NULL_ID_STR);
initData.secondPoint = GetParametrUInt(domElement, AttrSecondPoint, NULL_ID_STR);
initData.typeLine = GetParametrString(domElement, AttrTypeLine, TypeLineLine);
@ -2491,7 +2498,7 @@ void VPattern::ParseToolTrueDarts(VMainGraphicsScene *scene, const QDomElement &
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.p1id = GetParametrUInt(domElement, AttrPoint1, NULL_ID_STR);
initData.p2id = GetParametrUInt(domElement, AttrPoint2, NULL_ID_STR);
@ -2542,7 +2549,7 @@ void VPattern::ParseOldToolSpline(VMainGraphicsScene *scene, QDomElement &domEle
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
const quint32 point1 = GetParametrUInt(domElement, AttrPoint1, NULL_ID_STR);
const quint32 point4 = GetParametrUInt(domElement, AttrPoint4, NULL_ID_STR);
const qreal angle1 = GetParametrDouble(domElement, AttrAngle1, QStringLiteral("270.0"));
@ -2591,7 +2598,7 @@ void VPattern::ParseToolSpline(VMainGraphicsScene *scene, QDomElement &domElemen
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.point1 = GetParametrUInt(domElement, AttrPoint1, NULL_ID_STR);
initData.point4 = GetParametrUInt(domElement, AttrPoint4, NULL_ID_STR);
@ -2663,7 +2670,7 @@ void VPattern::ParseToolCubicBezier(VMainGraphicsScene *scene, const QDomElement
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
const quint32 point1 = GetParametrUInt(domElement, AttrPoint1, NULL_ID_STR);
const quint32 point2 = GetParametrUInt(domElement, AttrPoint2, NULL_ID_STR);
@ -2717,7 +2724,7 @@ void VPattern::ParseOldToolSplinePath(VMainGraphicsScene *scene, QDomElement &do
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
const qreal kCurve = GetParametrDouble(domElement, AttrKCurve, QStringLiteral("1.0"));
const QString color = GetParametrString(domElement, AttrColor, ColorBlack);
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
@ -2789,7 +2796,7 @@ void VPattern::ParseToolSplinePath(VMainGraphicsScene *scene, const QDomElement
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.color = GetParametrString(domElement, AttrColor, ColorBlack);
initData.penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
initData.duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
@ -2883,7 +2890,7 @@ void VPattern::ParseToolCubicBezierPath(VMainGraphicsScene *scene, const QDomEle
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
const QString color = GetParametrString(domElement, AttrColor, ColorBlack);
const QString penStyle = GetParametrString(domElement, AttrPenStyle, TypeLineLine);
const quint32 duplicate = GetParametrUInt(domElement, AttrDuplicate, QChar('0'));
@ -3043,7 +3050,7 @@ void VPattern::ParseToolArc(VMainGraphicsScene *scene, QDomElement &domElement,
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.center = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
initData.radius = GetParametrString(domElement, AttrRadius, QStringLiteral("10"));
const QString r = initData.radius;//need for saving fixed formula;
@ -3096,7 +3103,7 @@ void VPattern::ParseToolEllipticalArc(VMainGraphicsScene *scene, QDomElement &do
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.center = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
initData.radius1 = GetParametrString(domElement, AttrRadius1, QStringLiteral("10"));
initData.radius2 = GetParametrString(domElement, AttrRadius2, QStringLiteral("10"));
@ -3234,7 +3241,7 @@ void VPattern::ParseToolArcWithLength(VMainGraphicsScene *scene, QDomElement &do
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.center = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
initData.radius = GetParametrString(domElement, AttrRadius, QStringLiteral("10"));
const QString r = initData.radius;//need for saving fixed formula;
@ -3287,7 +3294,7 @@ void VPattern::ParseToolRotation(VMainGraphicsScene *scene, QDomElement &domElem
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.origin = GetParametrUInt(domElement, AttrCenter, NULL_ID_STR);
initData.angle = GetParametrString(domElement, AttrAngle, QStringLiteral("10"));
const QString a = initData.angle;//need for saving fixed formula;
@ -3397,7 +3404,7 @@ void VPattern::ParseToolMove(VMainGraphicsScene *scene, QDomElement &domElement,
initData.parse = parse;
initData.typeCreation = Source::FromFile;
ToolsCommonAttributes(domElement, initData.id);
DrawToolsCommonAttributes(domElement, initData.id, initData.notes);
initData.formulaAngle = GetParametrString(domElement, AttrAngle, QChar('0'));
const QString a = initData.formulaAngle;//need for saving fixed formula;
initData.formulaRotationAngle = GetParametrString(domElement, AttrRotationAngle, QChar('0'));

View File

@ -98,6 +98,7 @@ public:
virtual QString GenerateLabel(const LabelType &type, const QString &reservedName = QString())const override;
virtual QString GenerateSuffix() const override;
virtual void Clear() override;
bool IsReadOnly() const;
void SetReadOnly(bool rOnly);

View File

@ -22,7 +22,7 @@
#ifndef QMUQPARSERBASE_H
#define QMUQPARSERBASE_H
#include <limits.h>
#include <climits>
#include <qcompilerdetection.h>
#include <QChar>
#include <QMap>

View File

@ -714,7 +714,7 @@ void VDxfEngine::ExportAAMAOutline(dx_ifaceBlock *detailBlock, const VLayoutPiec
//---------------------------------------------------------------------------------------------------------------------
void VDxfEngine::ExportAAMADraw(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
{
if (not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn())
if (detail.IsSeamAllowance() && not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn())
{
if (DRW_Entity *e = AAMAPolygon(detail.GetMappedContourPoints(), QChar('8'), true))
{
@ -927,7 +927,7 @@ void VDxfEngine::ExportASTMPieceBoundary(dx_ifaceBlock *detailBlock, const VLayo
//---------------------------------------------------------------------------------------------------------------------
void VDxfEngine::ExportASTMSewLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
{
if (not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn())
if (detail.IsSeamAllowance() && not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn())
{
QVector<QPointF> sewLine = detail.GetMappedContourPoints();

View File

@ -290,7 +290,7 @@ QVector<QPointF> VEllipticalArc::GetPoints() const
QLineF endLine = startLine;
startLine.setAngle(VAbstractArc::GetStartAngle());
endLine.setAngle(VAbstractArc::GetEndAngle());
endLine.setAngle(RealEndAngle());
qreal sweepAngle = startLine.angleTo(endLine);
if (qFuzzyIsNull(sweepAngle))
@ -508,6 +508,26 @@ QPointF VEllipticalArc::GetP(qreal angle) const
return line2.p2() + VAbstractArc::GetCenter().toQPointF();
}
//---------------------------------------------------------------------------------------------------------------------
qreal VEllipticalArc::RealEndAngle() const
{
qreal endAngle = VEllipticalArc::OptimizeAngle(VAbstractArc::GetEndAngle());
if (qFuzzyIsNull(endAngle) ||
VFuzzyComparePossibleNulls(endAngle, 90) ||
VFuzzyComparePossibleNulls(endAngle, 180) ||
VFuzzyComparePossibleNulls(endAngle, 270) ||
VFuzzyComparePossibleNulls(endAngle, 360))
{
return endAngle;
}
endAngle = qRadiansToDegrees(qAtan2(d->radius1 * qSin(qDegreesToRadians(endAngle)),
d->radius2 * qCos(qDegreesToRadians(endAngle))));
return endAngle;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief GetFormulaRadius1 return formula for major radius.

View File

@ -112,6 +112,8 @@ private:
qreal MaxLength() const;
QPointF GetP(qreal angle) const;
qreal RealEndAngle() const;
};
Q_DECLARE_METATYPE(VEllipticalArc)

View File

@ -97,7 +97,7 @@ private:
};
Q_DECLARE_METATYPE(VLayoutPassmark)
constexpr qreal accuracyPointOnLine = (0.126/*mm*/ / 25.4) * PrintDPI;
constexpr qreal accuracyPointOnLine = (0.138/*mm*/ / 25.4) * PrintDPI;
Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2,
qreal accuracy = accuracyPointOnLine);

View File

@ -28,7 +28,6 @@
#include "testpath.h"
#include <QVector>
#include <QJsonArray>
#include <QTemporaryFile>
#include <QJsonObject>
#include <QTextStream>
@ -40,7 +39,7 @@
//---------------------------------------------------------------------------------------------------------------------
#if !defined(V_NO_ASSERT)
// Use for writing tests
QJsonObject PointToJson(const QPointF &point)
auto PointToJson(const QPointF &point) -> QJsonObject
{
QJsonObject pointObject
{
@ -62,15 +61,4 @@ void VectorToJson(const QVector<QPointF> &points, QJsonObject &json)
json[QLatin1String("vector")] = pointsArray;
}
//---------------------------------------------------------------------------------------------------------------------
void VectorToJson(const QVector<VSAPoint> &points, QJsonObject &json)
{
QJsonArray pointsArray;
for (auto point: points)
{
pointsArray.append(point.toJson());
}
json[QLatin1String("vector")] = pointsArray;
}
#endif // !defined(V_NO_ASSERT)

View File

@ -30,20 +30,23 @@
#include <QDir>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QString>
#include <QTemporaryFile>
#include <QTextStream>
class QPointF;
class QJsonObject;
template <class T> class QVector;
class VSAPoint;
class VRawSAPoint;
#if !defined(V_NO_ASSERT)
QJsonObject PointToJson(const QPointF &point);
void VectorToJson(const QVector<QPointF> &points, QJsonObject &json);
void VectorToJson(const QVector<VSAPoint> &points, QJsonObject &json);
template <class T>
void VectorToJson(const QVector<T> &points, QJsonObject &json);
//---------------------------------------------------------------------------------------------------------------------
template <class T>
@ -78,6 +81,17 @@ void DumpVector(const QVector<T> &points, const QString &templateName=QString())
out.flush();
}
}
#endif // !defined(V_NO_ASSERT)
//---------------------------------------------------------------------------------------------------------------------
template <class T>
void VectorToJson(const QVector<T> &points, QJsonObject &json)
{
QJsonArray pointsArray;
for (auto point: points)
{
pointsArray.append(point.toJson());
}
json[QLatin1String("vector")] = pointsArray;
}
#endif // !defined(V_NO_ASSERT)
#endif // TESTPATH_H

View File

@ -596,39 +596,41 @@ QVector<VRawSAPoint> AngleBySecondRightAngle(QVector<VRawSAPoint> points, QPoint
{
return AngleByLength(points, p1, p2, p3, bigLine1, sp2, bigLine2, p, width, needRollback);
}
// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points
bool success = false;
const int countBefore = points.size();
QVector<VRawSAPoint> temp = points;
temp.append(bigLine1.p2());
temp = VAbstractPiece::RollbackSeamAllowance(temp, edge, &success);
if (success)
{
points = temp;
px = points.last();
}
if (countBefore > 0)
{
QLineF seam(px, p3);
seam.setAngle(seam.angle()+90);
seam.setLength(p.GetSAAfter(width));
points.append(seam.p2());
}
else
{
// Because artificial loop can lead to wrong clipping we must rollback current seam allowance points
bool success = false;
const int countBefore = points.size();
QVector<VRawSAPoint> temp = points;
temp.append(bigLine1.p2());
temp = VAbstractPiece::RollbackSeamAllowance(temp, edge, &success);
if (success)
if (needRollback != nullptr)
{
points = temp;
*needRollback = not success;
}
if (success)
{
px = points.last();
}
if (countBefore > 0)
else if (IsSameDirection(bigLine1.p1(), bigLine1.p2(), px))
{
points.append(px);
QLineF seam(px, p3);
seam.setAngle(seam.angle()+90);
seam.setLength(p.GetSAAfter(width));
points.append(seam.p2());
}
else
{
if (needRollback != nullptr)
{
*needRollback = not success;
}
}
}
}
@ -895,7 +897,7 @@ QVector<QPointF> CleanLoopArtifacts(const QVector<VRawSAPoint> &points)
{
QVector<QPointF> cleaned;
cleaned.reserve(points.size());
for (auto &point : points)
for (const auto &point : points)
{
if (not point.LoopPoint())
{
@ -1211,72 +1213,50 @@ QVector<QPointF> VAbstractPiece::CheckLoops(const QVector<QPointF> &points)
* @param points vector of points of equidistant.
* @return vector of points of equidistant.
*/
QVector<QPointF> VAbstractPiece::CheckLoops(const QVector<VRawSAPoint> &points)
auto VAbstractPiece::CheckLoops(const QVector<VRawSAPoint> &points) -> QVector<QPointF>
{
// DumpVector(points); // Uncomment for dumping test data
// DumpVector(points, QStringLiteral("input.json.XXXXXX")); // Uncomment for dumping test data
int count = points.size();
/*If we got less than 4 points no need seek loops.*/
if (count < 4)
if (points.size() < 4)
{
return CleanLoopArtifacts(points);
}
const bool pathClosed = (points.first() == points.last());
bool loopFound = false;
QVector<VRawSAPoint> ekvPoints;
ekvPoints.reserve(points.size());
QVector<qint32> uniqueVertices;
uniqueVertices.reserve(4);
qint32 i, j, jNext = 0;
for (i = 0; i < count; ++i)
auto CheckLoop = [&loopFound](const QVector<VRawSAPoint> &points)
{
/*Last three points no need to check.*/
/*Triangle can not contain a loop*/
if (i > count-3)
loopFound = false;
const bool pathClosed = (points.first() == points.last());
QVector<VRawSAPoint> ekvPoints;
ekvPoints.reserve(points.size());
qint32 i;
for (i = 0; i < points.size(); ++i)
{
ekvPoints.append(points.at(i));
continue;
}
enum LoopIntersectType { NoIntersection, BoundedIntersection, ParallelIntersection };
QPointF crosPoint;
LoopIntersectType status = NoIntersection;
const QLineF line1(points.at(i), points.at(i+1));
// Because a path can contains several loops we will seek the last and only then remove the loop(s)
// That's why we parse from the end
for (j = count-1; j >= i+2; --j)
{
j == count-1 ? jNext = 0 : jNext = j+1;
QLineF line2(points.at(j), points.at(jNext));
if(qFuzzyIsNull(line2.length()))
{//If a path is closed the edge (count-1;0) length will be 0
/*Last three points no need to check.*/
/*Triangle can not contain a loop*/
if (loopFound || i > points.size()-4)
{
ekvPoints.append(points.at(i));
continue;
}
uniqueVertices.clear();
enum LoopIntersectType { NoIntersection, BoundedIntersection, ParallelIntersection };
auto AddUniqueIndex = [&uniqueVertices](qint32 i)
QPointF crosPoint;
LoopIntersectType status = NoIntersection;
const QLineF line1(points.at(i), points.at(i+1));
const int limit = pathClosed && i == 0 ? 2 : 1;
qint32 j;
for (j = i+2; j < points.size()-limit; ++j)
{
if (not uniqueVertices.contains(i))
{
uniqueVertices.append(i);
}
};
QLineF line2(points.at(j), points.at(j+1));
AddUniqueIndex(i);
AddUniqueIndex(i+1);
AddUniqueIndex(j);
// For closed path last point is equal to first. Using index of the first.
pathClosed && jNext == count-1 ? AddUniqueIndex(0) : AddUniqueIndex(jNext);
if (uniqueVertices.size() == 4)
{// Lines are not neighbors
const QLineF::IntersectType intersect = Intersects(line1, line2, &crosPoint);
if (intersect == QLineF::NoIntersection)
{ // According to the documentation QLineF::NoIntersection indicates that the lines do not intersect;
@ -1294,32 +1274,48 @@ QVector<QPointF> VAbstractPiece::CheckLoops(const QVector<VRawSAPoint> &points)
break;
}
}
status = NoIntersection;
}
switch (status)
{
case ParallelIntersection:
/*We have found a loop.*/
ekvPoints.append(points.at(i));
ekvPoints.append(points.at(jNext));
jNext > j ? i = jNext : i = j; // Skip a loop
break;
case BoundedIntersection:
ekvPoints.append(points.at(i));
ekvPoints.append(crosPoint);
i = j;
break;
case NoIntersection:
/*We have not found loop.*/
ekvPoints.append(points.at(i));
break;
default:
break;
switch (status)
{
case ParallelIntersection:
/*We have found a loop.*/
ekvPoints.append(points.at(i));
ekvPoints.append(points.at(j+1));
i = j+1; // Skip a loop
loopFound = true;
break;
case BoundedIntersection:
ekvPoints.append(points.at(i));
ekvPoints.append(crosPoint);
i = j;
loopFound = true;
break;
case NoIntersection:
/*We have not found loop.*/
ekvPoints.append(points.at(i));
break;
default:
break;
}
}
}
return ekvPoints;
};
QVector<VRawSAPoint> ekvPoints = points;
qint32 i;
const int maxLoops = 10000; // limit number of loops to be removed
for (i = 0; i < maxLoops; ++i)
{
ekvPoints = CheckLoop(ekvPoints);
if (not loopFound)
{
break;
}
}
const QVector<QPointF> cleaned = CleanLoopArtifacts(ekvPoints);
// DumpVector(cleaned); // Uncomment for dumping test data
// DumpVector(cleaned, QStringLiteral("output.json.XXXXXX")); // Uncomment for dumping test data
return cleaned;
}
@ -1945,12 +1941,15 @@ QPainterPath VAbstractPiece::PainterPath(const QVector<QPointF> &points)
QPainterPath path;
path.setFillRule(Qt::WindingFill);
path.moveTo(points.at(0));
for (qint32 i = 1; i < points.count(); ++i)
if (not points.isEmpty())
{
path.lineTo(points.at(i));
path.moveTo(points.at(0));
for (qint32 i = 1; i < points.count(); ++i)
{
path.lineTo(points.at(i));
}
path.lineTo(points.at(0));
}
path.lineTo(points.at(0));
return path;
}

View File

@ -250,14 +250,15 @@ QVector<T> VAbstractPiece::RemoveDublicates(const QVector<T> &points, bool remov
{
if (VFuzzyComparePoints(p.at(i), p.at(i+1)))
{
if (not removeFirstAndLast && (i == p.size()-1))
if (not removeFirstAndLast && (i == p.size()-2))
{
continue;
p.erase(p.begin() + i);
}
else
{
p.erase(p.begin() + i + 1);
}
p.erase(p.begin() + i + 1);
--i;
continue;
}
}

View File

@ -215,12 +215,34 @@ QMap<QString, QString> PreparePlaceholders(const VAbstractPattern *doc, const VC
placeholders.insert(pl_pFileName, QFileInfo(VAbstractValApplication::VApp()->GetPatternPath()).baseName());
placeholders.insert(pl_mFileName, QFileInfo(doc->MPath()).baseName());
placeholders.insert(pl_height, QString::number(VAbstractValApplication::VApp()->GetDimensionHeight()));
placeholders.insert(pl_size, QString::number(VAbstractValApplication::VApp()->GetDimensionSize()));
placeholders.insert(pl_hip, QString::number(VAbstractValApplication::VApp()->GetDimensionHip()));
placeholders.insert(pl_waist, QString::number(VAbstractValApplication::VApp()->GetDimensionWaist()));
QString heightValue = QString::number(VAbstractValApplication::VApp()->GetDimensionHeight());
placeholders.insert(pl_height, heightValue);
QString sizeValue = QString::number(VAbstractValApplication::VApp()->GetDimensionSize());
placeholders.insert(pl_size, sizeValue);
QString hipValue = QString::number(VAbstractValApplication::VApp()->GetDimensionHip());
placeholders.insert(pl_hip, hipValue);
QString waistValue = QString::number(VAbstractValApplication::VApp()->GetDimensionWaist());
placeholders.insert(pl_waist, waistValue);
{
QString label = VAbstractValApplication::VApp()->GetDimensionHeightLabel();
placeholders.insert(pl_heightLabel, not label.isEmpty() ? label : heightValue);
label = VAbstractValApplication::VApp()->GetDimensionSizeLabel();
placeholders.insert(pl_sizeLabel, not label.isEmpty() ? label : sizeValue);
label = VAbstractValApplication::VApp()->GetDimensionHipLabel();
placeholders.insert(pl_hipLabel, not label.isEmpty() ? label : hipValue);
label = VAbstractValApplication::VApp()->GetDimensionWaistLabel();
placeholders.insert(pl_waistLabel, not label.isEmpty() ? label : waistValue);
}
placeholders.insert(pl_mExt, VAbstractValApplication::VApp()->GetMeasurementsType() == MeasurementsType::Multisize
? QString("vst") : QString("vit"));
? QStringLiteral("vst") : QStringLiteral("vit"));
const QMap<int, QString> materials = doc->GetPatternMaterials();
for (int i = 0; i < userMaterialPlaceholdersQuantity; ++i)
@ -241,7 +263,6 @@ QMap<QString, QString> PreparePlaceholders(const VAbstractPattern *doc, const VC
auto i = measurements.constBegin();
while (i != measurements.constEnd())
{
QString description = i.value()->GetGuiText().isEmpty() ? i.key() : i.value()->GetGuiText();
placeholders.insert(pl_measurement + i.key(), QString::number(*i.value()->GetValue()));
++i;
}

View File

@ -138,6 +138,10 @@ const QString pl_size = QStringLiteral("size");
const QString pl_height = QStringLiteral("height");
const QString pl_hip = QStringLiteral("hip");
const QString pl_waist = QStringLiteral("waist");
const QString pl_sizeLabel = QStringLiteral("sizeLabel");
const QString pl_heightLabel = QStringLiteral("heightLabel");
const QString pl_hipLabel = QStringLiteral("hipLabel");
const QString pl_waistLabel = QStringLiteral("waistLabel");
const QString pl_date = QStringLiteral("date");
const QString pl_time = QStringLiteral("time");
const QString pl_birthDate = QStringLiteral("birthDate");

View File

@ -406,6 +406,10 @@ extern const QString pl_size;
extern const QString pl_height;
extern const QString pl_hip;
extern const QString pl_waist;
extern const QString pl_sizeLabel;
extern const QString pl_heightLabel;
extern const QString pl_hipLabel;
extern const QString pl_waistLabel;
extern const QString pl_date;
extern const QString pl_time;
extern const QString pl_birthDate;

View File

@ -42,7 +42,7 @@
extern const int MAJOR_VERSION = 0;
extern const int MINOR_VERSION = 7;
extern const int DEBUG_VERSION = 44;
extern const int DEBUG_VERSION = 46;
extern const QString APP_VERSION_STR(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION)
.arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE));

View File

@ -49,8 +49,8 @@ extern const QString APP_VERSION_STR;
// Change version number in projectversion.cpp too.
// Synchronize valentina.nsi
#define VER_FILEVERSION 0,7,44
#define VER_FILEVERSION_STR "0.7.44\0"
#define VER_FILEVERSION 0,7,46
#define VER_FILEVERSION_STR "0.7.46\0"
#define V_PRERELEASE // Mark prerelease builds

View File

@ -108,6 +108,18 @@ public:
qreal GetDimensionWaist() const;
void SetDimensionWaist(qreal dimensionWaist);
QString GetDimensionHeightLabel() const;
void SetDimensionHeightLabel(const QString &label);
QString GetDimensionSizeLabel() const;
void SetDimensionSizeLabel(const QString &label);
QString GetDimensionHipLabel() const;
void SetDimensionHipLabel(const QString &label);
QString GetDimensionWaistLabel() const;
void SetDimensionWaistLabel(const QString &label);
virtual void OpenSettings() override;
VValentinaSettings *ValentinaSettings();
@ -132,6 +144,11 @@ protected:
qreal m_dimensionHip{0};
qreal m_dimensionWaist{0};
QString m_dimensionHeightLabel{};
QString m_dimensionSizeLabel{};
QString m_dimensionHipLabel{};
QString m_dimensionWaistLabel{};
Unit m_dimensionSizeUnits{Unit::Cm};
/**
@ -363,6 +380,54 @@ inline void VAbstractValApplication::SetDimensionWaist(qreal dimensionWaist)
m_dimensionWaist = dimensionWaist;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VAbstractValApplication::GetDimensionHeightLabel() const
{
return m_dimensionHeightLabel;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractValApplication::SetDimensionHeightLabel(const QString &label)
{
m_dimensionHeightLabel = label;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VAbstractValApplication::GetDimensionSizeLabel() const
{
return m_dimensionSizeLabel;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractValApplication::SetDimensionSizeLabel(const QString &label)
{
m_dimensionSizeLabel = label;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VAbstractValApplication::GetDimensionHipLabel() const
{
return m_dimensionHipLabel;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractValApplication::SetDimensionHipLabel(const QString &label)
{
m_dimensionHipLabel = label;
}
//---------------------------------------------------------------------------------------------------------------------
inline QString VAbstractValApplication::GetDimensionWaistLabel() const
{
return m_dimensionWaistLabel;
}
//---------------------------------------------------------------------------------------------------------------------
inline void VAbstractValApplication::SetDimensionWaistLabel(const QString &label)
{
m_dimensionWaistLabel = label;
}
//---------------------------------------------------------------------------------------------------------------------
inline QDate VAbstractValApplication::GetCustomerBirthDate() const
{

View File

@ -81,6 +81,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingMultiplier, (QLatin1String("layo
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTextAsPaths, (QLatin1String("layout/textAsPaths")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingNestingTime, (QLatin1String("layout/time")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingEfficiencyCoefficient, (QLatin1String("layout/efficiencyCoefficient")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutExportFormat, (QLatin1String("layout/exportFormat")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTiledPDFPaperHeight, (QLatin1String("tiledPDF/paperHeight")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTiledPDFPaperWidth, (QLatin1String("tiledPDF/paperWidth")))
@ -640,3 +641,15 @@ void VValentinaSettings::SetToolPanelScaling(const bool &value)
{
setValue(*settingToolPanelScaling, value);
}
//---------------------------------------------------------------------------------------------------------------------
auto VValentinaSettings::GetLayoutExportFormat() const -> qint8
{
return qvariant_cast<qint8>(value(*settingLayoutExportFormat, 0));
}
//---------------------------------------------------------------------------------------------------------------------
void VValentinaSettings::SetLayoutExportFormat(qint8 format)
{
setValue(*settingLayoutExportFormat, format);
}

View File

@ -167,6 +167,9 @@ public:
bool GetToolPanelScaling() const;
void SetToolPanelScaling(const bool &value);
auto GetLayoutExportFormat() const -> qint8;
void SetLayoutExportFormat(qint8 format);
private:
Q_DISABLE_COPY(VValentinaSettings)

View File

@ -28,7 +28,7 @@
#include "vcontainer.h"
#include <limits.h>
#include <climits>
#include <QVector>
#include <QtDebug>
#include <QUuid>

View File

@ -56,6 +56,7 @@
#include "../vgeometry/vspline.h"
#include "../vgeometry/vsplinepath.h"
#include "../vlayout/vabstractpiece.h"
#include "../vlayout/vrawsapoint.h"
#include "../vpatterndb/vcontainer.h"
#include "../vpatterndb/vpiece.h"
#include "../vpatterndb/vpiecenode.h"
@ -68,7 +69,7 @@ AbstractTest::AbstractTest(QObject *parent) :
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::VectorFromJson(const QString &json, QVector<QPointF>& vector)
void AbstractTest::VectorFromJson(const QString &json, QVector<QPointF>& vector) const
{
QByteArray saveData;
PrepareDocument(json, saveData);
@ -102,7 +103,7 @@ void AbstractTest::VectorFromJson(const QString &json, QVector<QPointF>& vector)
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::VectorFromJson(const QString &json, QVector<VSAPoint> &vector)
void AbstractTest::VectorFromJson(const QString &json, QVector<VSAPoint> &vector) const
{
QByteArray saveData;
PrepareDocument(json, saveData);
@ -133,6 +134,38 @@ void AbstractTest::VectorFromJson(const QString &json, QVector<VSAPoint> &vector
}
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::VectorFromJson(const QString &json, QVector<VRawSAPoint> &vector) const
{
QByteArray saveData;
PrepareDocument(json, saveData);
QJsonDocument loadDoc(QJsonDocument::fromJson(saveData));
const QString vectorKey = QStringLiteral("vector");
QJsonObject vectorObject = loadDoc.object();
TestRoot(vectorObject, vectorKey, json);
QJsonArray vectorArray = vectorObject[vectorKey].toArray();
for (int i = 0; i < vectorArray.size(); ++i)
{
QJsonObject pointObject = vectorArray[i].toObject();
QString type;
AbstractTest::ReadStringValue(pointObject, QStringLiteral("type"), type);
if (type != QLatin1String("VRawSAPoint"))
{
const QString error = QStringLiteral("Invalid json file '%1'. Unexpected class '%2'.").arg(json, type);
QFAIL(qUtf8Printable(error));
}
VRawSAPoint point;
RawSAPointFromJson(pointObject, point);
vector.append(point);
}
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::PieceFromJson(const QString &json, VPiece &piece, QSharedPointer<VContainer> &data)
{
@ -274,25 +307,22 @@ void AbstractTest::Comparison(const QVector<QPointF> &ekv, const QVector<QPointF
{
// Begin comparison
QCOMPARE(ekv.size(), ekvOrig.size());// First check if sizes equal
const qreal testAccuracy = (1.0/*mm*/ / 25.4) * PrintDPI;
for (int i=0; i < ekv.size(); i++)
{
const QPointF p1 = ekv.at(i);
const QPointF p2 = ekvOrig.at(i);
const QString msg = QStringLiteral("Index: %1. Got '%2;%3', Expected '%4;%5'.")
.arg(i).arg(p1.x()).arg(p1.y()).arg(p2.x()).arg(p2.y());
// Check each point. Don't use comparison float values
QVERIFY2(VFuzzyComparePoints(p1, p2), qUtf8Printable(msg));
Comparison(ekv.at(i), ekvOrig.at(i), testAccuracy);
}
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::Comparison(const QPointF &result, const QPointF &expected) const
void AbstractTest::Comparison(const QPointF &result, const QPointF &expected, qreal testAccuracy) const
{
const QString msg = QStringLiteral("Got '%2;%3', Expected '%4;%5'.")
.arg(result.x()).arg(result.y()).arg(expected.x()).arg(expected.y());
const QString msg = QStringLiteral("Actual '%2;%3', Expected '%4;%5'. Distance between points %6 mm.")
.arg(result.x()).arg(result.y()).arg(expected.x()).arg(expected.y())
.arg(UnitConvertor(QLineF(result, expected).length(), Unit::Px, Unit::Mm));
// Check each point. Don't use comparison float values
QVERIFY2(VFuzzyComparePoints(result, expected), qUtf8Printable(msg));
QVERIFY2(VFuzzyComparePoints(result, expected, testAccuracy), qUtf8Printable(msg));
}
@ -503,7 +533,7 @@ void AbstractTest::PrepareDocument(const QString &json, QByteArray &data) const
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::TestRoot(const QJsonObject &root, const QString &attribute, const QString &file)
void AbstractTest::TestRoot(const QJsonObject &root, const QString &attribute, const QString &file) const
{
if (not root.contains(attribute))
{
@ -514,7 +544,7 @@ void AbstractTest::TestRoot(const QJsonObject &root, const QString &attribute, c
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::ReadStringValue(const QJsonObject &itemObject, const QString &attribute, QString &value,
const QString &defaultValue)
const QString &defaultValue) const
{
if (itemObject.contains(attribute))
{
@ -545,7 +575,7 @@ void AbstractTest::ReadStringValue(const QJsonObject &itemObject, const QString
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::ReadBooleanValue(const QJsonObject &itemObject, const QString &attribute, bool &value,
const QString &defaultValue)
const QString &defaultValue) const
{
if (itemObject.contains(attribute))
{
@ -672,7 +702,7 @@ void AbstractTest::ReadPieceNodeValue(const QJsonObject &itemObject, VPieceNode
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::QPointFromJson(const QJsonObject &itemObject, QPointF &point)
void AbstractTest::QPointFromJson(const QJsonObject &itemObject, QPointF &point) const
{
qreal x = 0;
AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("x"), x);
@ -686,7 +716,7 @@ void AbstractTest::QPointFromJson(const QJsonObject &itemObject, QPointF &point)
//---------------------------------------------------------------------------------------------------------------------
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type*>
void AbstractTest::ReadDoubleValue(const QJsonObject &itemObject, const QString &attribute, T &value,
const QString &defaultValue)
const QString &defaultValue) const
{
if (itemObject.contains(attribute))
{
@ -725,7 +755,7 @@ void AbstractTest::ReadDoubleValue(const QJsonObject &itemObject, const QString
//---------------------------------------------------------------------------------------------------------------------
template<typename T, typename std::enable_if<std::is_enum<T>::value>::type*>
void AbstractTest::ReadDoubleValue(const QJsonObject &itemObject, const QString &attribute, T &value,
const QString &defaultValue)
const QString &defaultValue) const
{
if (itemObject.contains(attribute))
{
@ -764,7 +794,7 @@ void AbstractTest::ReadDoubleValue(const QJsonObject &itemObject, const QString
//---------------------------------------------------------------------------------------------------------------------
template<typename T, typename std::enable_if<std::is_integral<T>::value>::type*>
void AbstractTest::ReadDoubleValue(const QJsonObject &itemObject, const QString &attribute, T &value,
const QString &defaultValue)
const QString &defaultValue) const
{
if (itemObject.contains(attribute))
{
@ -838,7 +868,7 @@ void AbstractTest::QLineFromJson(const QJsonObject &itemObject, QLineF &line)
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::SAPointFromJson(const QJsonObject &itemObject, VSAPoint &point)
void AbstractTest::SAPointFromJson(const QJsonObject &itemObject, VSAPoint &point) const
{
qreal x = 0;
AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("x"), x);
@ -862,6 +892,22 @@ void AbstractTest::SAPointFromJson(const QJsonObject &itemObject, VSAPoint &poin
point.SetAngleType(angleType);
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::RawSAPointFromJson(const QJsonObject &itemObject, VRawSAPoint &point) const
{
qreal x = 0;
AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("x"), x);
point.setX(x);
qreal y = 0;
AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("y"), y);
point.setY(y);
bool loopPoint;
AbstractTest::ReadBooleanValue(itemObject, QStringLiteral("loopPoint"), loopPoint, QStringLiteral("0"));
point.SetLoopPoint(loopPoint);
}
//---------------------------------------------------------------------------------------------------------------------
void AbstractTest::SplineFromJson(const QJsonObject &itemObject, QSharedPointer<VContainer> &data)
{

View File

@ -61,6 +61,7 @@ class VSplinePoint;
class VPieceNode;
enum class GOType : qint8;
struct VPiecePassmarkData;
class VRawSAPoint;
class AbstractTest : public QObject
{
@ -68,8 +69,9 @@ class AbstractTest : public QObject
public:
explicit AbstractTest(QObject *parent = nullptr);
void VectorFromJson(const QString &json, QVector<QPointF>& vector);
void VectorFromJson(const QString &json, QVector<VSAPoint>& vector);
void VectorFromJson(const QString &json, QVector<QPointF>& vector) const;
void VectorFromJson(const QString &json, QVector<VSAPoint>& vector) const;
void VectorFromJson(const QString &json, QVector<VRawSAPoint>& vector) const;
void PieceFromJson(const QString &json, VPiece &piece, QSharedPointer<VContainer> &data);
@ -78,7 +80,7 @@ public:
protected:
void Comparison(const QVector<QPointF> &ekv, const QVector<QPointF> &ekvOrig) const;
void Comparison(const QPointF &result, const QPointF &expected) const;
void Comparison(const QPointF &result, const QPointF &expected, qreal testAccuracy) const;
void Comparison(const QVector<QLineF> &result, const QVector<QLineF> &expected) const;
QString ValentinaPath() const;
@ -91,30 +93,31 @@ protected:
bool CopyRecursively(const QString &srcFilePath, const QString &tgtFilePath) const;
void PrepareDocument(const QString &json, QByteArray &data) const;
void TestRoot(const QJsonObject &root, const QString &attribute, const QString &file);
void TestRoot(const QJsonObject &root, const QString &attribute, const QString &file) const;
template <typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
void ReadDoubleValue(const QJsonObject &itemObject, const QString &attribute, T &value,
const QString &defaultValue = QString());
const QString &defaultValue = QString()) const;
template <typename T, typename std::enable_if<std::is_enum<T>::value>::type* = nullptr>
void ReadDoubleValue(const QJsonObject &itemObject, const QString &attribute, T &value,
const QString &defaultValue = QString());
const QString &defaultValue = QString()) const;
template <typename T, typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>
void ReadDoubleValue(const QJsonObject &itemObject, const QString &attribute, T &value,
const QString &defaultValue = QString());
const QString &defaultValue = QString()) const;
void ReadStringValue(const QJsonObject &itemObject, const QString &attribute, QString &value,
const QString &defaultValue = QString());
const QString &defaultValue = QString()) const;
void ReadBooleanValue(const QJsonObject &itemObject, const QString &attribute, bool &value,
const QString &defaultValue = QString());
const QString &defaultValue = QString()) const;
void ReadPointValue(const QJsonObject &itemObject, const QString &attribute, VPointF &value);
void ReadSplinePointValues(const QJsonObject &itemObject, const QString &attribute, QVector<VSplinePoint> &points);
void ReadSplinePointValue(const QJsonObject &itemObject, VSplinePoint &point);
void ReadPieceNodeValue(const QJsonObject &itemObject, VPieceNode &node);
void QPointFromJson(const QJsonObject &itemObject, QPointF &point);
void QPointFromJson(const QJsonObject &itemObject, QPointF &point) const;
void VPointFromJson(const QJsonObject &itemObject, VPointF &point);
void QLineFromJson(const QJsonObject &itemObject, QLineF &line);
void SAPointFromJson(const QJsonObject &itemObject, VSAPoint &point);
void SAPointFromJson(const QJsonObject &itemObject, VSAPoint &point) const;
void RawSAPointFromJson(const QJsonObject &itemObject, VRawSAPoint &point) const;
void SplineFromJson(const QJsonObject &itemObject, QSharedPointer<VContainer> &data);
void SplinePathFromJson(const QJsonObject &itemObject, QSharedPointer<VContainer> &data);

View File

@ -535,18 +535,41 @@ void DialogEditLabel::InitPlaceholders()
const QString measurementsFilePath = QFileInfo(m_doc->MPath()).baseName();
m_placeholders.insert(pl_mFileName, qMakePair(tr("Measurments file name"), measurementsFilePath));
m_placeholders.insert(pl_height, qMakePair(tr("Height", "dimension"),
QString::number(VAbstractValApplication::VApp()->GetDimensionHeight())));
m_placeholders.insert(pl_size, qMakePair(tr("Size", "dimension"),
QString::number(VAbstractValApplication::VApp()->GetDimensionSize())));
m_placeholders.insert(pl_hip, qMakePair(tr("Hip", "dimension"),
QString::number(VAbstractValApplication::VApp()->GetDimensionHip())));
m_placeholders.insert(pl_waist, qMakePair(tr("Waist", "dimension"),
QString::number(VAbstractValApplication::VApp()->GetDimensionWaist())));
QString heightValue = QString::number(VAbstractValApplication::VApp()->GetDimensionHeight());
m_placeholders.insert(pl_height, qMakePair(tr("Height", "dimension"), heightValue));
QString sizeValue = QString::number(VAbstractValApplication::VApp()->GetDimensionSize());
m_placeholders.insert(pl_size, qMakePair(tr("Size", "dimension"), sizeValue));
QString hipValue = QString::number(VAbstractValApplication::VApp()->GetDimensionHip());
m_placeholders.insert(pl_hip, qMakePair(tr("Hip", "dimension"), hipValue));
QString waistValue = QString::number(VAbstractValApplication::VApp()->GetDimensionWaist());
m_placeholders.insert(pl_waist, qMakePair(tr("Waist", "dimension"), waistValue));
{
QString label = VAbstractValApplication::VApp()->GetDimensionHeightLabel();
m_placeholders.insert(pl_heightLabel, qMakePair(tr("Height label", "dimension"),
not label.isEmpty() ? label : heightValue));
label = VAbstractValApplication::VApp()->GetDimensionSizeLabel();
m_placeholders.insert(pl_sizeLabel, qMakePair(tr("Size label", "dimension"),
not label.isEmpty() ? label : sizeValue));
label = VAbstractValApplication::VApp()->GetDimensionHipLabel();
m_placeholders.insert(pl_hipLabel, qMakePair(tr("Hip label", "dimension"),
not label.isEmpty() ? label : hipValue));
label = VAbstractValApplication::VApp()->GetDimensionWaistLabel();
m_placeholders.insert(pl_waistLabel, qMakePair(tr("Waist label", "dimension"),
not label.isEmpty() ? label : waistValue));
}
m_placeholders.insert(pl_mExt,
qMakePair(tr("Measurments extension"),
VAbstractValApplication::VApp()->GetMeasurementsType() == MeasurementsType::Multisize
? QString("vst") : QString("vit")));
? QStringLiteral("vst") : QStringLiteral("vit")));
const QString materialDescription = tr("User material");
const QMap<int, QString> materials = m_doc->GetPatternMaterials();

View File

@ -28,7 +28,7 @@
#include "dialogarc.h"
#include <limits.h>
#include <climits>
#include <QDialog>
#include <QLabel>
#include <QPlainTextEdit>

View File

@ -28,7 +28,7 @@
#include "dialogarcwithlength.h"
#include <limits.h>
#include <climits>
#include <QDialog>
#include <QLabel>
#include <QPlainTextEdit>

View File

@ -28,7 +28,7 @@
#include "dialogellipticalarc.h"
#include <limits.h>
#include <climits>
#include <QDialog>
#include <QLabel>
#include <QPlainTextEdit>

View File

@ -28,7 +28,7 @@
#include "dialogpointfromcircleandtangent.h"
#include <limits.h>
#include <climits>
#include <QColor>
#include <QComboBox>
#include <QDialog>

View File

@ -28,7 +28,7 @@
#include "dialogpointofintersectioncircles.h"
#include <limits.h>
#include <climits>
#include <QColor>
#include <QComboBox>
#include <QDialog>

View File

@ -28,7 +28,7 @@
#include "dialogtool.h"
#include <limits.h>
#include <climits>
#include <qiterator.h>
#include <qnumeric.h>
#include <QCloseEvent>

View File

@ -379,6 +379,7 @@ void DialogSeamAllowance::SetPiece(const VPiece &piece)
SetDLAngle(ppData.GetRotation());
const VPatternLabelData &patternInfo = piece.GetPatternInfo();
uiTabLabels->groupBoxPatternLabel->setEnabled(not m_doc->GetPatternLabelTemplate().isEmpty());
uiTabLabels->groupBoxPatternLabel->setChecked(patternInfo.IsVisible());
ChangeCurrentData(uiTabLabels->comboBoxPLCenterPin, patternInfo.CenterPin());
ChangeCurrentData(uiTabLabels->comboBoxPLTopLeftPin, patternInfo.TopLeftPin());
@ -3930,6 +3931,7 @@ void DialogSeamAllowance::EditPatternLabel()
if (QDialog::Accepted == editor.exec())
{
m_patternTemplateLines = editor.GetTemplate();
uiTabLabels->groupBoxPatternLabel->setEnabled(not m_patternTemplateLines.isEmpty());
m_patternTemplateDataChanged = true;
}
}

View File

@ -28,7 +28,7 @@
#include "vtoolflippingbyaxis.h"
#include <limits.h>
#include <climits>
#include <qiterator.h>
#include <QColor>
#include <QDomNode>

View File

@ -28,7 +28,7 @@
#include "vtoolflippingbyline.h"
#include <limits.h>
#include <climits>
#include <qiterator.h>
#include <QColor>
#include <QDomNode>

View File

@ -28,7 +28,7 @@
#include "vtoolmove.h"
#include <limits.h>
#include <climits>
#include <qiterator.h>
#include <QColor>
#include <QDomNode>

View File

@ -28,7 +28,7 @@
#include "vtoolrotation.h"
#include <limits.h>
#include <climits>
#include <qiterator.h>
#include <QColor>
#include <QDomNode>

View File

@ -28,7 +28,7 @@
#include "vtoolcurveintersectaxis.h"
#include <limits.h>
#include <climits>
#include <QLineF>
#include <QMap>
#include <QRectF>
@ -150,7 +150,7 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(VToolCurveIntersectAxis
const qreal segLength = curve->GetLengthByPoint(fPoint);
VPointF *p = new VPointF(fPoint, initData.name, initData.mx, initData.my);
auto *p = new VPointF(fPoint, initData.name, initData.mx, initData.my);
p->SetShowLabel(initData.showLabel);
if (initData.typeCreation == Source::FromGui)
@ -160,14 +160,14 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(VToolCurveIntersectAxis
initData.data->getNextId();
initData.data->getNextId();
InitSegments(curve->getType(), segLength, p, initData.curveId, initData.data);
VToolSinglePoint::InitSegments(curve->getType(), segLength, p, initData.curveId, initData.data);
}
else
{
initData.data->UpdateGObject(initData.id, p);
initData.data->AddLine(initData.basePointId, initData.id);
InitSegments(curve->getType(), segLength, p, initData.curveId, initData.data);
VToolSinglePoint::InitSegments(curve->getType(), segLength, p, initData.curveId, initData.data);
if (initData.parse != Document::FullParse)
{
@ -178,7 +178,7 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(VToolCurveIntersectAxis
if (initData.parse == Document::FullParse)
{
VAbstractTool::AddRecord(initData.id, Tool::CurveIntersectAxis, initData.doc);
VToolCurveIntersectAxis *point = new VToolCurveIntersectAxis(initData);
auto *point = new VToolCurveIntersectAxis(initData);
initData.scene->addItem(point);
InitToolConnections(initData.scene, point);
VAbstractPattern::AddTool(initData.id, point);
@ -308,163 +308,3 @@ void VToolCurveIntersectAxis::SetVisualization()
visual->RefreshGeometry();
}
}
//---------------------------------------------------------------------------------------------------------------------
template <class Item>
void VToolCurveIntersectAxis::InitArc(VContainer *data, qreal segLength, const VPointF *p, quint32 curveId)
{
QSharedPointer<Item> a1;
QSharedPointer<Item> a2;
const QSharedPointer<Item> arc = data->GeometricObject<Item>(curveId);
Item arc1;
Item arc2;
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
arc->CutArc(segLength, arc1, arc2);
}
else
{
arc->CutArc(0, arc1, arc2);
}
// Arc highly depend on id. Need for creating the name.
arc1.setId(p->id() + 1);
arc2.setId(p->id() + 2);
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
a1 = QSharedPointer<Item>(new Item(arc1));
a2 = QSharedPointer<Item>(new Item(arc2));
}
else
{
a1 = QSharedPointer<Item>(new Item());
a2 = QSharedPointer<Item>(new Item());
// Take names for empty arcs from donors.
a1->setName(arc1.name());
a2->setName(arc2.name());
}
data->AddArc(a1, arc1.id(), p->id());
data->AddArc(a2, arc2.id(), p->id());
}
//---------------------------------------------------------------------------------------------------------------------
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
void VToolCurveIntersectAxis::InitSegments(GOType curveType, qreal segLength, const VPointF *p, quint32 curveId,
VContainer *data)
{
switch(curveType)
{
case GOType::EllipticalArc:
InitArc<VEllipticalArc>(data, segLength, p, curveId);
break;
case GOType::Arc:
InitArc<VArc>(data, segLength, p, curveId);
break;
case GOType::CubicBezier:
case GOType::Spline:
{
QSharedPointer<VAbstractBezier> spline1;
QSharedPointer<VAbstractBezier> spline2;
const auto spl = data->GeometricObject<VAbstractCubicBezier>(curveId);
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
spl->CutSpline(segLength, spl1p2, spl1p3, spl2p2, spl2p3);
}
else
{
spl->CutSpline(0, spl1p2, spl1p3, spl2p2, spl2p3);
}
VSpline *spl1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p);
VSpline *spl2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4());
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
spline1 = QSharedPointer<VAbstractBezier>(spl1);
spline2 = QSharedPointer<VAbstractBezier>(spl2);
}
else
{
spline1 = QSharedPointer<VAbstractBezier>(new VSpline());
spline2 = QSharedPointer<VAbstractBezier>(new VSpline());
// Take names for empty splines from donors.
spline1->setName(spl1->name());
spline2->setName(spl2->name());
delete spl1;
delete spl2;
}
data->RegisterUniqueName(spline1);
data->AddSpline(spline1, NULL_ID, p->id());
data->RegisterUniqueName(spline2);
data->AddSpline(spline2, NULL_ID, p->id());
break;
}
case GOType::CubicBezierPath:
case GOType::SplinePath:
{
QSharedPointer<VAbstractBezier> splP1;
QSharedPointer<VAbstractBezier> splP2;
const auto splPath = data->GeometricObject<VAbstractCubicBezierPath>(curveId);
VSplinePath *splPath1 = nullptr;
VSplinePath *splPath2 = nullptr;
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
VPointF *pC = VToolCutSplinePath::CutSplinePath(segLength, splPath, p->name(), &splPath1, &splPath2);
delete pC;
}
else
{
VPointF *pC = VToolCutSplinePath::CutSplinePath(0, splPath, p->name(), &splPath1, &splPath2);
delete pC;
}
SCASSERT(splPath1 != nullptr)
SCASSERT(splPath2 != nullptr)
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
splP1 = QSharedPointer<VAbstractBezier>(splPath1);
splP2 = QSharedPointer<VAbstractBezier>(splPath2);
}
else
{
splP1 = QSharedPointer<VAbstractBezier>(new VSplinePath());
splP2 = QSharedPointer<VAbstractBezier>(new VSplinePath());
// Take names for empty spline paths from donors.
splP1->setName(splPath1->name());
splP2->setName(splPath2->name());
delete splPath1;
delete splPath2;
}
data->RegisterUniqueName(splP1);
data->AddSpline(splP1, NULL_ID, p->id());
data->RegisterUniqueName(splP2);
data->AddSpline(splP2, NULL_ID, p->id());
break;
}
case GOType::Point:
case GOType::PlaceLabel:
case GOType::Unknown:
Q_UNREACHABLE();
break;
}
}
QT_WARNING_POP

View File

@ -228,6 +228,11 @@ void VToolBasePoint::SetBasePointPos(const QPointF &pos)
//---------------------------------------------------------------------------------------------------------------------
void VToolBasePoint::DeleteToolWithConfirm(bool ask)
{
if (doc->CountPP() <= 1)
{
return;
}
qCDebug(vTool, "Deleting base point.");
emit VAbstractValApplication::VApp()->getSceneView()->itemClicked(nullptr);
if (ask)

View File

@ -119,9 +119,9 @@ VToolPointOfIntersectionCurves *VToolPointOfIntersectionCurves::Create(VToolPoin
auto curve1 = initData.data->GeometricObject<VAbstractCurve>(initData.firstCurveId);
auto curve2 = initData.data->GeometricObject<VAbstractCurve>(initData.secondCurveId);
QPointF point;
QPointF fPoint;
const bool success = VToolPointOfIntersectionCurves::FindPoint(curve1->GetPoints(), curve2->GetPoints(),
initData.vCrossPoint, initData.hCrossPoint, &point);
initData.vCrossPoint, initData.hCrossPoint, &fPoint);
if (not success)
{
@ -131,16 +131,26 @@ VToolPointOfIntersectionCurves *VToolPointOfIntersectionCurves::Create(VToolPoin
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
}
VPointF *p = new VPointF(point, initData.name, initData.mx, initData.my);
const qreal segLength1 = curve1->GetLengthByPoint(fPoint);
const qreal segLength2 = curve2->GetLengthByPoint(fPoint);
auto *p = new VPointF(fPoint, initData.name, initData.mx, initData.my);
p->SetShowLabel(initData.showLabel);
if (initData.typeCreation == Source::FromGui)
{
initData.id = initData.data->AddGObject(p);
VToolSinglePoint::InitSegments(curve1->getType(), segLength1, p, initData.firstCurveId, initData.data);
VToolSinglePoint::InitSegments(curve2->getType(), segLength2, p, initData.secondCurveId, initData.data);
}
else
{
initData.data->UpdateGObject(initData.id, p);
VToolSinglePoint::InitSegments(curve1->getType(), segLength1, p, initData.firstCurveId, initData.data);
VToolSinglePoint::InitSegments(curve2->getType(), segLength2, p, initData.secondCurveId, initData.data);
if (initData.parse != Document::FullParse)
{
initData.doc->UpdateToolData(initData.id, initData.data);

View File

@ -52,6 +52,12 @@
#include "../vmisc/diagnostic.h"
#include "../vgeometry/vgobject.h"
#include "../vgeometry/vpointf.h"
#include "../vgeometry/vabstractcubicbezierpath.h"
#include "../vgeometry/vabstractcubicbezier.h"
#include "../vgeometry/vspline.h"
#include "../vgeometry/vsplinepath.h"
#include "../vgeometry/vellipticalarc.h"
#include "../vgeometry/varc.h"
#include "../vmisc/vabstractapplication.h"
#include "../vpatterndb/vcontainer.h"
#include "../vwidgets/vgraphicssimpletextitem.h"
@ -59,6 +65,7 @@
#include "../../../vabstracttool.h"
#include "../../vdrawtool.h"
#include "../vabstractpoint.h"
#include "toolcut/vtoolcutsplinepath.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
@ -384,3 +391,120 @@ void VToolSinglePoint::ToolSelectionType(const SelectionType &type)
VAbstractTool::ToolSelectionType(type);
m_namePoint->LabelSelectionType(type);
}
//---------------------------------------------------------------------------------------------------------------------
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
void VToolSinglePoint::InitSegments(GOType curveType, qreal segLength, const VPointF *p, quint32 curveId,
VContainer *data)
{
switch(curveType)
{
case GOType::EllipticalArc:
InitArc<VEllipticalArc>(data, segLength, p, curveId);
break;
case GOType::Arc:
InitArc<VArc>(data, segLength, p, curveId);
break;
case GOType::CubicBezier:
case GOType::Spline:
{
QSharedPointer<VAbstractBezier> spline1;
QSharedPointer<VAbstractBezier> spline2;
const auto spl = data->GeometricObject<VAbstractCubicBezier>(curveId);
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
spl->CutSpline(segLength, spl1p2, spl1p3, spl2p2, spl2p3);
}
else
{
spl->CutSpline(0, spl1p2, spl1p3, spl2p2, spl2p3);
}
VSpline *spl1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p);
VSpline *spl2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4());
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
spline1 = QSharedPointer<VAbstractBezier>(spl1);
spline2 = QSharedPointer<VAbstractBezier>(spl2);
}
else
{
spline1 = QSharedPointer<VAbstractBezier>(new VSpline());
spline2 = QSharedPointer<VAbstractBezier>(new VSpline());
// Take names for empty splines from donors.
spline1->setName(spl1->name());
spline2->setName(spl2->name());
delete spl1;
delete spl2;
}
data->RegisterUniqueName(spline1);
data->AddSpline(spline1, NULL_ID, p->id());
data->RegisterUniqueName(spline2);
data->AddSpline(spline2, NULL_ID, p->id());
break;
}
case GOType::CubicBezierPath:
case GOType::SplinePath:
{
QSharedPointer<VAbstractBezier> splP1;
QSharedPointer<VAbstractBezier> splP2;
const auto splPath = data->GeometricObject<VAbstractCubicBezierPath>(curveId);
VSplinePath *splPath1 = nullptr;
VSplinePath *splPath2 = nullptr;
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
VPointF *pC = VToolCutSplinePath::CutSplinePath(segLength, splPath, p->name(), &splPath1, &splPath2);
delete pC;
}
else
{
VPointF *pC = VToolCutSplinePath::CutSplinePath(0, splPath, p->name(), &splPath1, &splPath2);
delete pC;
}
SCASSERT(splPath1 != nullptr)
SCASSERT(splPath2 != nullptr)
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
splP1 = QSharedPointer<VAbstractBezier>(splPath1);
splP2 = QSharedPointer<VAbstractBezier>(splPath2);
}
else
{
splP1 = QSharedPointer<VAbstractBezier>(new VSplinePath());
splP2 = QSharedPointer<VAbstractBezier>(new VSplinePath());
// Take names for empty spline paths from donors.
splP1->setName(splPath1->name());
splP2->setName(splPath2->name());
delete splPath1;
delete splPath2;
}
data->RegisterUniqueName(splP1);
data->AddSpline(splP1, NULL_ID, p->id());
data->RegisterUniqueName(splP2);
data->AddSpline(splP2, NULL_ID, p->id());
break;
}
case GOType::Point:
case GOType::PlaceLabel:
case GOType::Unknown:
Q_UNREACHABLE();
break;
}
}
QT_WARNING_POP

View File

@ -106,8 +106,55 @@ protected:
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) override;
virtual void SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj) override;
virtual void ChangeLabelVisibility(quint32 id, bool visible) override;
template <class Item>
static void InitArc(VContainer *data, qreal segLength, const VPointF *p, quint32 curveId);
static void InitSegments(GOType curveType, qreal segLength, const VPointF *p, quint32 curveId, VContainer *data);
private:
Q_DISABLE_COPY(VToolSinglePoint)
};
//---------------------------------------------------------------------------------------------------------------------
template <class Item>
inline void VToolSinglePoint::InitArc(VContainer *data, qreal segLength, const VPointF *p, quint32 curveId)
{
QSharedPointer<Item> a1;
QSharedPointer<Item> a2;
const QSharedPointer<Item> arc = data->GeometricObject<Item>(curveId);
Item arc1;
Item arc2;
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
arc->CutArc(segLength, arc1, arc2);
}
else
{
arc->CutArc(0, arc1, arc2);
}
// Arc highly depend on id. Need for creating the name.
arc1.setId(p->id() + 1);
arc2.setId(p->id() + 2);
if (not VFuzzyComparePossibleNulls(segLength, -1))
{
a1 = QSharedPointer<Item>(new Item(arc1));
a2 = QSharedPointer<Item>(new Item(arc2));
}
else
{
a1 = QSharedPointer<Item>(new Item());
a2 = QSharedPointer<Item>(new Item());
// Take names for empty arcs from donors.
a1->setName(arc1.name());
a2->setName(arc2.name());
}
data->AddArc(a1, arc1.id(), p->id());
data->AddArc(a2, arc2.id(), p->id());
}
#endif // VTOOLSINGLEPOINT_H

View File

@ -87,6 +87,57 @@ const QString VToolSeamAllowance::AttrTopPin = QStringLiteral("top
const QString VToolSeamAllowance::AttrBottomPin = QStringLiteral("bottomPin");
const QString VToolSeamAllowance::AttrPiecePriority = QStringLiteral("priority");
namespace
{
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
auto FixLabelPins(T itemData, const QMap<quint32, quint32> &mappedPins) -> T
{
itemData.SetCenterPin(mappedPins.value(itemData.CenterPin(), NULL_ID));
itemData.SetTopLeftPin(mappedPins.value(itemData.TopLeftPin(), NULL_ID));
itemData.SetBottomRightPin(mappedPins.value(itemData.BottomRightPin(), NULL_ID));
return itemData;
}
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
auto FixGrainlinePins(T itemData, const QMap<quint32, quint32> &mappedPins) -> T
{
itemData.SetCenterPin(mappedPins.value(itemData.CenterPin(), NULL_ID));
itemData.SetTopPin(mappedPins.value(itemData.TopPin(), NULL_ID));
itemData.SetBottomPin(mappedPins.value(itemData.BottomPin(), NULL_ID));
return itemData;
}
//---------------------------------------------------------------------------------------------------------------------
auto DuplicatePins(const QVector<quint32> &pins, const VToolSeamAllowanceInitData &initData) -> QMap<quint32, quint32>
{
QMap<quint32, quint32> newPins;
for(auto p : pins)
{
QSharedPointer<VPointF> pin = initData.data->GeometricObject<VPointF>(p);
auto *tool = qobject_cast<VAbstractNode *>(VAbstractPattern::getTool(p));
SCASSERT(tool != nullptr)
VToolPinInitData initNodeData;
initNodeData.id = initData.data->AddGObject(new VPointF(*pin));
initNodeData.pointId = pin->getIdObject();
initNodeData.idObject = NULL_ID; // piece id
initNodeData.doc = initData.doc;
initNodeData.data = initData.data;
initNodeData.parse = Document::FullParse;
initNodeData.typeCreation = Source::FromTool;
initNodeData.drawName = initData.drawName;
initNodeData.idTool = tool->GetIdTool();
VToolPin::Create(initNodeData);
newPins.insert(p, initNodeData.id);
}
return newPins;
}
} // namespace
//---------------------------------------------------------------------------------------------------------------------
VToolSeamAllowance *VToolSeamAllowance::Create(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
VAbstractPattern *doc, VContainer *data)
@ -193,7 +244,7 @@ VToolSeamAllowance *VToolSeamAllowance::Duplicate(const QPointer<DialogTool> &di
}
//---------------------------------------------------------------------------------------------------------------------
VToolSeamAllowance *VToolSeamAllowance::Duplicate(VToolSeamAllowanceInitData &initData)
auto VToolSeamAllowance::Duplicate(VToolSeamAllowanceInitData &initData) -> VToolSeamAllowance *
{
VPiece dupDetail = initData.detail;
@ -202,10 +253,15 @@ VToolSeamAllowance *VToolSeamAllowance::Duplicate(VToolSeamAllowanceInitData &in
dupDetail.SetCustomSARecords(DuplicateCustomSARecords(initData.detail.GetCustomSARecords(), initData,
replacements));
dupDetail.SetInternalPaths(DuplicateInternalPaths(initData.detail.GetInternalPaths(), initData));
dupDetail.SetPins(DuplicatePins(initData.detail.GetPins(), initData));
dupDetail.SetPlaceLabels(DuplicatePlaceLabels(initData.detail.GetPlaceLabels(), initData));
dupDetail.SetUUID(QUuid::createUuid());
const QMap<quint32, quint32> mappedPins = DuplicatePins(initData.detail.GetPins(), initData);
dupDetail.SetPins(mappedPins.values().toVector());
dupDetail.SetPatternPieceData(FixLabelPins(initData.detail.GetPatternPieceData(), mappedPins));
dupDetail.SetPatternInfo(FixLabelPins(initData.detail.GetPatternInfo(), mappedPins));
dupDetail.SetGrainlineGeometry(FixGrainlinePins(initData.detail.GetGrainlineGeometry(), mappedPins));
initData.detail = dupDetail;
return VToolSeamAllowance::Create(initData);
}
@ -879,14 +935,12 @@ void VToolSeamAllowance::paint(QPainter *painter, const QStyleOptionGraphicsItem
//---------------------------------------------------------------------------------------------------------------------
QRectF VToolSeamAllowance::boundingRect() const
{
if (m_mainPathRect.isNull())
if (m_pieceBoundingRect.isNull())
{
return QGraphicsPathItem::boundingRect();
}
else
{
return m_mainPathRect;
}
return m_pieceBoundingRect;
}
//---------------------------------------------------------------------------------------------------------------------
@ -1217,7 +1271,6 @@ VToolSeamAllowance::VToolSeamAllowance(const VToolSeamAllowanceInitData &initDat
: VInteractiveTool(initData.doc, initData.data, initData.id),
QGraphicsPathItem(parent),
m_mainPath(),
m_mainPathRect(),
m_sceneDetails(initData.scene),
m_drawName(initData.drawName),
m_seamAllowance(new VNoBrushScalePathItem(this)),
@ -1313,7 +1366,6 @@ void VToolSeamAllowance::RefreshGeometry(bool updateChildren)
|| not detail.IsSeamAllowance() || detail.IsSeamAllowanceBuiltIn())
{
m_mainPath = QPainterPath();
m_mainPathRect = QRectF();
m_seamAllowance->setBrush(QBrush(Qt::Dense7Pattern));
path = futurePath.result();
}
@ -1322,7 +1374,6 @@ void VToolSeamAllowance::RefreshGeometry(bool updateChildren)
m_seamAllowance->setBrush(QBrush(Qt::NoBrush)); // Disable if the main path was hidden
// need for returning a bounding rect when main path is not visible
m_mainPath = futurePath.result();
m_mainPathRect = m_mainPath.controlPointRect();
path = QPainterPath();
}
@ -1342,10 +1393,14 @@ void VToolSeamAllowance::RefreshGeometry(bool updateChildren)
path.addPath(detail.SeamAllowancePath(futureSeamAllowance.result()));
path.setFillRule(Qt::OddEvenFill);
m_seamAllowance->setPath(path);
m_pieceBoundingRect = m_seamAllowance->path().controlPointRect();
}
else
{
m_seamAllowance->setPath(QPainterPath());
m_pieceBoundingRect = m_mainPath.controlPointRect();
}
if (VAbstractApplication::VApp()->IsAppInGUIMode())
@ -2111,36 +2166,6 @@ QVector<quint32> VToolSeamAllowance::DuplicateInternalPaths(const QVector<quint3
return newPaths;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<quint32> VToolSeamAllowance::DuplicatePins(const QVector<quint32> &pins,
const VToolSeamAllowanceInitData &initData)
{
QVector<quint32> newPins;
newPins.reserve(pins.size());
for(auto p : pins)
{
QSharedPointer<VPointF> pin = initData.data->GeometricObject<VPointF>(p);
VAbstractNode *tool = qobject_cast<VAbstractNode *>(VAbstractPattern::getTool(p));
SCASSERT(tool != nullptr)
VToolPinInitData initNodeData;
initNodeData.id = initData.data->AddGObject(new VPointF(*pin));
initNodeData.pointId = pin->getIdObject();
initNodeData.idObject = NULL_ID; // piece id
initNodeData.doc = initData.doc;
initNodeData.data = initData.data;
initNodeData.parse = Document::FullParse;
initNodeData.typeCreation = Source::FromTool;
initNodeData.drawName = initData.drawName;
initNodeData.idTool = tool->GetIdTool();
VToolPin::Create(initNodeData);
newPins.append(initNodeData.id);
}
return newPins;
}
//---------------------------------------------------------------------------------------------------------------------
QVector<quint32> VToolSeamAllowance::DuplicatePlaceLabels(const QVector<quint32> &placeLabels,
const VToolSeamAllowanceInitData &initData)

View File

@ -66,7 +66,7 @@ public:
static VToolSeamAllowance* Create(VToolSeamAllowanceInitData &initData);
static VToolSeamAllowance* Duplicate(const QPointer<DialogTool> &dialog, VMainGraphicsScene *scene,
VAbstractPattern *doc);
static VToolSeamAllowance* Duplicate(VToolSeamAllowanceInitData &initData);
static auto Duplicate(VToolSeamAllowanceInitData &initData) -> VToolSeamAllowance *;
static const quint8 pieceVersion;
@ -176,7 +176,7 @@ private:
Q_DISABLE_COPY(VToolSeamAllowance)
QPainterPath m_mainPath; // Must be first to prevent crash
QRectF m_mainPathRect;
QRectF m_pieceBoundingRect{};
/** @brief sceneDetails pointer to the scene. */
VMainGraphicsScene *m_sceneDetails;
@ -194,7 +194,7 @@ private:
/** @brief m_geometryIsReady is true when a piece's geometry is ready and checks for validity can be enabled. */
bool m_geometryIsReady{false};
VToolSeamAllowance(const VToolSeamAllowanceInitData &initData, QGraphicsItem * parent = nullptr);
explicit VToolSeamAllowance(const VToolSeamAllowanceInitData &initData, QGraphicsItem * parent = nullptr);
void UpdateExcludeState();
void UpdateInternalPaths();
@ -233,7 +233,6 @@ private:
static QVector<quint32> DuplicateInternalPaths(const QVector<quint32> &iPaths,
const VToolSeamAllowanceInitData &initData);
static QVector<quint32> DuplicatePins(const QVector<quint32> &pins, const VToolSeamAllowanceInitData &initData);
static QVector<quint32> DuplicatePlaceLabels(const QVector<quint32> &placeLabels,
const VToolSeamAllowanceInitData &initData);
};

View File

@ -28,7 +28,7 @@
#include "vistoolmove.h"
#include <limits.h>
#include <climits>
#include <QGraphicsLineItem>
#include <QGraphicsPathItem>
#include <QGuiApplication>

View File

@ -28,7 +28,7 @@
#include "vistoolrotation.h"
#include <limits.h>
#include <climits>
#include <QGraphicsLineItem>
#include <QGraphicsPathItem>
#include <QGuiApplication>

View File

@ -0,0 +1,34 @@
{
"vector": [
{
"type": "VSAPoint",
"x": 99.86433649395012,
"y": 10.166060970128015
},
{
"type": "VSAPoint",
"x": 236.976230899601,
"y": 65.89294600598842
},
{
"type": "VSAPoint",
"x": 198.9294347511521,
"y": 172.04822599160408
},
{
"type": "VSAPoint",
"x": 260.3187756756982,
"y": 75.38014122578073
},
{
"type": "VSAPoint",
"x": 324.5363299638826,
"y": 101.48031496062993
},
{
"type": "VSAPoint",
"x": 29.858267716535437,
"y": 300.8503937007874
}
]
}

View File

@ -0,0 +1,24 @@
{
"vector": [
{
"type": "QPointF",
"x": 73.4038432255171,
"y": -41.386063334917424
},
{
"type": "QPointF",
"x": 404.34279917400556,
"y": 93.11865802402654
},
{
"type": "QPointF",
"x": -29.71419544696289,
"y": 386.7882190877889
},
{
"type": "QPointF",
"x": 73.4038432255171,
"y": -41.386063334917424
}
]
}

View File

@ -0,0 +1,34 @@
{
"vector": [
{
"type": "VSAPoint",
"x": 99.86433649395012,
"y": 10.166060970128015
},
{
"type": "VSAPoint",
"x": 236.976230899601,
"y": 65.89294600598842
},
{
"type": "VSAPoint",
"x": 198.9294347511521,
"y": 172.04822599160408
},
{
"type": "VSAPoint",
"x": 260.3187756756982,
"y": 75.38014122578073
},
{
"type": "VSAPoint",
"x": 324.5363299638826,
"y": 101.48031496062993
},
{
"type": "VSAPoint",
"x": 29.858267716535437,
"y": 300.8503937007874
}
]
}

View File

@ -0,0 +1,24 @@
{
"vector": [
{
"type": "QPointF",
"x": 46.94334995708405,
"y": -92.9381876399629
},
{
"type": "QPointF",
"x": 484.14926838412856,
"y": 84.75700108742315
},
{
"type": "QPointF",
"x": -89.28665861046107,
"y": 472.7260444747902
},
{
"type": "QPointF",
"x": 46.94334995708405,
"y": -92.9381876399629
}
]
}

View File

@ -202,58 +202,58 @@
},
{
"type": "QPointF",
"x": 2795.1934418373985,
"y": 714.0407970608541
"x": 2795.1870397580587,
"y": 714.0474084064654
},
{
"type": "QPointF",
"x": 2797.520564686708,
"y": 711.5183868986292
"x": 2797.5081938293038,
"y": 711.5320126236637
},
{
"type": "QPointF",
"x": 2797.55905511811,
"y": 711.5533198039858
"y": 711.5781695971301
},
{
"type": "QPointF",
"x": 2797.55905511811,
"y": 711.5533198039858
"y": 711.5781695971301
},
{
"type": "QPointF",
"x": 2797.565477459869,
"y": 778.3077483501366
"y": 778.332404004272
},
{
"type": "QPointF",
"x": 2798.0441679430687,
"y": 888.600497760094
"y": 888.6231149546354
},
{
"type": "QPointF",
"x": 2799.8047936736652,
"y": 981.4929110797046
"y": 981.5120337720853
},
{
"type": "QPointF",
"x": 2803.650599415853,
"y": 1068.6060917850425
"y": 1068.6208463497221
},
{
"type": "QPointF",
"x": 2810.3848299338274,
"y": 1161.5611433521817
"y": 1161.5712385806464
},
{
"type": "QPointF",
"x": 2820.8107299917833,
"y": 1271.9791692571957
"y": 1271.9848963579593
},
{
"type": "QPointF",
"x": 2844.4160857065513,
"y": 1489.955982223637
"y": 1489.9567587796728
},
{
"type": "QPointF",

View File

@ -115,11 +115,6 @@
"x": 2651.457513977499,
"y": 754.2498813699515
},
{
"type": "QPointF",
"x": 2661.906602177309,
"y": 755.9323325983764
},
{
"type": "QPointF",
"x": 2669.4674223109832,
@ -172,48 +167,43 @@
},
{
"type": "QPointF",
"x": 2795.1934418373985,
"y": 714.0407970608541
},
{
"type": "QPointF",
"x": 2797.520564686708,
"y": 711.5183868986292
"x": 2797.5081938293038,
"y": 711.5320126236637
},
{
"type": "QPointF",
"x": 2797.565477459869,
"y": 778.3077483501366
"y": 778.332404004272
},
{
"type": "QPointF",
"x": 2798.0441679430687,
"y": 888.600497760094
"y": 888.6231149546354
},
{
"type": "QPointF",
"x": 2799.8047936736652,
"y": 981.4929110797046
"y": 981.5120337720853
},
{
"type": "QPointF",
"x": 2803.650599415853,
"y": 1068.6060917850425
"y": 1068.6208463497221
},
{
"type": "QPointF",
"x": 2810.3848299338274,
"y": 1161.5611433521817
"y": 1161.5712385806464
},
{
"type": "QPointF",
"x": 2820.8107299917833,
"y": 1271.9791692571957
"y": 1271.9848963579593
},
{
"type": "QPointF",
"x": 2844.4160857065513,
"y": 1489.955982223637
"y": 1489.9567587796728
},
{
"type": "QPointF",

View File

@ -13,7 +13,7 @@
{
"type": "QPointF",
"x": -815.2818897637795,
"y": -46.697156391859295
"y": -46.69715639185932
},
{
"type": "QPointF",
@ -53,17 +53,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -162,43 +162,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -7,8 +7,8 @@
},
{
"type": "QPointF",
"x": -797.7132813112016,
"y": -48.52244559084083
"x": -797.7132813112017,
"y": -48.52244559084082
},
{
"type": "QPointF",
@ -48,17 +48,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -157,43 +157,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -13,7 +13,7 @@
{
"type": "QPointF",
"x": -815.2818897637795,
"y": -46.697156391859295
"y": -46.69715639185932
},
{
"type": "QPointF",
@ -53,17 +53,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -162,43 +162,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -1,7 +1,7 @@
{
"vector": [
{
"angle": 3,
"angle": 1,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
@ -468,7 +468,7 @@
"y": 331.90352529002166
},
{
"angle": 3,
"angle": 1,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",

View File

@ -2,13 +2,18 @@
"vector": [
{
"type": "QPointF",
"x": -1086.319675233741,
"y": 603.286223243
"x": -814.7149606299213,
"y": 372.2542552635805
},
{
"type": "QPointF",
"x": -797.7132813112016,
"y": -48.52244559084083
"x": -925.5802587835234,
"y": 240.26119236421624
},
{
"type": "QPointF",
"x": -797.7132813112017,
"y": -48.52244559084082
},
{
"type": "QPointF",
@ -48,17 +53,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -157,43 +162,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",
@ -222,13 +222,13 @@
},
{
"type": "QPointF",
"x": -807.3585969245805,
"y": 374.1796788445591
"x": -810.1810632465665,
"y": 373.5624561175904
},
{
"type": "QPointF",
"x": -1086.319675233741,
"y": 603.286223243
"x": -814.7149606299213,
"y": 372.2542552635805
}
]
}

View File

@ -13,7 +13,7 @@
{
"type": "QPointF",
"x": -815.2818897637795,
"y": -46.697156391859295
"y": -46.69715639185932
},
{
"type": "QPointF",
@ -53,17 +53,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -162,43 +162,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -12,8 +12,8 @@
},
{
"type": "QPointF",
"x": -797.7132813112016,
"y": -48.52244559084083
"x": -797.7132813112017,
"y": -48.52244559084082
},
{
"type": "QPointF",
@ -53,17 +53,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -162,43 +162,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -13,7 +13,7 @@
{
"type": "QPointF",
"x": -815.2818897637795,
"y": -46.697156391859295
"y": -46.69715639185932
},
{
"type": "QPointF",
@ -53,17 +53,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -162,43 +162,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -7,8 +7,8 @@
},
{
"type": "QPointF",
"x": -797.7132813112016,
"y": -48.52244559084083
"x": -797.7132813112017,
"y": -48.52244559084082
},
{
"type": "QPointF",
@ -48,17 +48,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -157,43 +157,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -1,7 +1,7 @@
{
"vector": [
{
"angle": 5,
"angle": 4,
"saAfter": 0,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
@ -468,7 +468,7 @@
"y": 331.90352529002166
},
{
"angle": 5,
"angle": 4,
"saAfter": 0,
"saBefore": 37.795275590551185,
"type": "VSAPoint",

View File

@ -13,7 +13,7 @@
{
"type": "QPointF",
"x": -815.2818897637795,
"y": -46.697156391859295
"y": -46.69715639185932
},
{
"type": "QPointF",
@ -53,17 +53,17 @@
{
"type": "QPointF",
"x": -616.3280202339708,
"y": -100.59426715699185
"y": -100.59426715699189
},
{
"type": "QPointF",
"x": -594.0963839106636,
"y": -115.97215530775165
"y": -115.9721553077516
},
{
"type": "QPointF",
"x": -184.04865014874554,
"y": 76.19837439910722
"x": -184.04865014874542,
"y": 76.19837439910728
},
{
"type": "QPointF",
@ -162,43 +162,38 @@
},
{
"type": "QPointF",
"x": -415.23237001939634,
"y": 388.15813749078177
"x": -435.9520270040894,
"y": 389.07661798449516
},
{
"type": "QPointF",
"x": -457.7859582653625,
"y": 389.818484035946
"x": -480.15529936788164,
"y": 390.3673559353522
},
{
"type": "QPointF",
"x": -502.9230721502445,
"y": 390.728524359008
"x": -525.9503830211974,
"y": 390.90684349642925
},
{
"type": "QPointF",
"x": -549.0970864147907,
"y": 390.9068680348474
"x": -572.2222728858704,
"y": 390.7329321107656
},
{
"type": "QPointF",
"x": -595.1846601171007,
"y": 390.3891909827686
"x": -617.8429427582322,
"y": 389.87963542037477
},
{
"type": "QPointF",
"x": -640.0561486385066,
"y": 389.208081776043
"x": -661.6840517509004,
"y": 388.3781346110808
},
{
"type": "QPointF",
"x": -682.5877079123347,
"y": 387.3931112039713
},
{
"type": "QPointF",
"x": -722.1497906411519,
"y": 384.93382569436017
"x": -702.630213618707,
"y": 386.255904969502
},
{
"type": "QPointF",

View File

@ -1,7 +1,7 @@
{
"vector": [
{
"angle": 5,
"angle": 4,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
@ -468,7 +468,7 @@
"y": 331.90352529002166
},
{
"angle": 5,
"angle": 4,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",

Some files were not shown because too many files have changed in this diff Show More