diff --git a/ChangeLog.txt b/ChangeLog.txt index 75b1583cd..261d98df3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,23 @@ -# Valentina 0.7.48 (unreleased) +# Valentina 0.7.50 (unreleased) +- Fix regression. Minimal seam allowance width is less than the point accuracy values. +- Call autosave only in GUI mode. +- Warn about stale layout only in GUI mode. +- Fix regression. Set default value for detail labels size and grainline length to 10 cm. +- [smart-pattern/valentina#136] 2 decimals for entering values in multi measurements tables. +- New warnings. Warn a user about incorrect cut curve segment length. +- Fix finding point of intersection curve and axis. Case when the axis's point lies on the curve. +- Fix visualization for tool point of intersection line and axis. Case when the axis's point lies on the line. + +# Valentina 0.7.49 July 1, 2021 +- Fix crash. +- Add tooltip for Export draw feature. + +# Valentina 0.7.48 June 29, 2021 - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. - Parsing formulas with not canonical math symbols. +- [smart-pattern/valentina#133] Incorrect seam allowance. +- Fix regression. Fix correct handle export format for exporting details in the Detail mode. +- [smart-pattern/valentina#83] Export the Draw mode. # Version 0.7.47 May 13, 2021 - [smart-pattern/valentina#118] Incorrect seam allowance. diff --git a/README.txt b/README.txt index 3c631acd9..7063a24fd 100644 --- a/README.txt +++ b/README.txt @@ -1,10 +1,9 @@ Pattern making program Author Roman Telezhynskyi -Copyright (C) 2013-2019 Valentina project -Valentina Web page: https://valentinaproject.bitbucket.io/ +Copyright (C) 2013-2021 Valentina project +Valentina Web page: https://smart-pattern.com.ua/ Wiki: https://wiki.valentinaproject.org -Valentina main repository: https://bitbucket.org/dismine/valentina/overview -Forum http://valentinaproject.forumotion.me/ +Valentina main repository: https://gitlab.com/smart-pattern/valentina PPA for Ubuntu (develop): https://launchpad.net/~dismine/+archive/valentina-dev Help translate https://www.transifex.com/organization/valentina diff --git a/common.pri b/common.pri index 88e7738b8..e1b2e51d2 100644 --- a/common.pri +++ b/common.pri @@ -923,5 +923,7 @@ MSVC_DEBUG_CXXFLAGS += \ -wd4774 \ # format string expected in argument 3 is not a string literal -wd5204 \ # class has virtual functions, but its trivial destructor is not virtual; instances of objects derived # from this class may not be destructed correctly - -wd5219 # implicit conversion from '' to '', possible loss of data + -wd5219 \ # implicit conversion from '' to '', possible loss of data + -wd5243 # 'type-name': using incomplete class 'class-name' can cause potential one definition rule violation due + # to ABI limitation } diff --git a/dist/OBS_debian/debian.changelog b/dist/OBS_debian/debian.changelog index f1be558f7..ff03d5721 100644 --- a/dist/OBS_debian/debian.changelog +++ b/dist/OBS_debian/debian.changelog @@ -1,5 +1,5 @@ -valentina (0.7.47) trusty; urgency=low +valentina (0.7.49) trusty; urgency=low * Auto build. - -- dismine Fri, 13 May 2021 14:17:00 +0300 + -- dismine Tue, 1 July 2021 17:08:00 +0300 diff --git a/dist/OBS_debian/debian.control b/dist/OBS_debian/debian.control index 0263f7777..d503d5f03 100644 --- a/dist/OBS_debian/debian.control +++ b/dist/OBS_debian/debian.control @@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 8.0.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) Standards-Version: 3.9.5 -Homepage: https://valentinaproject.bitbucket.io/ +Homepage: https://smart-pattern.com.ua/ Vcs-Browser: https://gitlab.com/smart-pattern/valentina Package: valentina diff --git a/dist/OBS_debian/valentina.dsc b/dist/OBS_debian/valentina.dsc index 7d0229a70..458c90a80 100644 --- a/dist/OBS_debian/valentina.dsc +++ b/dist/OBS_debian/valentina.dsc @@ -2,9 +2,9 @@ Format: 3.0 (native) Source: valentina Binary: valentina Architecture: i386 amd64 -Version: 0.7.47 +Version: 0.7.49 Maintainer: Roman Telezhynskyi -Homepage: https://valentinaproject.bitbucket.io +Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 Vcs-Browser: https://gitlab.com/smart-pattern/valentina Build-Depends: debhelper (>= 8.0.0), @@ -14,8 +14,9 @@ Build-Depends: debhelper (>= 8.0.0), qttools5-dev-tools (>= 5.4.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) -Debtransform-Tar: valentina-0.7.47.v0.7.47.tar.gz +Debtransform-Tar: valentina-0.7.49.v0.7.49.tar.gz Package-List: valentina deb graphics optional Files: - 00000000000000000000000000000000 0 valentina-0.7.47.v0.7.47.tar.gz + 00000000000000000000000000000000 0 valentina-0.7.49.v0.7.49.tar.gz + diff --git a/dist/SlackBuild/valentina/slack-desc b/dist/SlackBuild/valentina/slack-desc index 6c9e963d5..a23637f1e 100644 --- a/dist/SlackBuild/valentina/slack-desc +++ b/dist/SlackBuild/valentina/slack-desc @@ -14,7 +14,7 @@ valentina: allows pattern creation, using either standard sizing tables or an valentina: individual’s set of measurements. It blends new technologies with valentina: traditional methods to create a unique pattern making tool. valentina: -valentina: Homepage: https://valentinaproject.bitbucket.io/ +valentina: Homepage: https://smart-pattern.com.ua/ valentina: valentina: valentina: diff --git a/dist/SlackBuild/valentina/valentina.info b/dist/SlackBuild/valentina/valentina.info index cd509a875..0bbfda755 100644 --- a/dist/SlackBuild/valentina/valentina.info +++ b/dist/SlackBuild/valentina/valentina.info @@ -1,6 +1,6 @@ PRGNAM="valentina" VERSION="0.5.0" -HOMEPAGE="https://valentinaproject.bitbucket.io" +HOMEPAGE="https://smart-pattern.com.ua" DOWNLOAD="https://bitbucket.org/dismine/valentina/get/v0.5.0.tar.gz" MD5SUM="f23019c92e3209dbfa7699a1c13bb98b" DOWNLOAD_x86_64="" diff --git a/dist/debian/changelog b/dist/debian/changelog index f1be558f7..ff03d5721 100644 --- a/dist/debian/changelog +++ b/dist/debian/changelog @@ -1,5 +1,5 @@ -valentina (0.7.47) trusty; urgency=low +valentina (0.7.49) trusty; urgency=low * Auto build. - -- dismine Fri, 13 May 2021 14:17:00 +0300 + -- dismine Tue, 1 July 2021 17:08:00 +0300 diff --git a/dist/debian/control b/dist/debian/control index 0263f7777..d503d5f03 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 8.0.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) Standards-Version: 3.9.5 -Homepage: https://valentinaproject.bitbucket.io/ +Homepage: https://smart-pattern.com.ua/ Vcs-Browser: https://gitlab.com/smart-pattern/valentina Package: valentina diff --git a/dist/ebuild/valentina-0.0.0(template_stable).ebuild b/dist/ebuild/valentina-0.0.0(template_stable).ebuild index dcb039136..db09b3fd2 100644 --- a/dist/ebuild/valentina-0.0.0(template_stable).ebuild +++ b/dist/ebuild/valentina-0.0.0(template_stable).ebuild @@ -7,7 +7,7 @@ EAPI=5 inherit qmake-utils gnome2-utils fdo-mime DESCRIPTION="Cloth patternmaking software" -HOMEPAGE="https://valentinaproject.bitbucket.io/" +HOMEPAGE="https://smart-pattern.com.ua/" SRC_URI="https://bitbucket.org/dismine/valentina/get/v0.0.0.zip -> ${P}.zip" LICENSE="GPL-3" diff --git a/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild b/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild index b5e2e5047..45a286af3 100644 --- a/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild +++ b/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild @@ -7,7 +7,7 @@ EAPI=5 inherit mercurial qmake-utils gnome2-utils fdo-mime DESCRIPTION="Cloth patternmaking software" -HOMEPAGE="https://valentinaproject.bitbucket.io/" +HOMEPAGE="https://smart-pattern.com.ua/" SRC_URI="" EHG_REPO_URI="https://bitbucket.org/dismine/valentina" EHG_REVISION="develop" diff --git a/dist/macx/tape/Info.plist b/dist/macx/tape/Info.plist index 31a1037a9..96b39e57b 100755 --- a/dist/macx/tape/Info.plist +++ b/dist/macx/tape/Info.plist @@ -19,9 +19,9 @@ CFBundleIdentifier io.bitbucket.valentinaproject.@EXECUTABLE@ CFBundleShortVersionString - 0.7.47 + 0.7.49 CFBundleVersion - 0.7.47.0 + 0.7.49.0 CFBundleInfoDictionaryVersion 6.0 CFBundleDocumentTypes diff --git a/dist/macx/valentina/Info.plist b/dist/macx/valentina/Info.plist index a5401e0ff..84b551f86 100755 --- a/dist/macx/valentina/Info.plist +++ b/dist/macx/valentina/Info.plist @@ -19,9 +19,9 @@ CFBundleIdentifier io.bitbucket.valentinaproject.@EXECUTABLE@ CFBundleShortVersionString - 0.7.47 + 0.7.49 CFBundleVersion - 0.7.47.0 + 0.7.49.0 CFBundleInfoDictionaryVersion 6.0 CFBundleDocumentTypes diff --git a/dist/rpm/_service b/dist/rpm/_service index e5fbaf6db..c8a5b7ff8 100644 --- a/dist/rpm/_service +++ b/dist/rpm/_service @@ -1,7 +1,7 @@ git://github.com/dismine/Valentina_git.git - 0.7.47 + 0.7.49 valentina git .git diff --git a/dist/rpm/valentina.spec b/dist/rpm/valentina.spec index f5cdb0b93..8a81276ab 100644 --- a/dist/rpm/valentina.spec +++ b/dist/rpm/valentina.spec @@ -95,7 +95,7 @@ Requires: poppler-tools Requires: poppler-utils %endif -Version: 0.7.47 +Version: 0.7.49 Release: 0 URL: https://gitlab.com/smart-pattern/valentina License: GPL-3.0+ diff --git a/dist/valentina.dsc b/dist/valentina.dsc index 2946f516b..458c90a80 100644 --- a/dist/valentina.dsc +++ b/dist/valentina.dsc @@ -2,9 +2,9 @@ Format: 3.0 (native) Source: valentina Binary: valentina Architecture: i386 amd64 -Version: 0.7.47 +Version: 0.7.49 Maintainer: Roman Telezhynskyi -Homepage: https://valentinaproject.bitbucket.io +Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 Vcs-Browser: https://gitlab.com/smart-pattern/valentina Build-Depends: debhelper (>= 8.0.0), @@ -14,9 +14,9 @@ Build-Depends: debhelper (>= 8.0.0), qttools5-dev-tools (>= 5.4.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) -Debtransform-Tar: valentina-0.7.47.v0.7.47.tar.gz +Debtransform-Tar: valentina-0.7.49.v0.7.49.tar.gz Package-List: valentina deb graphics optional Files: - 00000000000000000000000000000000 0 valentina-0.7.47.v0.7.47.tar.gz + 00000000000000000000000000000000 0 valentina-0.7.49.v0.7.49.tar.gz diff --git a/dist/win/inno/valentina.iss b/dist/win/inno/valentina.iss index 3340818cc..60a532a42 100644 --- a/dist/win/inno/valentina.iss +++ b/dist/win/inno/valentina.iss @@ -4,9 +4,9 @@ #define MyAppName "Valentina" #define MyAppVersion GetFileVersion('valentina\valentina.exe') #define MyAppPublisher "Roman Telezhynskyi" -#define MyAppURL "https://valentinaproject.bitbucket.io/" +#define MyAppURL "https://smart-pattern.com.ua/" #define MyAppExeName "valentina.exe" -#define MyAppCopyright "(C) 2013-2020 Valentina project" +#define MyAppCopyright "(C) 2013-2021 Valentina project" #define MyDateTimeString GetDateTimeString('yyyymmddhhnnss', '', ''); ; Appstatus: "" = release, "b" = beta, "a" = alpha ; this only modifies the resulting exe name of the installer package ;-) diff --git a/share/translations/valentina.ts b/share/translations/valentina.ts index ecd9811e8..27b888306 100644 --- a/share/translations/valentina.ts +++ b/share/translations/valentina.ts @@ -9627,6 +9627,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -11217,7 +11233,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -12094,6 +12110,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline diff --git a/share/translations/valentina_cs_CZ.ts b/share/translations/valentina_cs_CZ.ts index cdc14f842..860b7cc0b 100644 --- a/share/translations/valentina_cs_CZ.ts +++ b/share/translations/valentina_cs_CZ.ts @@ -9524,6 +9524,22 @@ Chcete uložit své změny? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -11088,7 +11104,7 @@ Tato volba se projeví po opětovném spuštění. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Vybrat nový pro vytvoření nového souboru s rozměry.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Vybrat nový pro vytvoření nového souboru s rozměry.</span></p></body></html> Name @@ -12001,6 +12017,10 @@ Chcete uložit změny? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15693,15 +15713,15 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Délka + Délka Angle - Úhel + Úhel Label - Popis + Popis Segment 1 @@ -16588,7 +16608,7 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Label - Popis + Popis Curve 1 segment 1 diff --git a/share/translations/valentina_de_DE.ts b/share/translations/valentina_de_DE.ts index 3b6cdd53a..5794d6ab6 100644 --- a/share/translations/valentina_de_DE.ts +++ b/share/translations/valentina_de_DE.ts @@ -9520,6 +9520,22 @@ Sollen die Änderungen gespeichert werden? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -11084,7 +11100,7 @@ Diese Option wird nach einem Neustart aktiv. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Neu auswählen, um eine neue Maßdatei zu erstellen.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Neu auswählen, um eine neue Maßdatei zu erstellen.</span></p></body></html> Name @@ -11996,6 +12012,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15674,15 +15694,15 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Länge + Länge Angle - Winkel + Winkel Label - Bezeichnung + Bezeichnung Segment 1 @@ -16537,7 +16557,7 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Label - Bezeichnung + Bezeichnung Curve 1 segment 1 diff --git a/share/translations/valentina_el_GR.ts b/share/translations/valentina_el_GR.ts index b7df3fcad..d55ee2980 100644 --- a/share/translations/valentina_el_GR.ts +++ b/share/translations/valentina_el_GR.ts @@ -9284,6 +9284,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -10718,7 +10734,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Επιλέξτε Νέο για τη δημιουργία αρχείου μετρήσεων.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Επιλέξτε Νέο για τη δημιουργία αρχείου μετρήσεων.</span></p></body></html> Name @@ -11559,6 +11575,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15016,11 +15036,11 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Μήκος + Μήκος Angle - Γωνία + Γωνία Label diff --git a/share/translations/valentina_en_CA.ts b/share/translations/valentina_en_CA.ts index 27f20af7b..8ba81e745 100644 --- a/share/translations/valentina_en_CA.ts +++ b/share/translations/valentina_en_CA.ts @@ -9451,6 +9451,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -10990,7 +11006,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -11879,6 +11895,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15555,11 +15575,11 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Length + Length Angle - Angle + Angle Label diff --git a/share/translations/valentina_en_IN.ts b/share/translations/valentina_en_IN.ts index d64d53aa1..39c5349d6 100644 --- a/share/translations/valentina_en_IN.ts +++ b/share/translations/valentina_en_IN.ts @@ -9451,6 +9451,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -10990,7 +11006,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -11879,6 +11895,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15555,11 +15575,11 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Length + Length Angle - Angle + Angle Label diff --git a/share/translations/valentina_en_US.ts b/share/translations/valentina_en_US.ts index 2f81af094..f0572c348 100644 --- a/share/translations/valentina_en_US.ts +++ b/share/translations/valentina_en_US.ts @@ -9451,6 +9451,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -10990,7 +11006,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -11879,6 +11895,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15555,11 +15575,11 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Length + Length Angle - Angle + Angle Label diff --git a/share/translations/valentina_es_ES.ts b/share/translations/valentina_es_ES.ts index 6080ef3f4..bc4138e73 100644 --- a/share/translations/valentina_es_ES.ts +++ b/share/translations/valentina_es_ES.ts @@ -9521,6 +9521,22 @@ el patrón. Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -11085,7 +11101,7 @@ Esta opción surtirá efecto después de reiniciar. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Seleccione Nuevo para crear un archivo de medidas.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Seleccione Nuevo para crear un archivo de medidas.</span></p></body></html> Name @@ -11998,6 +12014,10 @@ Quieres guardar los cambios? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15697,15 +15717,15 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Longitud + Longitud Angle - + Angulo Label - Etiqueta + Etiqueta Segment 1 @@ -16592,7 +16612,7 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Label - Etiqueta + Etiqueta Curve 1 segment 1 diff --git a/share/translations/valentina_fi_FI.ts b/share/translations/valentina_fi_FI.ts index 02506f067..cd17bb294 100644 --- a/share/translations/valentina_fi_FI.ts +++ b/share/translations/valentina_fi_FI.ts @@ -8423,6 +8423,22 @@ Haluatko tallentaa muutokset? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -9761,10 +9777,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Name Nimi @@ -10471,6 +10483,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -13898,11 +13914,11 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Pituus + Pituus Angle - Kulma + Kulma Label diff --git a/share/translations/valentina_he_IL.ts b/share/translations/valentina_he_IL.ts index 9f077cac1..56c864dcd 100644 --- a/share/translations/valentina_he_IL.ts +++ b/share/translations/valentina_he_IL.ts @@ -7432,6 +7432,26 @@ Do you want to save your changes? Could not create recipe file. %1 + + ... + ... + + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -8680,10 +8700,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Calculated value @@ -9342,6 +9358,10 @@ Do you want to save your changes? untitled + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline diff --git a/share/translations/valentina_id_ID.ts b/share/translations/valentina_id_ID.ts index 6443c44f0..8ea1379cd 100644 --- a/share/translations/valentina_id_ID.ts +++ b/share/translations/valentina_id_ID.ts @@ -7769,6 +7769,22 @@ Apakah anda ingin menyimpan perubahan anda? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -9017,10 +9033,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Name Nama @@ -9679,6 +9691,10 @@ Do you want to save your changes? untitled + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts index aaa749b27..4b1364c09 100644 --- a/share/translations/valentina_it_IT.ts +++ b/share/translations/valentina_it_IT.ts @@ -2699,11 +2699,11 @@ Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -2818,11 +2818,11 @@ Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -4374,11 +4374,11 @@ Applicare la configurazione comunque? Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -6268,11 +6268,11 @@ Applicare la configurazione comunque? Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -8943,7 +8943,7 @@ Vuoi salvare i cambiamenti? Contains all visibility groups - + Contiene tutti i Gruppi di Visibilità Show which details will go in layout @@ -9319,7 +9319,7 @@ Vuoi salvare i cambiamenti? Groups of visibility - + Gruppi di Visibilità Export recipe @@ -9497,6 +9497,22 @@ Vuoi salvare i cambiamenti? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -11041,7 +11057,7 @@ Questa opzione sarà effettiva dopo il riavvio del programma. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Seleziona nuovo per la creazione di un file delle misure.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Seleziona nuovo per la creazione di un file delle misure.</span></p></body></html> Name @@ -11926,6 +11942,10 @@ Vuoi salvare le tue modifiche? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -12098,11 +12118,11 @@ Vuoi salvare le tue modifiche? Options to control position a pattern label. <b>Not available if a pattern label template is empty</b>. - + Opzione per regolare la visibilità e posizione dell'etichetta. <b>Non disponibile se il modello etichetta non è stato caricato</b>. Pattern label data - + Etichetta con dati del Modello Edit pattern label @@ -12162,7 +12182,7 @@ Vuoi salvare le tue modifiche? Piece label visible - + Attiva/Disattiva Etichetta del Pezzo @@ -13079,7 +13099,7 @@ Vuoi salvare le tue modifiche? Visibility group - + Gruppo di Visibilità default @@ -13991,7 +14011,7 @@ Vuoi salvare le tue modifiche? Restore label position - + Ripristina posizione dell'Etichetta @@ -15523,15 +15543,15 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Lunghezza + Lunghezza Angle - + Angolo Label - Etichetta + Etichetta Segment 1 @@ -16410,7 +16430,7 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Label - Etichetta + Etichetta Curve 1 segment 1 diff --git a/share/translations/valentina_ro_RO.ts b/share/translations/valentina_ro_RO.ts index c940dc45d..e86ba4205 100644 --- a/share/translations/valentina_ro_RO.ts +++ b/share/translations/valentina_ro_RO.ts @@ -8454,6 +8454,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -9717,10 +9733,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Name Nume @@ -10427,6 +10439,10 @@ Do you want to save your changes? untitled + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -13750,11 +13766,11 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Lungime + Lungime Angle - Unghi + Unghi Label diff --git a/share/translations/valentina_uk_UA.ts b/share/translations/valentina_uk_UA.ts index 161f1ddae..984b056ce 100644 --- a/share/translations/valentina_uk_UA.ts +++ b/share/translations/valentina_uk_UA.ts @@ -9453,6 +9453,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + + + Draw export + + MainWindowsNoGUI @@ -10992,7 +11008,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Виберіть Новий для створення файлу мірок.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Виберіть Новий для створення файлу мірок.</span></p></body></html> Name @@ -11881,6 +11897,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -15555,11 +15575,11 @@ Raw layout format compatibility error: actualFileVersion = %1 and fileVersion = Length - Довжина + Довжина Angle - Кут + Кут Label diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index bc54072b7..28b06e561 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -852,6 +852,11 @@ bool TMainWindow::FileSaveAs() usedNotExistedDir = directory.mkpath(QChar('.')); } + if (not curFile.isEmpty()) + { + fName = StrippedName(curFile); + } + QString fileName = QFileDialog::getSaveFileName(this, tr("Save as"), dir + QChar('/') + fName, filters, nullptr, VAbstractApplication::VApp()->NativeFileDialog()); @@ -4159,35 +4164,35 @@ void TMainWindow::SetDecimals() switch (mUnit) { case Unit::Cm: - ui->doubleSpinBoxBaseValue->setDecimals(1); + ui->doubleSpinBoxBaseValue->setDecimals(2); ui->doubleSpinBoxBaseValue->setSingleStep(0.1); - ui->doubleSpinBoxCorrection->setDecimals(1); + ui->doubleSpinBoxCorrection->setDecimals(2); ui->doubleSpinBoxCorrection->setSingleStep(0.1); - ui->doubleSpinBoxShiftA->setDecimals(1); + ui->doubleSpinBoxShiftA->setDecimals(2); ui->doubleSpinBoxShiftA->setSingleStep(0.1); - ui->doubleSpinBoxShiftB->setDecimals(1); + ui->doubleSpinBoxShiftB->setDecimals(2); ui->doubleSpinBoxShiftB->setSingleStep(0.1); - ui->doubleSpinBoxShiftC->setDecimals(1); + ui->doubleSpinBoxShiftC->setDecimals(2); ui->doubleSpinBoxShiftC->setSingleStep(0.1); break; case Unit::Mm: - ui->doubleSpinBoxBaseValue->setDecimals(0); + ui->doubleSpinBoxBaseValue->setDecimals(1); ui->doubleSpinBoxBaseValue->setSingleStep(1); - ui->doubleSpinBoxCorrection->setDecimals(0); + ui->doubleSpinBoxCorrection->setDecimals(1); ui->doubleSpinBoxCorrection->setSingleStep(1); - ui->doubleSpinBoxShiftA->setDecimals(0); + ui->doubleSpinBoxShiftA->setDecimals(1); ui->doubleSpinBoxShiftA->setSingleStep(1); - ui->doubleSpinBoxShiftB->setDecimals(0); + ui->doubleSpinBoxShiftB->setDecimals(1); ui->doubleSpinBoxShiftB->setSingleStep(1); - ui->doubleSpinBoxShiftC->setDecimals(0); + ui->doubleSpinBoxShiftC->setDecimals(1); ui->doubleSpinBoxShiftC->setSingleStep(1); break; case Unit::Inch: diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index 61f2ec1c2..7bc84791f 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -183,15 +183,13 @@ void DialogSaveLayout::SelectFormat(LayoutExportFormats format) { if (static_cast(format) < 0 || format >= LayoutExportFormats::COUNT) { - VException e(tr("Tried to use out of range format number.")); - throw e; + throw VException(tr("Tried to use out of range format number.")); } const int i = ui->comboBoxFormat->findData(static_cast(format)); if (i < 0) { - VException e(tr("Selected not present format.")); - throw e; + throw VException(tr("Selected not present format.")); } ui->comboBoxFormat->setCurrentIndex(i); } @@ -783,7 +781,14 @@ void DialogSaveLayout::ReadSettings() ui->toolButtonLandscape->setChecked(true); } - SelectFormat(static_cast(settings->GetLayoutExportFormat())); + if (m_mode != Draw::Layout) + { + SelectFormat(static_cast(settings->GetDetailExportFormat())); + } + else + { + SelectFormat(static_cast(settings->GetLayoutExportFormat())); + } } //--------------------------------------------------------------------------------------------------------------------- @@ -827,6 +832,13 @@ void DialogSaveLayout::WriteSettings() const settings->SetTiledPDFOrientation(PageOrientation::Landscape); } - settings->SetLayoutExportFormat(static_cast(Format())); + if (m_mode != Draw::Layout) + { + settings->SetDetailExportFormat(static_cast(Format())); + } + else + { + settings->SetLayoutExportFormat(static_cast(Format())); + } } diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index ce4f302b7..2fe310ed2 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -68,6 +68,7 @@ #include "watermarkwindow.h" #include "../vmisc/backport/qoverload.h" #include "../vlayout/vlayoutexporter.h" +#include "../vwidgets/vgraphicssimpletextitem.h" #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) #include "../vmisc/backport/qscopeguard.h" @@ -2245,6 +2246,62 @@ void MainWindow::StoreDimensions() } } +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::ExportDraw(const QString &fileName) +{ + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wnoexcept") + + VLayoutExporter exporter; + + QT_WARNING_POP + + exporter.SetFileName(fileName); + + int verticalScrollBarValue = ui->view->verticalScrollBar()->value(); + int horizontalScrollBarValue = ui->view->horizontalScrollBar()->value(); + + QTransform viewTransform = ui->view->transform(); + ui->view->ZoomFitBest(); // Resize all labels + ui->view->repaint(); + ui->view->ZoomOriginal(); // Set to original scale + + // Enable all items on scene + const QList qItems = sceneDraw->items(); + for (auto *item : qItems) + { + item->setEnabled(true); + if (item->type() == VGraphicsSimpleTextItem::Type) + { + auto *text = dynamic_cast(item); + text->setBrush(text->BaseColor()); // Regular update doesn't work on labels + } + } + + ui->view->repaint(); + + sceneDraw->SetOriginsVisible(false); + + const QRectF rect = sceneDraw->VisibleItemsBoundingRect(); + sceneDraw->update(rect); + exporter.SetImageRect(rect); + exporter.SetOffset(rect.topLeft()); // Correct positions to fit SVG view rect + + exporter.ExportToSVG(sceneDraw); + + sceneDraw->SetOriginsVisible(true); + + // Restore scale, scrollbars and current active pattern piece + ui->view->setTransform(viewTransform); + VMainGraphicsView::NewSceneRect(ui->view->scene(), ui->view); + emit ScaleChanged(ui->view->transform().m11()); + + ui->view->verticalScrollBar()->setValue(verticalScrollBarValue); + ui->view->horizontalScrollBar()->setValue(horizontalScrollBarValue); + + doc->ChangeActivPP(doc->GetNameActivPP(), Document::FullParse); +} + //--------------------------------------------------------------------------------------------------------------------- #if defined(Q_OS_MAC) void MainWindow::OpenAt(QAction *where) @@ -2518,6 +2575,7 @@ void MainWindow::InitToolButtons() connect(ui->toolButtonFlippingByAxis, &QToolButton::clicked, this, &MainWindow::ToolFlippingByAxis); connect(ui->toolButtonMove, &QToolButton::clicked, this, &MainWindow::ToolMove); connect(ui->toolButtonMidpoint, &QToolButton::clicked, this, &MainWindow::ToolMidpoint); + connect(ui->toolButtonExportDraw, &QToolButton::clicked, this, &MainWindow::ExportDrawAs); connect(ui->toolButtonLayoutExportAs, &QToolButton::clicked, this, &MainWindow::ExportLayoutAs); connect(ui->toolButtonDetailExportAs, &QToolButton::clicked, this, &MainWindow::ExportDetailsAs); connect(ui->toolButtonEllipticalArc, &QToolButton::clicked, this, &MainWindow::ToolEllipticalArc); @@ -3138,8 +3196,15 @@ bool MainWindow::on_actionSaveAs_triggered() usedNotExistedDir = directory.mkpath(QChar('.')); } + QString newFileName = tr("pattern") + QLatin1String(".val"); + + if(not VAbstractValApplication::VApp()->GetPatternPath().isEmpty()) + { + newFileName = StrippedName(VAbstractValApplication::VApp()->GetPatternPath()); + } + QString fileName = QFileDialog::getSaveFileName(this, tr("Save as"), - dir + QLatin1String("/") + tr("pattern") + QLatin1String(".val"), + dir + QLatin1String("/") + newFileName, filters, nullptr, VAbstractApplication::VApp()->NativeFileDialog()); auto RemoveTempDir = qScopeGuard([usedNotExistedDir, dir]() @@ -4331,6 +4396,7 @@ QT_WARNING_POP ui->toolButtonPin->setEnabled(drawTools); ui->toolButtonInsertNode->setEnabled(drawTools); ui->toolButtonPlaceLabel->setEnabled(drawTools); + ui->toolButtonExportDraw->setEnabled(drawTools); ui->actionLast_tool->setEnabled(drawTools); @@ -4417,7 +4483,8 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error) */ void MainWindow::AutoSavePattern() { - if (not VAbstractValApplication::VApp()->GetPatternPath().isEmpty() && isWindowModified() && isNeedAutosave) + if (VApplication::VApp()->IsGUIMode() && not VAbstractValApplication::VApp()->GetPatternPath().isEmpty() + && isWindowModified() && isNeedAutosave) { qCDebug(vMainWindow, "Autosaving pattern."); QString error; @@ -5029,6 +5096,11 @@ void MainWindow::CreateActions() qCDebug(vMainWindow, "Reporting bug"); QDesktopServices::openUrl(QUrl(QStringLiteral("https://gitlab.com/smart-pattern/valentina/issues/new"))); }); + connect(ui->actionShop, &QAction::triggered, this, []() + { + qCDebug(vMainWindow, "Open shop"); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://smart-pattern.com.ua/catalogue/"))); + }); connect(ui->actionLast_tool, &QAction::triggered, this, &MainWindow::LastUsedTool); @@ -5580,6 +5652,30 @@ void MainWindow::CreateMeasurements() } #endif +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::ExportDrawAs() +{ + auto Uncheck = qScopeGuard([this] {ui->toolButtonExportDraw->setChecked(false);}); + + QString filters(tr("Scalable Vector Graphics files") + QLatin1String("(*.svg)")); + QString dir = QDir::homePath() + QLatin1String("/") + FileName() + QLatin1String(".svg"); + QString fileName = QFileDialog::getSaveFileName(this, tr("Save draw"), dir, filters, nullptr, + VAbstractApplication::VApp()->NativeFileDialog()); + + if (fileName.isEmpty()) + { + return; + } + + QFileInfo f( fileName ); + if (f.suffix().isEmpty() || f.suffix() != QLatin1String("svg")) + { + fileName += QLatin1String(".svg"); + } + + ExportDraw(fileName); +} + //--------------------------------------------------------------------------------------------------------------------- void MainWindow::ExportLayoutAs() { diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index ed8049af7..f456b7e07 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -130,6 +130,7 @@ private slots: #if defined(Q_OS_MAC) void CreateMeasurements(); #endif + void ExportDrawAs(); void ExportLayoutAs(); void ExportDetailsAs(); @@ -417,6 +418,8 @@ private: void SetDimensionBases(); void StoreDimensions(); + + void ExportDraw(const QString &fileName); }; #endif // MAINWINDOW_H diff --git a/src/app/valentina/mainwindow.ui b/src/app/valentina/mainwindow.ui index c45ac3910..4e7b7b612 100644 --- a/src/app/valentina/mainwindow.ui +++ b/src/app/valentina/mainwindow.ui @@ -1119,9 +1119,9 @@ 0 - 0 + -53 126 - 192 + 237 @@ -1317,6 +1317,29 @@ + + + + false + + + Draw export + + + ... + + + + :/icon/32x32/export_to_picture_document.png:/icon/32x32/export_to_picture_document.png + + + + 32 + 32 + + + + @@ -1590,7 +1613,7 @@ 0 0 140 - 170 + 168 @@ -1728,6 +1751,7 @@ &Help + @@ -3065,6 +3089,11 @@ Update manual layout + + + Shop + + diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index ef3794c3e..766b8aee2 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -661,7 +661,13 @@ void MainWindowsNoGUI::ExportApparelLayout(const QVector &details, VAbstractValApplication::VApp()->ValentinaSettings()->SetPathLayout(path); const LayoutExportFormats format = m_dialogSaveLayout->Format(); + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wnoexcept") + VLayoutExporter exporter; + + QT_WARNING_POP + exporter.SetFileName(name); exporter.SetImageRect(QRectF(0, 0, size.width(), size.height())); exporter.SetXScale(m_dialogSaveLayout->GetXScale()); @@ -1095,7 +1101,13 @@ void MainWindowsNoGUI::ExportScene(const QList &scenes, const QList > &details, bool ignorePrinterFields, const QMarginsF &margins) const { + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wnoexcept") + VLayoutExporter exporter; + + QT_WARNING_POP + exporter.SetMargins(margins); exporter.SetXScale(m_dialogSaveLayout->GetXScale()); exporter.SetYScale(m_dialogSaveLayout->GetYScale()); diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 6ef087d8d..395ad7363 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -85,7 +85,7 @@ namespace //--------------------------------------------------------------------------------------------------------------------- QString FileComment() { - return QStringLiteral("Pattern created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QStringLiteral("Pattern created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } diff --git a/src/libs/ifc/xml/vabstractmconverter.cpp b/src/libs/ifc/xml/vabstractmconverter.cpp index cd9ad0017..f6967f1f8 100644 --- a/src/libs/ifc/xml/vabstractmconverter.cpp +++ b/src/libs/ifc/xml/vabstractmconverter.cpp @@ -59,7 +59,7 @@ auto VAbstractMConverter::Units() const -> Unit void VAbstractMConverter::AddRootComment() { const QString rootComment = - QStringLiteral("Measurements created with Valentina (https://valentinaproject.bitbucket.io/)."); + QStringLiteral("Measurements created with Valentina (https://smart-pattern.com.ua/)."); QDomElement rootElement = this->documentElement(); rootElement.insertBefore(createComment(rootComment), rootElement.firstChild()); diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 999ef4f5a..673bad8bc 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -291,7 +291,7 @@ QStringList VAbstractPattern::ListMeasurements() const void VAbstractPattern::ChangeActivPP(const QString &name, const Document &parse) { Q_ASSERT_X(not name.isEmpty(), Q_FUNC_INFO, "name pattern piece is empty"); - if (CheckExistNamePP(name) && this->nameActivPP != name) + if (CheckExistNamePP(name)) { this->nameActivPP = name; if (parse == Document::FullParse) diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp index 904fd9f52..3b2716a93 100644 --- a/src/libs/vformat/vmeasurements.cpp +++ b/src/libs/vformat/vmeasurements.cpp @@ -114,7 +114,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, defBirthDate, (QLatin1String("1800-01-0 //--------------------------------------------------------------------------------------------------------------------- QString FileComment() { - return QString("Measurements created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QString("Measurements created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } } diff --git a/src/libs/vformat/vpatternrecipe.cpp b/src/libs/vformat/vpatternrecipe.cpp index beac750d5..9da2c41bd 100644 --- a/src/libs/vformat/vpatternrecipe.cpp +++ b/src/libs/vformat/vpatternrecipe.cpp @@ -61,7 +61,7 @@ namespace //--------------------------------------------------------------------------------------------------------------------- inline QString FileComment() { - return QStringLiteral("Recipe created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QStringLiteral("Recipe created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } diff --git a/src/libs/vformat/vwatermark.cpp b/src/libs/vformat/vwatermark.cpp index b07c808d8..19b9c6b0c 100644 --- a/src/libs/vformat/vwatermark.cpp +++ b/src/libs/vformat/vwatermark.cpp @@ -45,7 +45,7 @@ namespace //--------------------------------------------------------------------------------------------------------------------- QString FileComment() { - return QString("Watermark created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QString("Watermark created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } } diff --git a/src/libs/vgeometry/vabstractcubicbezier.cpp b/src/libs/vgeometry/vabstractcubicbezier.cpp index 396826f85..f6769426e 100644 --- a/src/libs/vgeometry/vabstractcubicbezier.cpp +++ b/src/libs/vgeometry/vabstractcubicbezier.cpp @@ -39,6 +39,7 @@ #include "../vmisc/vmath.h" #include "../vgeometry/vpointf.h" #include "../vmisc/vabstractapplication.h" +#include "../ifc/exception/vexception.h" namespace { @@ -420,6 +421,11 @@ QPointF VAbstractCubicBezier::CutSpline(qreal length, QPointF &spl1p2, QPointF & if (fullLength <= minLength) { spl1p2 = spl1p3 = spl2p2 = spl2p3 = QPointF(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } @@ -428,10 +434,20 @@ QPointF VAbstractCubicBezier::CutSpline(qreal length, QPointF &spl1p2, QPointF & if (length < minLength) { length = minLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to minimal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else if (length > maxLength) { length = maxLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to maximal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } const qreal parT = GetParmT(length); diff --git a/src/libs/vgeometry/vabstractcubicbezierpath.cpp b/src/libs/vgeometry/vabstractcubicbezierpath.cpp index 3a9144e6d..99de0e36b 100644 --- a/src/libs/vgeometry/vabstractcubicbezierpath.cpp +++ b/src/libs/vgeometry/vabstractcubicbezierpath.cpp @@ -30,12 +30,14 @@ #include "vsplinepoint.h" #include +#include #include "../vmisc/def.h" #include "../ifc/ifcdef.h" #include "../ifc/exception/vexception.h" #include "vpointf.h" #include "vspline.h" +#include "vabstractapplication.h" //--------------------------------------------------------------------------------------------------------------------- VAbstractCubicBezierPath::VAbstractCubicBezierPath(const GOType &type, const quint32 &idObject, const Draw &mode) @@ -180,6 +182,11 @@ QPointF VAbstractCubicBezierPath::CutSplinePath(qreal length, qint32 &p1, qint32 { p1 = p2 = -1; spl1p2 = spl1p3 = spl2p2 = spl2p3 = QPointF(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } @@ -188,10 +195,20 @@ QPointF VAbstractCubicBezierPath::CutSplinePath(qreal length, qint32 &p1, qint32 if (length < minLength) { length = minLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to minimal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else if (length > maxLength) { length = maxLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to maximal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } fullLength = 0; diff --git a/src/libs/vgeometry/vabstractcurve.cpp b/src/libs/vgeometry/vabstractcurve.cpp index 17ae5019e..2369243de 100644 --- a/src/libs/vgeometry/vabstractcurve.cpp +++ b/src/libs/vgeometry/vabstractcurve.cpp @@ -481,7 +481,7 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const axis = QLineF(point, VGObject::BuildRay(point, angle + 180, rec)); points += VAbstractCurve::CurveIntersectLine(curvePoints, axis); - if (points.size() > 0) + if (not points.isEmpty()) { if (points.size() == 1) { @@ -516,11 +516,26 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const *intersectionPoint = points.at(forward.first()); return true; } - else if (not backward.isEmpty()) + + if (not backward.isEmpty()) { *intersectionPoint = points.at(backward.first()); return true; } + + if (VAbstractCurve::IsPointOnCurve(curvePoints, point)) + { + *intersectionPoint = point; + return true; + } + } + else + { + if (VAbstractCurve::IsPointOnCurve(curvePoints, point)) + { + *intersectionPoint = point; + return true; + } } return false; diff --git a/src/libs/vgeometry/varc.cpp b/src/libs/vgeometry/varc.cpp index 9ec997da1..2afab412f 100644 --- a/src/libs/vgeometry/varc.cpp +++ b/src/libs/vgeometry/varc.cpp @@ -30,6 +30,7 @@ #include #include +#include #include "../vmisc/def.h" #include "../vmisc/vmath.h" @@ -38,6 +39,7 @@ #include "vabstractcurve.h" #include "varc_p.h" #include "vspline.h" +#include "../ifc/exception/vexception.h" //--------------------------------------------------------------------------------------------------------------------- /** @@ -351,6 +353,11 @@ QPointF VArc::CutArc(qreal length, VArc &arc1, VArc &arc2) const { arc1 = VArc(); arc2 = VArc(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } @@ -362,7 +369,26 @@ QPointF VArc::CutArc(qreal length, VArc &arc1, VArc &arc2) const { length = fullLength + length; } - length = qBound(ToPixel(1, Unit::Mm), length, fullLength - ToPixel(1, Unit::Mm)); + + const qreal minLength = ToPixel(1, Unit::Mm); + const qreal maxLength = fullLength - ToPixel(1, Unit::Mm); + + if (length < minLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to " + "minimal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + else if (length > maxLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to " + "maximal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + + length = qBound(minLength, length, maxLength); line.setAngle(line.angle() + qRadiansToDegrees(length/d->radius)); } @@ -372,7 +398,26 @@ QPointF VArc::CutArc(qreal length, VArc &arc1, VArc &arc2) const { length = fullLength + length; } - length = qBound(fullLength + ToPixel(1, Unit::Mm), length, ToPixel(-1, Unit::Mm)); + + const qreal minLength = fullLength + ToPixel(1, Unit::Mm); + const qreal maxLength = ToPixel(-1, Unit::Mm); + + if (length > minLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to " + "minimal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + else if (length < maxLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to " + "maximal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + + length = qBound(minLength, length, maxLength); line.setAngle(line.angle() - qRadiansToDegrees(qAbs(length)/d->radius)); } diff --git a/src/libs/vgeometry/vellipticalarc.cpp b/src/libs/vgeometry/vellipticalarc.cpp index 42deedbd7..593fefe46 100644 --- a/src/libs/vgeometry/vellipticalarc.cpp +++ b/src/libs/vgeometry/vellipticalarc.cpp @@ -31,10 +31,12 @@ #include #include #include +#include #include "../vmisc/def.h" #include "../vmisc/vmath.h" #include "../ifc/ifcdef.h" +#include "../ifc/exception/vexception.h" #include "../vmisc/vabstractapplication.h" #include "../vmisc/compatibility.h" #include "vabstractcurve.h" @@ -356,6 +358,11 @@ QPointF VEllipticalArc::CutArc(const qreal &length, VEllipticalArc &arc1, VEllip { arc1 = VEllipticalArc(); arc2 = VEllipticalArc(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } @@ -364,10 +371,20 @@ QPointF VEllipticalArc::CutArc(const qreal &length, VEllipticalArc &arc1, VEllip if (length < minLength) { len = minLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to minimal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else if (length > maxLength) { len = maxLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to maximal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else { diff --git a/src/libs/vgeometry/vgeometrydef.h b/src/libs/vgeometry/vgeometrydef.h index f6329762b..75f2119cf 100644 --- a/src/libs/vgeometry/vgeometrydef.h +++ b/src/libs/vgeometry/vgeometrydef.h @@ -97,7 +97,7 @@ private: }; Q_DECLARE_METATYPE(VLayoutPassmark) -constexpr qreal accuracyPointOnLine = (0.138/*mm*/ / 25.4) * PrintDPI; +constexpr qreal accuracyPointOnLine = (0.1555/*mm*/ / 25.4) * PrintDPI; Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2, qreal accuracy = accuracyPointOnLine); diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 16b7ca37d..4752e7376 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -55,7 +55,7 @@ const qreal maxL = 3.5; const qreal VSAPoint::passmarkFactor = 0.5; const qreal VSAPoint::maxPassmarkLength = (10/*mm*/ / 25.4) * PrintDPI; -const qreal VSAPoint::minSAWidth = ToPixel(0.015, Unit::Cm); +const qreal VSAPoint::minSAWidth = accuracyPointOnLine + accuracyPointOnLine*0.5; namespace { @@ -1532,8 +1532,8 @@ bool VAbstractPiece::IsAllowanceValid(const QVector &base, const QVecto return false; // Not enough data } -// DumpVector(base); // Uncomment for dumping test data -// DumpVector(allowance); // Uncomment for dumping test data +// DumpVector(base, QStringLiteral("base.json.XXXXXX")); // Uncomment for dumping test data +// DumpVector(allowance, QStringLiteral("allowance.json.XXXXXX")); // Uncomment for dumping test data // First check direction const qreal baseDirection = VPiece::SumTrapezoids(base); diff --git a/src/libs/vlayout/vlayoutexporter.cpp b/src/libs/vlayout/vlayoutexporter.cpp index ca99c2aff..96d71e144 100644 --- a/src/libs/vlayout/vlayoutexporter.cpp +++ b/src/libs/vlayout/vlayoutexporter.cpp @@ -142,6 +142,7 @@ void VLayoutExporter::ExportToSVG(QGraphicsScene *scene) const QPainter painter; painter.begin(&generator); + painter.translate(-m_offset.x(), -m_offset.y()); painter.translate(m_margins.left(), m_margins.top()); painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(m_pen); @@ -396,6 +397,18 @@ auto VLayoutExporter::SupportPDFConversion() -> bool return res; } +//--------------------------------------------------------------------------------------------------------------------- +QPointF VLayoutExporter::offset() const +{ + return m_offset; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VLayoutExporter::SetOffset(QPointF newOffset) +{ + m_offset = newOffset; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief PdfToPs use external tool "pdftops" for converting pdf too eps or ps format. diff --git a/src/libs/vlayout/vlayoutexporter.h b/src/libs/vlayout/vlayoutexporter.h index 439f56b95..74fe7e267 100644 --- a/src/libs/vlayout/vlayoutexporter.h +++ b/src/libs/vlayout/vlayoutexporter.h @@ -93,9 +93,13 @@ public: static auto SupportPDFConversion() -> bool; + static QString ExportFormatDescription(LayoutExportFormats format); static QString ExportFormatSuffix(LayoutExportFormats format); + auto offset() const -> QPointF; + void SetOffset(QPointF newOffset); + private: QString m_fileName{}; QMarginsF m_margins{}; @@ -108,6 +112,7 @@ private: bool m_ignorePrinterMargins{false}; bool m_binaryDxfFormat{false}; int m_dxfVersion{0}; + QPointF m_offset{}; static void PdfToPs(const QStringList ¶ms); }; diff --git a/src/libs/vlayout/vprintlayout.cpp b/src/libs/vlayout/vprintlayout.cpp index 576ec0f23..b1b09ba4b 100644 --- a/src/libs/vlayout/vprintlayout.cpp +++ b/src/libs/vlayout/vprintlayout.cpp @@ -744,16 +744,21 @@ auto VPrintLayout::WatermarkData() const -> VWatermarkData //--------------------------------------------------------------------------------------------------------------------- auto VPrintLayout::ContinueIfLayoutStale(QWidget *parent) -> int { - QMessageBox msgBox(parent); - msgBox.setIcon(QMessageBox::Question); - msgBox.setWindowTitle(tr("The layout is stale.")); - msgBox.setText(tr("The layout was not updated since last pattern modification. Do you want to continue?")); - msgBox.setStandardButtons(QMessageBox::Yes|QMessageBox::No); - msgBox.setDefaultButton(QMessageBox::No); - const int width = 500; - auto* horizontalSpacer = new QSpacerItem(width, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - auto* layout = qobject_cast(msgBox.layout()); - SCASSERT(layout != nullptr) - layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount()); - return msgBox.exec(); + if (VAbstractApplication::VApp()->IsAppInGUIMode()) + { + QMessageBox msgBox(parent); + msgBox.setIcon(QMessageBox::Question); + msgBox.setWindowTitle(tr("The layout is stale.")); + msgBox.setText(tr("The layout was not updated since last pattern modification. Do you want to continue?")); + msgBox.setStandardButtons(QMessageBox::Yes|QMessageBox::No); + msgBox.setDefaultButton(QMessageBox::No); + const int width = 500; + auto* horizontalSpacer = new QSpacerItem(width, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + auto* layout = qobject_cast(msgBox.layout()); + SCASSERT(layout != nullptr) + layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount()); + return msgBox.exec(); + } + + return QMessageBox::Yes; } diff --git a/src/libs/vlayout/vprintlayout.h b/src/libs/vlayout/vprintlayout.h index f4cc8e12c..f23e914ab 100644 --- a/src/libs/vlayout/vprintlayout.h +++ b/src/libs/vlayout/vprintlayout.h @@ -138,7 +138,7 @@ private: bool m_isAutoCropWidth{false}; bool m_isUnitePages{false}; QString m_layoutPrinterName{}; - bool m_isLayoutStale{true}; + bool m_isLayoutStale{false}; QMarginsF m_tiledMargins{}; PageOrientation m_tiledPDFOrientation{PageOrientation::Portrait}; QSizeF m_tiledPDFPaperSize{}; diff --git a/src/libs/vmisc/projectversion.cpp b/src/libs/vmisc/projectversion.cpp index 05ed47232..83eae94bf 100644 --- a/src/libs/vmisc/projectversion.cpp +++ b/src/libs/vmisc/projectversion.cpp @@ -42,7 +42,7 @@ extern const int MAJOR_VERSION = 0; extern const int MINOR_VERSION = 7; -extern const int DEBUG_VERSION = 47; +extern const int DEBUG_VERSION = 49; extern const QString APP_VERSION_STR(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION) .arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE)); diff --git a/src/libs/vmisc/projectversion.h b/src/libs/vmisc/projectversion.h index 690534416..ec58c3799 100644 --- a/src/libs/vmisc/projectversion.h +++ b/src/libs/vmisc/projectversion.h @@ -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,47 -#define VER_FILEVERSION_STR "0.7.47\0" +#define VER_FILEVERSION 0,7,49 +#define VER_FILEVERSION_STR "0.7.49\0" #define V_PRERELEASE // Mark prerelease builds @@ -66,7 +66,7 @@ extern const QString APP_VERSION_STR; //#define VER_ORIGINALFILENAME_STR "valentina.exe" // Defined in program //#define VER_PRODUCTNAME_STR "Valentina" // Defined in program -#define VER_COMPANYDOMAIN_STR "valentinaproject.bitbucket.io" +#define VER_COMPANYDOMAIN_STR "smart-pattern.com.ua" QString compilerString(); QString buildCompatibilityString(); diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 74e436254..c28041d7d 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -195,17 +195,6 @@ void VAbstractApplication::WinAttachConsole() } #endif -//--------------------------------------------------------------------------------------------------------------------- -/** - * @brief getSettings hide settings constructor. - * @return pointer to class for acssesing to settings in ini file. - */ -VCommonSettings *VAbstractApplication::Settings() -{ - SCASSERT(settings != nullptr) - return settings; -} - //--------------------------------------------------------------------------------------------------------------------- void VAbstractApplication::LoadTranslation(const QString &locale) { @@ -324,9 +313,3 @@ QFileDialog::Options VAbstractApplication::NativeFileDialog(QFileDialog::Options return options; } - -//--------------------------------------------------------------------------------------------------------------------- -auto VAbstractApplication::VApp() -> VAbstractApplication * -{ - return qobject_cast(QCoreApplication::instance()); -} diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index 12f5167c9..9ee262655 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -120,4 +120,21 @@ inline QString VAbstractApplication::LocaleToString(const T &value) return loc.toString(value); } +//--------------------------------------------------------------------------------------------------------------------- +inline auto VAbstractApplication::VApp() -> VAbstractApplication * +{ + return qobject_cast(QCoreApplication::instance()); +} + +//--------------------------------------------------------------------------------------------------------------------- +/** + * @brief getSettings hide settings constructor. + * @return pointer to class for acssesing to settings in ini file. + */ +inline VCommonSettings *VAbstractApplication::Settings() +{ + SCASSERT(settings != nullptr) + return settings; +} + #endif // VABSTRACTAPPLICATION_H diff --git a/src/libs/vmisc/vvalentinasettings.cpp b/src/libs/vmisc/vvalentinasettings.cpp index afbad7a02..4b93ad90f 100644 --- a/src/libs/vmisc/vvalentinasettings.cpp +++ b/src/libs/vmisc/vvalentinasettings.cpp @@ -82,6 +82,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTextAsPaths, (QLatin1String("lay 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, settingDetailExportFormat, (QLatin1String("detail/exportFormat"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTiledPDFPaperHeight, (QLatin1String("tiledPDF/paperHeight"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTiledPDFPaperWidth, (QLatin1String("tiledPDF/paperWidth"))) @@ -653,3 +654,27 @@ void VValentinaSettings::SetLayoutExportFormat(qint8 format) { setValue(*settingLayoutExportFormat, format); } + +//--------------------------------------------------------------------------------------------------------------------- +qint8 VValentinaSettings::GetDetailExportFormat() const +{ + return qvariant_cast(value(*settingDetailExportFormat, 0)); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VValentinaSettings::SetDetailExportFormat(qint8 format) +{ + setValue(*settingDetailExportFormat, format); +} + +//--------------------------------------------------------------------------------------------------------------------- +template +T VValentinaSettings::GetCachedValue(T &cache, const QString &setting, T defValue, T valueMin, T valueMax) const +{ + if (cache < 0) + { + cache = qBound(valueMin, ValueOrDef(setting, defValue), valueMax); + } + + return cache; +} diff --git a/src/libs/vmisc/vvalentinasettings.h b/src/libs/vmisc/vvalentinasettings.h index 44c913feb..c5f222259 100644 --- a/src/libs/vmisc/vvalentinasettings.h +++ b/src/libs/vmisc/vvalentinasettings.h @@ -170,6 +170,9 @@ public: auto GetLayoutExportFormat() const -> qint8; void SetLayoutExportFormat(qint8 format); + auto GetDetailExportFormat() const -> qint8; + void SetDetailExportFormat(qint8 format); + private: Q_DISABLE_COPY(VValentinaSettings) diff --git a/src/libs/vobj/vobjengine.cpp b/src/libs/vobj/vobjengine.cpp index cdc9fafbd..90ca1c522 100644 --- a/src/libs/vobj/vobjengine.cpp +++ b/src/libs/vobj/vobjengine.cpp @@ -128,10 +128,10 @@ bool VObjEngine::begin(QPaintDevice *pdev) stream = QSharedPointer(new QTextStream(outputDevice.data())); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) *stream << "# Valentina OBJ File" << endl; - *stream << "# valentinaproject.bitbucket.io/" << endl; + *stream << "# smart-pattern.com.ua/" << endl; #else *stream << "# Valentina OBJ File" << Qt::endl; - *stream << "# valentinaproject.bitbucket.io/" << Qt::endl; + *stream << "# smart-pattern.com.ua/" << Qt::endl; #endif return true; } diff --git a/src/libs/vtest/abstracttest.cpp b/src/libs/vtest/abstracttest.cpp index 13cf270b0..84907a2cc 100644 --- a/src/libs/vtest/abstracttest.cpp +++ b/src/libs/vtest/abstracttest.cpp @@ -241,12 +241,12 @@ void AbstractTest::PassmarkDataFromJson(const QString &json, VPiecePassmarkData AbstractTest::ReadStringValue(passmarkData, QStringLiteral("pieceName"), pieceName); data.pieceName = pieceName; - PassmarkLineType passmarkLineType; + PassmarkLineType passmarkLineType = PassmarkLineType::OneLine; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("passmarkLineType"), passmarkLineType, QString::number(static_cast(PassmarkLineType::OneLine))); data.passmarkLineType = passmarkLineType; - PassmarkAngleType passmarkAngleType; + PassmarkAngleType passmarkAngleType = PassmarkAngleType::Straightforward; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("passmarkAngleType"), passmarkAngleType, QString::number(static_cast(PassmarkAngleType::Straightforward))); data.passmarkAngleType = passmarkAngleType; @@ -259,11 +259,11 @@ void AbstractTest::PassmarkDataFromJson(const QString &json, VPiecePassmarkData AbstractTest::ReadBooleanValue(passmarkData, QStringLiteral("isShowSecondPassmark"), isShowSecondPassmark); data.isShowSecondPassmark = isShowSecondPassmark; - int passmarkIndex; + int passmarkIndex = -1; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("passmarkIndex"), passmarkIndex, QStringLiteral("-1")); data.passmarkIndex = passmarkIndex; - vidtype id; + vidtype id = NULL_ID; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("id"), id, QString::number(NULL_ID)); data.id = id; @@ -891,7 +891,7 @@ void AbstractTest::SAPointFromJson(const QJsonObject &itemObject, VSAPoint &poin AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("saAfter"), saAfter, QStringLiteral("-1")); point.SetSAAfter(saAfter); - PieceNodeAngle angleType; + PieceNodeAngle angleType = PieceNodeAngle::ByLength; AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("angle"), angleType, QString::number(static_cast(PieceNodeAngle::ByLength))); point.SetAngleType(angleType); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index 35c8be301..d533c6744 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -132,9 +132,9 @@ DialogSeamAllowance::DialogSeamAllowance(const VContainer *data, quint32 toolId, m_tabPlaceLabels(new QWidget), m_ftb(new FancyTabBar(FancyTabBar::Left, this)), applyAllowed(false),// By default disabled - flagGPin(true), - flagDPin(true), - flagPPin(true), + flagGPin(false), + flagDPin(false), + flagPPin(false), flagGFormulas(true), flagDLAngle(true), flagDLFormulas(true), @@ -172,6 +172,8 @@ DialogSeamAllowance::DialogSeamAllowance(const VContainer *data, quint32 toolId, { ui->setupUi(this); + m_defLabelValue = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); + InitOkCancelApply(ui); InitFancyTabBar(); EnableApply(applyAllowed); @@ -2603,8 +2605,8 @@ VPiece DialogSeamAllowance::CreatePiece() const } else { - piece.GetPatternPieceData().SetLabelWidth(QString::number(1)); - piece.GetPatternPieceData().SetLabelHeight(QString::number(1)); + piece.GetPatternPieceData().SetLabelWidth(m_defLabelValue); + piece.GetPatternPieceData().SetLabelHeight(m_defLabelValue); piece.GetPatternPieceData().SetCenterPin(NULL_ID); piece.GetPatternPieceData().SetTopLeftPin(getCurrentObjectId(uiTabLabels->comboBoxDLTopLeftPin)); piece.GetPatternPieceData().SetBottomRightPin(getCurrentObjectId(uiTabLabels->comboBoxDLBottomRightPin)); @@ -2626,8 +2628,8 @@ VPiece DialogSeamAllowance::CreatePiece() const piece.GetPatternInfo().SetCenterPin(NULL_ID); piece.GetPatternInfo().SetTopLeftPin(getCurrentObjectId(uiTabLabels->comboBoxPLTopLeftPin)); piece.GetPatternInfo().SetBottomRightPin(getCurrentObjectId(uiTabLabels->comboBoxPLBottomRightPin)); - piece.GetPatternInfo().SetLabelWidth(QString::number(1)); - piece.GetPatternInfo().SetLabelHeight(QString::number(1)); + piece.GetPatternInfo().SetLabelWidth(m_defLabelValue); + piece.GetPatternInfo().SetLabelHeight(m_defLabelValue); } piece.GetGrainlineGeometry().SetVisible(uiTabGrainline->groupBoxGrainline->isChecked()); @@ -2645,7 +2647,7 @@ VPiece DialogSeamAllowance::CreatePiece() const else { piece.GetGrainlineGeometry().SetRotation(QString::number(90)); - piece.GetGrainlineGeometry().SetLength(QChar('1')); + piece.GetGrainlineGeometry().SetLength(m_defLabelValue); piece.GetGrainlineGeometry().SetCenterPin(NULL_ID); piece.GetGrainlineGeometry().SetTopPin(getCurrentObjectId(uiTabGrainline->comboBoxGrainlineTopPin)); piece.GetGrainlineGeometry().SetBottomPin(getCurrentObjectId(uiTabGrainline->comboBoxGrainlineBottomPin)); @@ -3210,11 +3212,10 @@ void DialogSeamAllowance::InitPatternPieceDataTab() //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::InitLabelsTab() { - QString labelValue = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); - uiTabLabels->lineEditDLWidthFormula->setPlainText(labelValue); - uiTabLabels->lineEditDLHeightFormula->setPlainText(labelValue); - uiTabLabels->lineEditPLWidthFormula->setPlainText(labelValue); - uiTabLabels->lineEditPLHeightFormula->setPlainText(labelValue); + uiTabLabels->lineEditDLWidthFormula->setPlainText(m_defLabelValue); + uiTabLabels->lineEditDLHeightFormula->setPlainText(m_defLabelValue); + uiTabLabels->lineEditPLWidthFormula->setPlainText(m_defLabelValue); + uiTabLabels->lineEditPLHeightFormula->setPlainText(m_defLabelValue); m_DLWidthBaseHeight = uiTabLabels->lineEditDLWidthFormula->height(); m_DLHeightBaseHeight = uiTabLabels->lineEditDLHeightFormula->height(); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h index b5cb12329..a89fcd125 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h @@ -240,6 +240,8 @@ private: VAbstractPattern *m_doc{nullptr}; + QString m_defLabelValue{}; + VPiece CreatePiece() const; void NewMainPathItem(const VPieceNode &node); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp index 725c77a4d..d1ad0a0c6 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -356,6 +356,13 @@ QString VToolCurveIntersectAxis::MakeToolTip() const return toolTip; } +//--------------------------------------------------------------------------------------------------------------------- +void VToolCurveIntersectAxis::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +{ + VToolLinePoint::hoverEnterEvent(event); + mainLine->SetBoldLine(false); +} + //--------------------------------------------------------------------------------------------------------------------- void VToolCurveIntersectAxis::SetSegments(const QPair &segments) { diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h index 8f0f5a02c..9df6b4988 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h @@ -89,6 +89,7 @@ protected: virtual void ReadToolAttributes(const QDomElement &domElement) override; virtual void SetVisualization() override; virtual auto MakeToolTip() const -> QString override; + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; void SetSegments(const QPair &segments); private: diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp index 738f3bd34..5d3081105 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -358,3 +358,10 @@ QString VToolLineIntersectAxis::MakeToolTip() const .arg(tr("Label"), current->name()); return toolTip; } + +//--------------------------------------------------------------------------------------------------------------------- +void VToolLineIntersectAxis::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +{ + VToolLinePoint::hoverEnterEvent(event); + mainLine->SetBoldLine(false); +} diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h index 4e45eb5d9..c65624513 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h @@ -95,6 +95,7 @@ protected: virtual void ReadToolAttributes(const QDomElement &domElement) override; virtual void SetVisualization() override; virtual QString MakeToolTip() const override; + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; private: Q_DISABLE_COPY(VToolLineIntersectAxis) diff --git a/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp b/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp index c6c97e483..d79591e62 100644 --- a/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp +++ b/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp @@ -99,7 +99,10 @@ void VisToolLineIntersectAxis::RefreshGeometry() QPointF p; VToolLineIntersectAxis::FindPoint(axis, base_line, &p); QLineF axis_line(static_cast(*third), p); - DrawLine(this, axis_line, mainColor, lineStyle); + if (not axis_line.isNull()) + { + DrawLine(this, axis_line, mainColor, lineStyle); + } DrawPoint(point, p, mainColor); ShowIntersection(axis_line, base_line); diff --git a/src/libs/vwidgets/vgraphicssimpletextitem.cpp b/src/libs/vwidgets/vgraphicssimpletextitem.cpp index 9e4dd2769..c218f2afa 100644 --- a/src/libs/vwidgets/vgraphicssimpletextitem.cpp +++ b/src/libs/vwidgets/vgraphicssimpletextitem.cpp @@ -125,14 +125,17 @@ void VGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphic void VGraphicsSimpleTextItem::setEnabled(bool enabled) { QGraphicsSimpleTextItem::setEnabled(enabled); - const QPalette palet = this->scene()->palette(); - if (enabled) + if (this->scene()) { - setBrush(palet.brush(QPalette::Active, QPalette::Text)); - } - else - { - setBrush(palet.brush(QPalette::Disabled, QPalette::Text)); + const QPalette palet = this->scene()->palette(); + if (enabled) + { + setBrush(palet.brush(QPalette::Active, QPalette::Text)); + } + else + { + setBrush(palet.brush(QPalette::Disabled, QPalette::Text)); + } } } diff --git a/src/libs/vwidgets/vmaingraphicsscene.cpp b/src/libs/vwidgets/vmaingraphicsscene.cpp index 8e43d0c26..e15d474e2 100644 --- a/src/libs/vwidgets/vmaingraphicsscene.cpp +++ b/src/libs/vwidgets/vmaingraphicsscene.cpp @@ -221,9 +221,9 @@ void VMainGraphicsScene::InitOrigins() //--------------------------------------------------------------------------------------------------------------------- void VMainGraphicsScene::SetOriginsVisible(bool visible) { - for (auto item : qAsConst(origins)) + for (auto *item : qAsConst(origins)) { - if (item) + if (item != nullptr) { item->setVisible(visible); } diff --git a/src/test/ValentinaTest/share/Issue_642/output.json b/src/test/ValentinaTest/share/Issue_642/output.json index 6506b435d..5f4c32f0e 100644 --- a/src/test/ValentinaTest/share/Issue_642/output.json +++ b/src/test/ValentinaTest/share/Issue_642/output.json @@ -170,11 +170,6 @@ "x": 2797.5081938293038, "y": 711.5320126236637 }, - { - "type": "QPointF", - "x": 2797.565477459869, - "y": 778.332404004272 - }, { "type": "QPointF", "x": 2798.0441679430687, diff --git a/src/test/ValentinaTest/share/Issue_923_test1/output.json b/src/test/ValentinaTest/share/Issue_923_test1/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test1/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test1/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test1_1/output.json b/src/test/ValentinaTest/share/Issue_923_test1_1/output.json index 5d67403ad..4e430f2e4 100644 --- a/src/test/ValentinaTest/share/Issue_923_test1_1/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test1_1/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test2/output.json b/src/test/ValentinaTest/share/Issue_923_test2/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test2/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test2/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test2_2/output.json b/src/test/ValentinaTest/share/Issue_923_test2_2/output.json index 71edb7b5f..e5c388220 100644 --- a/src/test/ValentinaTest/share/Issue_923_test2_2/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test2_2/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test3/output.json b/src/test/ValentinaTest/share/Issue_923_test3/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test3/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test3/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test3_3/output.json b/src/test/ValentinaTest/share/Issue_923_test3_3/output.json index 9b6f4da36..6c5d49e6d 100644 --- a/src/test/ValentinaTest/share/Issue_923_test3_3/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test3_3/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test4/output.json b/src/test/ValentinaTest/share/Issue_923_test4/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test4/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test4/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test4_4/output.json b/src/test/ValentinaTest/share/Issue_923_test4_4/output.json index 6feafaec9..7e60ea6ff 100644 --- a/src/test/ValentinaTest/share/Issue_923_test4_4/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test4_4/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test5/output.json b/src/test/ValentinaTest/share/Issue_923_test5/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test5/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test5/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test5_5/output.json b/src/test/ValentinaTest/share/Issue_923_test5_5/output.json index f6882ee98..a84ce9e69 100644 --- a/src/test/ValentinaTest/share/Issue_923_test5_5/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test5_5/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test6/output.json b/src/test/ValentinaTest/share/Issue_923_test6/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test6/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test6/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test6_6/output.json b/src/test/ValentinaTest/share/Issue_923_test6_6/output.json index 3f9e74ba8..2f26e2a63 100644 --- a/src/test/ValentinaTest/share/Issue_923_test6_6/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test6_6/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test7_1/output.json b/src/test/ValentinaTest/share/Issue_923_test7_1/output.json index a5ba6f90e..7d051d299 100644 --- a/src/test/ValentinaTest/share/Issue_923_test7_1/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test7_1/output.json @@ -97,13 +97,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -142,13 +137,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test7_2/output.json b/src/test/ValentinaTest/share/Issue_923_test7_2/output.json index 9b5689717..1f24dd696 100644 --- a/src/test/ValentinaTest/share/Issue_923_test7_2/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test7_2/output.json @@ -102,13 +102,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -147,13 +142,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test7_3/output.json b/src/test/ValentinaTest/share/Issue_923_test7_3/output.json index 171b3ead6..6b20ebe41 100644 --- a/src/test/ValentinaTest/share/Issue_923_test7_3/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test7_3/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/doll/output.json b/src/test/ValentinaTest/share/doll/output.json index c87cc2e59..69c139cbb 100644 --- a/src/test/ValentinaTest/share/doll/output.json +++ b/src/test/ValentinaTest/share/doll/output.json @@ -110,11 +110,6 @@ "x": 330.9882848734929, "y": 102.87077188278468 }, - { - "type": "QPointF", - "x": 331.48273454480426, - "y": 104.45283583549359 - }, { "type": "QPointF", "x": 332.2173315417802, diff --git a/src/test/ValentinaTest/share/loop_by_intersection/output.json b/src/test/ValentinaTest/share/loop_by_intersection/output.json index 831721c92..2e9573b39 100644 --- a/src/test/ValentinaTest/share/loop_by_intersection/output.json +++ b/src/test/ValentinaTest/share/loop_by_intersection/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": -214.69613672918854, - "y": 105.50483675932705 + "x": -216.6438440863518, + "y": 101.30502907435505 }, { "type": "QPointF", - "x": -217.06541703221671, - "y": -20.396250591591283 + "x": -215.90873077439113, + "y": -22.890393162266093 }, { "type": "QPointF", @@ -292,8 +292,8 @@ }, { "type": "QPointF", - "x": -214.69613672918854, - "y": 105.50483675932705 + "x": -216.6438440863518, + "y": 101.30502907435505 } ] } diff --git a/src/test/ValentinaTest/share/loop_start_point_on_line/output.json b/src/test/ValentinaTest/share/loop_start_point_on_line/output.json index 2d339d6fc..80052e138 100644 --- a/src/test/ValentinaTest/share/loop_start_point_on_line/output.json +++ b/src/test/ValentinaTest/share/loop_start_point_on_line/output.json @@ -17,18 +17,18 @@ }, { "type": "QPointF", - "x": -2083.1478929409827, - "y": -1220.0868889606825 + "x": -2082.7202896908407, + "y": -1220.2021340324343 }, { "type": "QPointF", - "x": -2056.8141936259476, - "y": -1225.6770902684877 + "x": -2057.1296527192585, + "y": -1225.0231603699012 }, { "type": "QPointF", - "x": -2029.2249477701505, - "y": -1230.8064422813395 + "x": -2030.268678428484, + "y": -1230.6480813100734 }, { "type": "QPointF", @@ -120,11 +120,6 @@ "x": -1592.433553865018, "y": -1150.9286376239052 }, - { - "type": "QPointF", - "x": -1581.1249477487709, - "y": -1139.9848040550612 - }, { "type": "QPointF", "x": -1574.7272893318411, @@ -310,11 +305,6 @@ "x": -1984.5634596707787, "y": -98.8935172003726 }, - { - "type": "QPointF", - "x": -1990.4276010223648, - "y": -91.09922907737571 - }, { "type": "QPointF", "x": -1997.2051328041664, diff --git a/src/test/ValentinaTest/share/seamtest1_by_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_angle/output.json index 51d6dcf24..8aa772728 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_angle/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -67,13 +67,13 @@ }, { "type": "QPointF", - "x": 285.16939607807865, - "y": -68.91025714339723 + "x": 285.54316176628, + "y": -69.17631403269839 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -82,13 +82,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -225,21 +225,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, @@ -262,18 +252,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json b/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json index 7e2ce0cfa..3747f8864 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json @@ -2,8 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 1117.7037149530322, - "y": 212.15307563552173 + "x": 586.285424563237, + "y": -21.503347379130616 + }, + { + "type": "QPointF", + "x": 1117.8412466375905, + "y": 211.8698223696717 }, { "type": "QPointF", @@ -102,8 +107,8 @@ }, { "type": "QPointF", - "x": 1020.6660121283516, - "y": 644.7426504865729 + "x": 1020.5214918560622, + "y": 644.8368304816686 }, { "type": "QPointF", @@ -140,21 +145,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, @@ -177,23 +172,23 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -252,13 +247,13 @@ }, { "type": "QPointF", - "x": 285.16939607807876, - "y": -68.9102571433973 + "x": 285.5431617662801, + "y": -69.17631403269846 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837736 + "x": 557.0289896899872, + "y": -31.71862328205886 }, { "type": "QPointF", @@ -267,13 +262,8 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.217486096297492 - }, - { - "type": "QPointF", - "x": 1117.7037149530322, - "y": 212.15307563552173 + "x": 586.285424563237, + "y": -21.503347379130616 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json b/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json index 6c23608ec..ca45ada65 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -77,18 +77,18 @@ }, { "type": "QPointF", - "x": 330.2597593313006, - "y": -109.8693765699337 + "x": 330.5479727319059, + "y": -110.14723735764198 }, { "type": "QPointF", - "x": 335.08623255837216, - "y": -62.0230857634808 + "x": 335.3744459589775, + "y": -62.300946551189064 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -97,13 +97,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -240,21 +240,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, @@ -277,18 +267,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json index ed69f50c4..a3f1826e3 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -77,18 +77,18 @@ }, { "type": "QPointF", - "x": 308.85408734019427, - "y": -89.2325953918828 + "x": 309.14230074079956, + "y": -89.51045617959079 }, { "type": "QPointF", - "x": 335.0862325583717, - "y": -62.023085763480815 + "x": 335.3744459589773, + "y": -62.30094655118904 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -97,13 +97,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -240,21 +240,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, @@ -277,18 +267,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json b/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json index 1fa3de755..302c19b9a 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -72,13 +72,13 @@ }, { "type": "QPointF", - "x": 335.08623255837205, - "y": -62.023085763480815 + "x": 335.37444595897745, + "y": -62.300946551189064 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -87,13 +87,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -230,21 +230,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, @@ -267,18 +257,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json b/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json index b1182dcbc..364d6177b 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -72,13 +72,8 @@ }, { "type": "QPointF", - "x": 286.5647821037859, - "y": -68.71773166746928 - }, - { - "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -87,13 +82,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -230,21 +225,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, @@ -267,18 +252,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json index 83784e3b1..1f6276175 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -67,18 +67,18 @@ }, { "type": "QPointF", - "x": 284.4390076163077, - "y": -68.44485122652873 + "x": 284.4072000868026, + "y": -68.45268234011405 }, { "type": "QPointF", - "x": 284.5734311894892, - "y": -68.99248415563486 + "x": 284.6164363645234, + "y": -69.30417703672788 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -87,13 +87,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -230,21 +230,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, @@ -267,18 +257,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json b/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json index 456c459cf..c6c66a011 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json @@ -260,11 +260,6 @@ "x": 954.9126743758827, "y": 1599.02515094508 }, - { - "type": "QPointF", - "x": 941.1480338176947, - "y": 1598.7097479128342 - }, { "type": "QPointF", "x": 929.6966471777685, diff --git a/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json b/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json index dbb6c7b63..e0af32b77 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json @@ -2,23 +2,18 @@ "vector": [ { "type": "QPointF", - "x": 692.3263132377243, - "y": 425.0598484090772 + "x": 692.3267996783844, + "y": 425.0547824881589 }, { "type": "QPointF", - "x": 729.9485435174106, - "y": 428.6724161589221 + "x": 729.9490299580725, + "y": 428.66735023800396 }, { "type": "QPointF", - "x": 902.8367306099547, - "y": 438.0946986997068 - }, - { - "type": "QPointF", - "x": 1047.2274990256597, - "y": 444.9608350659975 + "x": 1047.3703808444025, + "y": 444.96790138807927 }, { "type": "QPointF", @@ -47,8 +42,8 @@ }, { "type": "QPointF", - "x": 1779.204057451268, - "y": 460.15036806979015 + "x": 1779.4842113185928, + "y": 460.1465274137461 }, { "type": "QPointF", @@ -117,8 +112,8 @@ }, { "type": "QPointF", - "x": 1986.4149731529892, - "y": 1450.5996057600491 + "x": 1986.415017807355, + "y": 1450.5995504284354 }, { "type": "QPointF", @@ -142,8 +137,8 @@ }, { "type": "QPointF", - "x": 2100.6375771334715, - "y": 1515.7770650603459 + "x": 2101.0413693548594, + "y": 1515.9306231177372 }, { "type": "QPointF", @@ -197,8 +192,8 @@ }, { "type": "QPointF", - "x": 692.3263132377243, - "y": 425.0598484090772 + "x": 692.3267996783844, + "y": 425.0547824881589 } ] } diff --git a/src/test/ValentinaTest/share/smart_pattern_#133/input.json b/src/test/ValentinaTest/share/smart_pattern_#133/input.json new file mode 100644 index 000000000..2d5ec1350 --- /dev/null +++ b/src/test/ValentinaTest/share/smart_pattern_#133/input.json @@ -0,0 +1,286 @@ +{ + "vector": [ + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 2929.9770747304974, + "y": -276.4297327130487 + }, + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 2929.494592436758, + "y": -276.7606225402938 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3020.6267648722614, + "y": -214.2615232263168 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3088.3164558816297, + "y": -169.50935896803173 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3129.0516855236456, + "y": -143.6575896644236 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3146.9122431535925, + "y": -132.85807100626303 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3182.3207891081, + "y": -111.31224886884328 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3240.854911582732, + "y": -74.8319142840869 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3282.194746084433, + "y": -49.82580136992735 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3310.2958622918845, + "y": -33.638475438863175 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3310.2958622918845, + "y": -33.638475438863175 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3310.2958622918845, + "y": -33.638475438863175 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3325.1763277140276, + "y": -25.257860139156612 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3369.4782848426557, + "y": -2.0857627157284724 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3403.4016107132747, + "y": 13.705195402949922 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3426.2415849998115, + "y": 23.34654364295037 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3449.230881619873, + "y": 32.10024036139115 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3472.3293291198524, + "y": 39.84657654277807 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3483.9089681080395, + "y": 43.255120195555406 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3483.9089681080395, + "y": 43.255120195555406 + }, + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 3447.5678964202975, + "y": 170.44883665362593 + }, + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 3447.5678964202975, + "y": 170.44883665362593 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3389.1244783120674, + "y": 153.77793257366946 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3252.3200130171417, + "y": 115.54965743238373 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3247.8444514992034, + "y": 114.3583692773959 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3247.8444514992034, + "y": 114.3583692773959 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3247.8444514992034, + "y": 114.3583692773959 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3173.1572046119477, + "y": 94.31817557366725 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3147.756296486791, + "y": 88.1473890182314 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3122.245206035337, + "y": 82.25776665675014 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3041.9854088227075, + "y": 64.30895193326627 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2972.2752985376483, + "y": 49.89666830709157 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2927.2740602422737, + "y": 41.446379094112636 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2886.864263786687, + "y": 34.93216727832491 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2854.15352003896, + "y": 31.234718533530163 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2842.1714408688977, + "y": 30.88990256838886 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2842.1714408688977, + "y": 30.88990256838886 + } + ] +} diff --git a/src/test/ValentinaTest/share/smart_pattern_#133/output.json b/src/test/ValentinaTest/share/smart_pattern_#133/output.json new file mode 100644 index 000000000..8fff4d070 --- /dev/null +++ b/src/test/ValentinaTest/share/smart_pattern_#133/output.json @@ -0,0 +1,144 @@ +{ + "vector": [ + { + "type": "QPointF", + "x": 2914.8751101032244, + "y": -322.14660963573755 + }, + { + "type": "QPointF", + "x": 2940.3264245982937, + "y": -314.92253942662785 + }, + { + "type": "QPointF", + "x": 3041.9531023346835, + "y": -245.46521190898392 + }, + { + "type": "QPointF", + "x": 3108.6971255127173, + "y": -200.96114841642915 + }, + { + "type": "QPointF", + "x": 3148.9580710534224, + "y": -175.78835654256642 + }, + { + "type": "QPointF", + "x": 3201.9395957269226, + "y": -143.55493133873182 + }, + { + "type": "QPointF", + "x": 3261.1271882374804, + "y": -107.36170019590531 + }, + { + "type": "QPointF", + "x": 3301.3564050369955, + "y": -82.40696567509488 + }, + { + "type": "QPointF", + "x": 3343.3191765382894, + "y": -58.4213684718917 + }, + { + "type": "QPointF", + "x": 3386.2208551896647, + "y": -35.981685402091905 + }, + { + "type": "QPointF", + "x": 3418.7308452277093, + "y": -20.848620528460394 + }, + { + "type": "QPointF", + "x": 3440.319979440316, + "y": -11.735284474201483 + }, + { + "type": "QPointF", + "x": 3461.9693959581145, + "y": -3.4917775300772096 + }, + { + "type": "QPointF", + "x": 3483.678198210371, + "y": 3.788524764758021 + }, + { + "type": "QPointF", + "x": 3519.731204659397, + "y": 14.18111796688273 + }, + { + "type": "QPointF", + "x": 3462.6234754097254, + "y": 214.0581162062353 + }, + { + "type": "QPointF", + "x": 3378.7569662168626, + "y": 190.12346255909503 + }, + { + "type": "QPointF", + "x": 3242.1482695261966, + "y": 151.95046087571671 + }, + { + "type": "QPointF", + "x": 3163.799392078877, + "y": 130.9394133995313 + }, + { + "type": "QPointF", + "x": 3138.833989122527, + "y": 124.87442658272099 + }, + { + "type": "QPointF", + "x": 3034.0345168547487, + "y": 101.25971932387034 + }, + { + "type": "QPointF", + "x": 2964.9609699226594, + "y": 86.97904259878241 + }, + { + "type": "QPointF", + "x": 2920.7778125684367, + "y": 78.68237183752217 + }, + { + "type": "QPointF", + "x": 2881.731281757689, + "y": 72.38792359271476 + }, + { + "type": "QPointF", + "x": 2851.4826590738026, + "y": 68.96877993652426 + }, + { + "type": "QPointF", + "x": 2831.5261872065494, + "y": 68.39447976624034 + }, + { + "type": "QPointF", + "x": 2806.07487271148, + "y": 61.17040955713102 + }, + { + "type": "QPointF", + "x": 2914.8751101032244, + "y": -322.14660963573755 + } + ] +} diff --git a/src/test/ValentinaTest/share/smart_pattern_#36/input.json b/src/test/ValentinaTest/share/smart_pattern_#36/input.json index 539ab800f..c884f25b1 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#36/input.json +++ b/src/test/ValentinaTest/share/smart_pattern_#36/input.json @@ -246,21 +246,6 @@ "x": 30, "y": 22311.722834645672 }, - { - "type": "VSAPoint", - "x": 29.26377334895059, - "y": 22341.839586718215 - }, - { - "type": "VSAPoint", - "x": 29.26377334895059, - "y": 22341.839586718215 - }, - { - "type": "VSAPoint", - "x": 29.26377334895059, - "y": 22341.839586718215 - }, { "angle": 6, "type": "VSAPoint", @@ -291,6 +276,21 @@ "x": 21.970984779797945, "y": 22564.876825218627 }, + { + "type": "VSAPoint", + "x": 20.500199521052405, + "y": 22612.757327074407 + }, + { + "type": "VSAPoint", + "x": 20.500199521052405, + "y": 22612.757327074407 + }, + { + "type": "VSAPoint", + "x": 20.500199521052405, + "y": 22612.757327074407 + }, { "angle": 6, "type": "VSAPoint", diff --git a/src/test/ValentinaTest/share/smart_pattern_#36/output.json b/src/test/ValentinaTest/share/smart_pattern_#36/output.json index 73cd953c9..dc94f7c47 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#36/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#36/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": -218.88332702810496, - "y": 21602.601187587297 + "x": -216.57559446259248, + "y": 21608.014646112726 }, { "type": "QPointF", - "x": -222.85996685366638, - "y": 21586.28344916246 + "x": -222.82601779268137, + "y": 21587.061010495858 }, { "type": "QPointF", @@ -132,8 +132,8 @@ }, { "type": "QPointF", - "x": 55.849455392117505, - "y": 22133.479634813404 + "x": 55.82641527988781, + "y": 22132.93457364255 }, { "type": "QPointF", @@ -152,8 +152,8 @@ }, { "type": "QPointF", - "x": 55.826415279887826, - "y": 22490.511095648795 + "x": 55.84945539211752, + "y": 22489.96603447794 }, { "type": "QPointF", @@ -282,18 +282,13 @@ }, { "type": "QPointF", - "x": -220.620815347658, - "y": 23026.447080003007 + "x": -220.46264595849237, + "y": 23025.538326035232 }, { "type": "QPointF", - "x": -216.13435317554772, - "y": 23014.48384648047 - }, - { - "type": "QPointF", - "x": -202.58580499399324, - "y": 22985.400282661478 + "x": -202.6052425243754, + "y": 22985.452196583858 }, { "type": "QPointF", @@ -347,8 +342,8 @@ }, { "type": "QPointF", - "x": -115.32578480080944, - "y": 22485.162420331548 + "x": -115.33334113373941, + "y": 22485.70747025547 }, { "type": "QPointF", @@ -367,8 +362,8 @@ }, { "type": "QPointF", - "x": -115.33334113373941, - "y": 22137.738199035874 + "x": -115.32578480080944, + "y": 22138.283248959797 }, { "type": "QPointF", @@ -422,13 +417,13 @@ }, { "type": "QPointF", - "x": -202.6152214315237, - "y": 21637.97693416576 + "x": -202.58580499399324, + "y": 21638.045386629867 }, { "type": "QPointF", - "x": -218.88332702810496, - "y": 21602.601187587297 + "x": -216.57559446259248, + "y": 21608.014646112726 } ] } diff --git a/src/test/ValentinaTest/share/smart_pattern_#99/output.json b/src/test/ValentinaTest/share/smart_pattern_#99/output.json index b6cd8bac8..a7b3ce448 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#99/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#99/output.json @@ -2,38 +2,38 @@ "vector": [ { "type": "QPointF", - "x": 166.2793358771866, - "y": 317.0063195835933 + "x": 166.02062314300517, + "y": 312.9788859158875 }, { "type": "QPointF", - "x": 165.64505339863834, - "y": 297.1143398796336 + "x": 165.70933046188543, + "y": 293.23000247811854 }, { "type": "QPointF", - "x": 166.1722452473025, - "y": 280.2244654294098 + "x": 167.30604170523088, + "y": 274.50013264093303 }, { "type": "QPointF", - "x": 166.16205798196063, - "y": 276.72549910116425 + "x": 167.19749972538847, + "y": 269.95767347494336 }, { "type": "QPointF", - "x": 168.97844031610092, - "y": 256.82932371757767 + "x": 167.28869518172655, + "y": 266.6239856783655 }, { "type": "QPointF", - "x": 173.11677764302698, - "y": 240.88394423619718 + "x": 171.2459135294844, + "y": 247.0901582437869 }, { "type": "QPointF", - "x": 178.0948003175508, - "y": 228.9419652712462 + "x": 176.64841312963426, + "y": 231.89367477880018 }, { "type": "QPointF", @@ -47,8 +47,8 @@ }, { "type": "QPointF", - "x": 185.99757111618186, - "y": 217.49928602474253 + "x": 186.39376078521363, + "y": 217.17940045276504 }, { "type": "QPointF", @@ -82,18 +82,13 @@ }, { "type": "QPointF", - "x": 255.24575032218632, - "y": 191.05145610681262 + "x": 258.32256210111353, + "y": 190.9510874021363 }, { "type": "QPointF", - "x": 277.95765129804875, - "y": 191.65321329780488 - }, - { - "type": "QPointF", - "x": 285.5408358146581, - "y": 192.855354584027 + "x": 282.88849327137484, + "y": 192.3327170360014 }, { "type": "QPointF", @@ -107,28 +102,28 @@ }, { "type": "QPointF", - "x": 308.61498933509586, - "y": 205.17662895779023 + "x": 310.57923284664963, + "y": 206.8104493101314 }, { "type": "QPointF", - "x": 317.8211186961886, - "y": 213.7039790657329 + "x": 320.37180984256605, + "y": 216.47325684819089 }, { "type": "QPointF", - "x": 326.23567071378, - "y": 223.57518983261718 + "x": 328.8995060022702, + "y": 227.14525040044498 }, { "type": "QPointF", - "x": 335.7687333062743, - "y": 237.32368245582865 + "x": 337.94611732452876, + "y": 240.8170859291849 }, { "type": "QPointF", - "x": 351.5894679236029, - "y": 263.84403704994895 + "x": 351.57469774103606, + "y": 263.8115467734212 }, { "type": "QPointF", @@ -167,8 +162,8 @@ }, { "type": "QPointF", - "x": 371.3330132939416, - "y": 177.8252966333725 + "x": 374.66587589785377, + "y": 175.5116088179777 }, { "type": "QPointF", @@ -177,13 +172,8 @@ }, { "type": "QPointF", - "x": 401.24232600874655, - "y": 162.09376642883635 - }, - { - "type": "QPointF", - "x": 416.5041370775075, - "y": 156.9754834453434 + "x": 400.5329831004733, + "y": 162.36522176917418 }, { "type": "QPointF", @@ -197,28 +187,23 @@ }, { "type": "QPointF", - "x": 434.6801823142321, - "y": 153.28952836821526 + "x": 438.0633612753594, + "y": 153.03192944510397 }, { "type": "QPointF", - "x": 448.33671251987124, - "y": 152.809882511774 + "x": 455.2191266225963, + "y": 153.05624563323727 }, { "type": "QPointF", - "x": 465.38530369692694, - "y": 154.00600077743474 + "x": 472.13962450478647, + "y": 155.14589827825722 }, { "type": "QPointF", - "x": 475.68791359201066, - "y": 155.9902739944185 - }, - { - "type": "QPointF", - "x": 484.19308368052646, - "y": 159.05322984284635 + "x": 482.43834619808706, + "y": 158.29886734863854 }, { "type": "QPointF", @@ -237,18 +222,18 @@ }, { "type": "QPointF", - "x": 529.6792386289801, - "y": 203.52841021677506 + "x": 536.0426969749838, + "y": 211.60401356856727 }, { "type": "QPointF", - "x": 559.7613549461172, - "y": 242.4936218299132 + "x": 559.4375896091323, + "y": 242.04457762986158 }, { "type": "QPointF", - "x": 569.5835818133556, - "y": 257.3121087709943 + "x": 569.311475660773, + "y": 256.86701943291433 }, { "type": "QPointF", @@ -257,13 +242,8 @@ }, { "type": "QPointF", - "x": 585.014909318949, - "y": 286.9983512578358 - }, - { - "type": "QPointF", - "x": 591.1019941479228, - "y": 302.05819169893664 + "x": 586.6374302807619, + "y": 290.77190755205044 }, { "type": "QPointF", @@ -277,28 +257,23 @@ }, { "type": "QPointF", - "x": 591.4691411901464, - "y": 336.9021533252068 + "x": 590.6510591717047, + "y": 340.91518746861993 }, { "type": "QPointF", - "x": 587.7772567627065, - "y": 353.05391040771735 + "x": 585.4872424358157, + "y": 361.2157855904426 }, { "type": "QPointF", - "x": 582.8754009676815, - "y": 369.4196601831339 + "x": 579.9229547052828, + "y": 377.65318039832954 }, { "type": "QPointF", - "x": 576.3979894710554, - "y": 386.4062544290843 - }, - { - "type": "QPointF", - "x": 568.7091425226228, - "y": 402.8846548007183 + "x": 571.8578768835727, + "y": 396.3873347680203 }, { "type": "QPointF", @@ -312,68 +287,68 @@ }, { "type": "QPointF", - "x": 528.3345265604034, - "y": 476.92160008646584 + "x": 526.817689287619, + "y": 478.6960129039927 }, { "type": "QPointF", - "x": 520.2343656529063, - "y": 485.0367289659276 + "x": 519.0740546654762, + "y": 485.9591789956344 }, { "type": "QPointF", - "x": 513.148845575274, - "y": 489.9896405767957 + "x": 509.94726195445895, + "y": 491.73200570919147 }, { "type": "QPointF", - "x": 505.5219398390943, - "y": 493.75314459015317 + "x": 499.48882330035383, + "y": 496.0219887131292 }, { "type": "QPointF", - "x": 493.1624730540218, - "y": 498.00078352401664 + "x": 483.1823868029168, + "y": 500.5066198031956 }, { "type": "QPointF", - "x": 476.32590489565666, - "y": 501.8211255823292 + "x": 469.31906002715755, + "y": 502.76699104452376 }, { "type": "QPointF", - "x": 465.68981801438673, - "y": 503.0580521806556 + "x": 458.61213259187986, + "y": 503.1196305607171 }, { "type": "QPointF", - "x": 454.9458499674166, - "y": 502.9444423349683 + "x": 443.8536819162971, + "y": 501.9185119737654 }, { "type": "QPointF", - "x": 439.3060103264079, - "y": 501.3191976012906 + "x": 427.1929958670552, + "y": 499.2248924703412 }, { "type": "QPointF", - "x": 423.2043144587875, - "y": 498.34929359863105 + "x": 415.2822129385592, + "y": 496.2167954717386 }, { "type": "QPointF", - "x": 411.3722974923289, - "y": 494.89048056695367 + "x": 405.51268591803284, + "y": 492.34625734655305 }, { "type": "QPointF", - "x": 404.0462328838181, - "y": 491.56426076213603 + "x": 399.1440538155622, + "y": 488.76255604621974 }, { "type": "QPointF", - "x": 397.6192436403225, - "y": 487.3958668879086 + "x": 397.651509179127, + "y": 487.0589090075787 }, { "type": "QPointF", @@ -382,23 +357,28 @@ }, { "type": "QPointF", - "x": 389.46280257533397, - "y": 476.7991800818359 + "x": 388.7637811139682, + "y": 475.5345799921174 }, { "type": "QPointF", - "x": 385.21740968628404, - "y": 467.7455266773488 + "x": 384.02761759391484, + "y": 464.5866207957423 }, { "type": "QPointF", - "x": 381.98288724618385, - "y": 458.53069141599417 + "x": 380.4304614262938, + "y": 453.47849078579617 }, { "type": "QPointF", - "x": 368.3461454578772, - "y": 411.2975955501923 + "x": 368.49295008766654, + "y": 411.6985932639229 + }, + { + "type": "QPointF", + "x": 367.6462390140756, + "y": 411.29354992278223 }, { "type": "QPointF", @@ -407,8 +387,8 @@ }, { "type": "QPointF", - "x": 354.94905309156206, - "y": 444.28762369139116 + "x": 355.1561846360663, + "y": 443.7676398081635 }, { "type": "QPointF", @@ -417,13 +397,13 @@ }, { "type": "QPointF", - "x": 340.52244605437, - "y": 471.85996007627705 + "x": 339.0381408643451, + "y": 473.9103469636046 }, { "type": "QPointF", - "x": 332.3013407792153, - "y": 481.91406607342856 + "x": 328.4003671533969, + "y": 485.7230912940063 }, { "type": "QPointF", @@ -432,13 +412,13 @@ }, { "type": "QPointF", - "x": 308.4504919589761, - "y": 496.94455134299847 + "x": 306.70041004704234, + "y": 497.47875631537966 }, { "type": "QPointF", - "x": 293.41117665937344, - "y": 500.741531068732 + "x": 290.47717224660175, + "y": 501.3077427754172 }, { "type": "QPointF", @@ -467,48 +447,48 @@ }, { "type": "QPointF", - "x": 220.20894480356736, - "y": 493.9717974895532 + "x": 219.11733302477276, + "y": 493.5618654509618 }, { "type": "QPointF", - "x": 214.23653207492043, - "y": 491.72898244053755 + "x": 212.63608885738194, + "y": 490.0800375140309 }, { "type": "QPointF", - "x": 199.2867956563084, - "y": 474.27137643587264 + "x": 202.91098065710946, + "y": 479.33521360057284 }, { "type": "QPointF", - "x": 193.05436777423637, - "y": 463.35364232842176 + "x": 196.03783581368415, + "y": 468.9566791455622 }, { "type": "QPointF", - "x": 186.4552262793201, - "y": 447.9927324953534 + "x": 188.96153147430664, + "y": 454.3702537301474 }, { "type": "QPointF", - "x": 181.07652203439048, - "y": 431.23130737455057 + "x": 183.1651247359179, + "y": 438.3396830609576 }, { "type": "QPointF", - "x": 176.74074040059125, - "y": 412.44411172139985 + "x": 178.31430533286823, + "y": 420.11842584896306 }, { "type": "QPointF", - "x": 174.31642834550638, - "y": 396.57264472089304 + "x": 174.82594122279494, + "y": 400.59766857295676 }, { "type": "QPointF", - "x": 166.2793358771866, - "y": 317.0063195835933 + "x": 166.02062314300517, + "y": 312.9788859158875 } ] } diff --git a/src/test/ValentinaTest/share/test_data.qrc b/src/test/ValentinaTest/share/test_data.qrc index b0e383255..87be7733a 100644 --- a/src/test/ValentinaTest/share/test_data.qrc +++ b/src/test/ValentinaTest/share/test_data.qrc @@ -143,5 +143,9 @@ smart_pattern_#120_piece_1/output.json smart_pattern_#120_piece_2/input.json smart_pattern_#120_piece_2/output.json + smart_pattern_#133/input.json + smart_pattern_#133/output.json + valid_allowance_case3/allowance.json + valid_allowance_case3/base.json diff --git a/src/test/ValentinaTest/share/valid_allowance_case3/allowance.json b/src/test/ValentinaTest/share/valid_allowance_case3/allowance.json new file mode 100644 index 000000000..eac899766 --- /dev/null +++ b/src/test/ValentinaTest/share/valid_allowance_case3/allowance.json @@ -0,0 +1,389 @@ +{ + "vector": [ + { + "type": "QPointF", + "x": 92.52561994759033, + "y": 2202.2061793579987 + }, + { + "type": "QPointF", + "x": 92.2772790878172, + "y": 1326.7170103448875 + }, + { + "type": "QPointF", + "x": 91.97507683533829, + "y": 261.34742461356785 + }, + { + "type": "QPointF", + "x": 106.8818073273175, + "y": 259.98160041743677 + }, + { + "type": "QPointF", + "x": 137.38232324564848, + "y": 255.0603139564763 + }, + { + "type": "QPointF", + "x": 158.17729436344507, + "y": 249.89617336979745 + }, + { + "type": "QPointF", + "x": 171.13588768568093, + "y": 245.8762939360861 + }, + { + "type": "QPointF", + "x": 183.5441878371626, + "y": 241.3114353974675 + }, + { + "type": "QPointF", + "x": 195.32179015503095, + "y": 236.24278356546813 + }, + { + "type": "QPointF", + "x": 206.49141930179945, + "y": 230.67800026587307 + }, + { + "type": "QPointF", + "x": 217.07741190258892, + "y": 224.62200069789338 + }, + { + "type": "QPointF", + "x": 227.10500822940557, + "y": 218.07654031559593 + }, + { + "type": "QPointF", + "x": 236.5994666818242, + "y": 211.04004206628608 + }, + { + "type": "QPointF", + "x": 245.58509742928743, + "y": 203.50772328639982 + }, + { + "type": "QPointF", + "x": 254.08433856460397, + "y": 195.47203389468186 + }, + { + "type": "QPointF", + "x": 262.1169987762586, + "y": 186.92336133325725 + }, + { + "type": "QPointF", + "x": 269.6209156939228, + "y": 177.94524558586846 + }, + { + "type": "QPointF", + "x": 280.24821231578767, + "y": 163.37755107526294 + }, + { + "type": "QPointF", + "x": 292.9139140638711, + "y": 141.85503520098874 + }, + { + "type": "QPointF", + "x": 303.86632681987686, + "y": 118.18371124945193 + }, + { + "type": "QPointF", + "x": 313.1867421043998, + "y": 92.23186854093896 + }, + { + "type": "QPointF", + "x": 320.93528277934104, + "y": 63.826799135622935 + }, + { + "type": "QPointF", + "x": 327.9396074726531, + "y": 33.63270638137283 + }, + { + "type": "QPointF", + "x": 331.47901542748485, + "y": 1.0285850987598408 + }, + { + "type": "QPointF", + "x": 334.4654936711189, + "y": -34.069089116676814 + }, + { + "type": "QPointF", + "x": 337.06492259413517, + "y": -89.88560581238215 + }, + { + "type": "QPointF", + "x": 755.0589593624836, + "y": 81.19608223354786 + }, + { + "type": "QPointF", + "x": 736.609138766886, + "y": 127.80263877573647 + }, + { + "type": "QPointF", + "x": 719.3604904848505, + "y": 178.08816959390435 + }, + { + "type": "QPointF", + "x": 703.0134745532514, + "y": 233.0508326580554 + }, + { + "type": "QPointF", + "x": 688.0700705174979, + "y": 290.15129975668845 + }, + { + "type": "QPointF", + "x": 675.0440800520552, + "y": 346.75662531853175 + }, + { + "type": "QPointF", + "x": 664.4353812232487, + "y": 400.2315392200221 + }, + { + "type": "QPointF", + "x": 656.7282750527801, + "y": 447.93899690683065 + }, + { + "type": "QPointF", + "x": 653.2594531347684, + "y": 477.88418396195357 + }, + { + "type": "QPointF", + "x": 652.0414453212609, + "y": 494.3897671909149 + }, + { + "type": "QPointF", + "x": 651.8060316356091, + "y": 510.4752049493997 + }, + { + "type": "QPointF", + "x": 653.3086426448241, + "y": 530.2043953624742 + }, + { + "type": "QPointF", + "x": 655.3752026443186, + "y": 545.8101384800652 + }, + { + "type": "QPointF", + "x": 658.5584573074667, + "y": 563.1680268477246 + }, + { + "type": "QPointF", + "x": 663.0015557834969, + "y": 581.6964468162018 + }, + { + "type": "QPointF", + "x": 668.852212781207, + "y": 600.9318511423511 + }, + { + "type": "QPointF", + "x": 676.2470115628831, + "y": 620.4200106226999 + }, + { + "type": "QPointF", + "x": 685.3103826896315, + "y": 639.7191723213771 + }, + { + "type": "QPointF", + "x": 696.1560114325907, + "y": 658.4074374442621 + }, + { + "type": "QPointF", + "x": 708.968803887299, + "y": 676.1977914955778 + }, + { + "type": "QPointF", + "x": 719.9264769666623, + "y": 688.5704353540432 + }, + { + "type": "QPointF", + "x": 727.7391818856612, + "y": 696.2478567357342 + }, + { + "type": "QPointF", + "x": 736.1962039308098, + "y": 703.5812938875612 + }, + { + "type": "QPointF", + "x": 745.2329152897552, + "y": 710.4460821458293 + }, + { + "type": "QPointF", + "x": 754.8814128293536, + "y": 716.8080984445425 + }, + { + "type": "QPointF", + "x": 765.1788854726277, + "y": 722.6321788768454 + }, + { + "type": "QPointF", + "x": 776.1671520789575, + "y": 727.8805981700134 + }, + { + "type": "QPointF", + "x": 787.891619425379, + "y": 732.5117038125346 + }, + { + "type": "QPointF", + "x": 800.3997769749498, + "y": 736.4789447545836 + }, + { + "type": "QPointF", + "x": 813.8809155042308, + "y": 739.76494255191 + }, + { + "type": "QPointF", + "x": 845.5484535894442, + "y": 745.6456405592226 + }, + { + "type": "QPointF", + "x": 841.4143655756919, + "y": 778.8837473816585 + }, + { + "type": "QPointF", + "x": 839.2350865290254, + "y": 805.1996178416854 + }, + { + "type": "QPointF", + "x": 835.9161011895001, + "y": 862.3048099622779 + }, + { + "type": "QPointF", + "x": 831.693873004494, + "y": 965.4116356694894 + }, + { + "type": "QPointF", + "x": 827.8540427601858, + "y": 1087.310954354911 + }, + { + "type": "QPointF", + "x": 823.114585595346, + "y": 1281.5741119146162 + }, + { + "type": "QPointF", + "x": 820.4843664787782, + "y": 1451.2417377419042 + }, + { + "type": "QPointF", + "x": 820.0163358596512, + "y": 1533.4268890124665 + }, + { + "type": "QPointF", + "x": 821.0509143011902, + "y": 1572.2505146663095 + }, + { + "type": "QPointF", + "x": 827.8638234577412, + "y": 1651.1597197912597 + }, + { + "type": "QPointF", + "x": 869.8910601743813, + "y": 2101.4232016478572 + }, + { + "type": "QPointF", + "x": 875.1648042331244, + "y": 2176.834879067045 + }, + { + "type": "QPointF", + "x": 813.9396120076474, + "y": 2181.83573701641 + }, + { + "type": "QPointF", + "x": 735.5341251972459, + "y": 2186.9448739581426 + }, + { + "type": "QPointF", + "x": 648.8793539199287, + "y": 2191.3042719247806 + }, + { + "type": "QPointF", + "x": 555.471196133076, + "y": 2194.926499889949 + }, + { + "type": "QPointF", + "x": 456.8424236034925, + "y": 2197.8182809981568 + }, + { + "type": "QPointF", + "x": 354.4554366585654, + "y": 2199.9847968442527 + }, + { + "type": "QPointF", + "x": 197.51793975963105, + "y": 2201.9649058358928 + }, + { + "type": "QPointF", + "x": 92.52561994759033, + "y": 2202.2061793579987 + } + ] +} diff --git a/src/test/ValentinaTest/share/valid_allowance_case3/base.json b/src/test/ValentinaTest/share/valid_allowance_case3/base.json new file mode 100644 index 000000000..7cb19ff06 --- /dev/null +++ b/src/test/ValentinaTest/share/valid_allowance_case3/base.json @@ -0,0 +1,399 @@ +{ + "vector": [ + { + "type": "QPointF", + "x": 93.34601574803145, + "y": 2126.6135433070867 + }, + { + "type": "QPointF", + "x": 93.34601574803145, + "y": 1559.684409448819 + }, + { + "type": "QPointF", + "x": 92.19617843603547, + "y": 705.8838909701382 + }, + { + "type": "QPointF", + "x": 92.57171849783603, + "y": 334.4903817714229 + }, + { + "type": "QPointF", + "x": 92.8636004614689, + "y": 287.83352776342883 + }, + { + "type": "QPointF", + "x": 110.19985000692739, + "y": 286.24509969651666 + }, + { + "type": "QPointF", + "x": 142.68693934522423, + "y": 281.0032777763672 + }, + { + "type": "QPointF", + "x": 165.290696688526, + "y": 275.3899503979951 + }, + { + "type": "QPointF", + "x": 179.62815627390916, + "y": 270.942333478028 + }, + { + "type": "QPointF", + "x": 193.34787262661484, + "y": 265.89502130992287 + }, + { + "type": "QPointF", + "x": 206.4586549775985, + "y": 260.25261726292615 + }, + { + "type": "QPointF", + "x": 218.96931255781567, + "y": 254.01972470628417 + }, + { + "type": "QPointF", + "x": 230.8886545982218, + "y": 247.2009470092434 + }, + { + "type": "QPointF", + "x": 242.22549032977236, + "y": 239.80088754105026 + }, + { + "type": "QPointF", + "x": 252.98862898342287, + "y": 231.82414967095104 + }, + { + "type": "QPointF", + "x": 263.1868797901287, + "y": 223.27533676819218 + }, + { + "type": "QPointF", + "x": 272.8290519808455, + "y": 214.15905220202012 + }, + { + "type": "QPointF", + "x": 281.9239547865287, + "y": 204.47989934168118 + }, + { + "type": "QPointF", + "x": 290.48039743813376, + "y": 194.2424815564218 + }, + { + "type": "QPointF", + "x": 302.389273453946, + "y": 177.91802257725897 + }, + { + "type": "QPointF", + "x": 316.3771086041528, + "y": 154.1488378881743 + }, + { + "type": "QPointF", + "x": 328.36966929524556, + "y": 128.22945414584296 + }, + { + "type": "QPointF", + "x": 338.43742937486826, + "y": 100.19669830423614 + }, + { + "type": "QPointF", + "x": 346.6508626906646, + "y": 70.08739731732494 + }, + { + "type": "QPointF", + "x": 353.08044309027844, + "y": 37.9383781390806 + }, + { + "type": "QPointF", + "x": 357.7966444213536, + "y": 3.7864677234742468 + }, + { + "type": "QPointF", + "x": 360.86994053153404, + "y": -32.331506975522956 + }, + { + "type": "QPointF", + "x": 361.74847243745114, + "y": -51.19587766869522 + }, + { + "type": "QPointF", + "x": 720.8335098627776, + "y": 95.77481796543057 + }, + { + "type": "QPointF", + "x": 711.7833466919931, + "y": 118.6366631172392 + }, + { + "type": "QPointF", + "x": 694.1575967053057, + "y": 170.02157048253167 + }, + { + "type": "QPointF", + "x": 677.5296945004579, + "y": 225.92864185095686 + }, + { + "type": "QPointF", + "x": 662.3755913618734, + "y": 283.8342144770952 + }, + { + "type": "QPointF", + "x": 649.1712385739754, + "y": 341.2146256155272 + }, + { + "type": "QPointF", + "x": 638.3925874211877, + "y": 395.5462125208335 + }, + { + "type": "QPointF", + "x": 630.5155891879336, + "y": 444.30531244759425 + }, + { + "type": "QPointF", + "x": 626.9150699255756, + "y": 475.3873989182334 + }, + { + "type": "QPointF", + "x": 625.5990148277461, + "y": 493.2216498238739 + }, + { + "type": "QPointF", + "x": 625.3346118384657, + "y": 511.2878799814551 + }, + { + "type": "QPointF", + "x": 626.9842617015943, + "y": 532.9476815302078 + }, + { + "type": "QPointF", + "x": 629.2338286370648, + "y": 549.9354117337174 + }, + { + "type": "QPointF", + "x": 632.6645776213952, + "y": 568.642855588862 + }, + { + "type": "QPointF", + "x": 637.4591049454809, + "y": 588.636789167028 + }, + { + "type": "QPointF", + "x": 643.8000069002165, + "y": 609.4839885396026 + }, + { + "type": "QPointF", + "x": 651.8698797764976, + "y": 630.7512297779718 + }, + { + "type": "QPointF", + "x": 661.8513198652188, + "y": 652.0052889535226 + }, + { + "type": "QPointF", + "x": 673.9269234572748, + "y": 672.8129421376415 + }, + { + "type": "QPointF", + "x": 688.2792868435611, + "y": 692.740965401715 + }, + { + "type": "QPointF", + "x": 700.728660557709, + "y": 706.7979340765864 + }, + { + "type": "QPointF", + "x": 709.7835961192387, + "y": 715.6960758355142 + }, + { + "type": "QPointF", + "x": 719.5104320429546, + "y": 724.1306216545854 + }, + { + "type": "QPointF", + "x": 729.9319928652181, + "y": 732.0474185427238 + }, + { + "type": "QPointF", + "x": 741.0711031223916, + "y": 739.3923135088523 + }, + { + "type": "QPointF", + "x": 752.9505873508364, + "y": 746.1111535618945 + }, + { + "type": "QPointF", + "x": 765.5932700869149, + "y": 752.1497857107736 + }, + { + "type": "QPointF", + "x": 779.0219758669887, + "y": 757.4540569644129 + }, + { + "type": "QPointF", + "x": 793.2595292274196, + "y": 761.9698143317357 + }, + { + "type": "QPointF", + "x": 808.3287547045696, + "y": 765.6429048216658 + }, + { + "type": "QPointF", + "x": 816.2184566929134, + "y": 767.1080314960631 + }, + { + "type": "QPointF", + "x": 815.0928241314082, + "y": 776.158127961756 + }, + { + "type": "QPointF", + "x": 812.8418244603739, + "y": 803.3400603715177 + }, + { + "type": "QPointF", + "x": 809.5039807203343, + "y": 860.7697229173427 + }, + { + "type": "QPointF", + "x": 805.2593754665681, + "y": 964.3281506300941 + }, + { + "type": "QPointF", + "x": 801.410474020859, + "y": 1086.4777243496678 + }, + { + "type": "QPointF", + "x": 796.6657651401786, + "y": 1280.9287465579719 + }, + { + "type": "QPointF", + "x": 794.0308545255843, + "y": 1450.8314875066817 + }, + { + "type": "QPointF", + "x": 793.5576303056135, + "y": 1533.703811210904 + }, + { + "type": "QPointF", + "x": 793.8519374393269, + "y": 1559.684409448819 + }, + { + "type": "QPointF", + "x": 794.6245773796793, + "y": 1573.7421032657548 + }, + { + "type": "QPointF", + "x": 801.5051913909572, + "y": 1653.4354868006676 + }, + { + "type": "QPointF", + "x": 843.5206921852375, + "y": 2103.581567208798 + }, + { + "type": "QPointF", + "x": 809.0163237412717, + "y": 2106.4056855746167 + }, + { + "type": "QPointF", + "x": 731.7317748936437, + "y": 2111.450016119814 + }, + { + "type": "QPointF", + "x": 645.9475353931566, + "y": 2115.770598189225 + }, + { + "type": "QPointF", + "x": 553.2539204606728, + "y": 2119.36847505834 + }, + { + "type": "QPointF", + "x": 455.24124531705513, + "y": 2122.2446900026507 + }, + { + "type": "QPointF", + "x": 353.499825183166, + "y": 2124.4002862976467 + }, + { + "type": "QPointF", + "x": 197.34423228847493, + "y": 2126.374554245388 + }, + { + "type": "QPointF", + "x": 93.34601574803145, + "y": 2126.6135433070867 + } + ] +} diff --git a/src/test/ValentinaTest/tst_vabstractpiece.cpp b/src/test/ValentinaTest/tst_vabstractpiece.cpp index 4a28780eb..9c08d4ba8 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.cpp +++ b/src/test/ValentinaTest/tst_vabstractpiece.cpp @@ -1053,6 +1053,12 @@ void TST_VAbstractPiece::EquidistantAngleType_data() QStringLiteral("://smart_pattern_#118/input.json"), QStringLiteral("://smart_pattern_#118/output.json"), 26.45669291338583 /*seam allowance width*/); + + // See file src/app/share/collection/bugs/smart_pattern_#133.val (private collection) + ASSERT_TEST_CASE("Эдит 1", + QStringLiteral("://smart_pattern_#133/input.json"), + QStringLiteral("://smart_pattern_#133/output.json"), + 26.45669291338583 /*seam allowance width*/); } //--------------------------------------------------------------------------------------------------------------------- @@ -1260,6 +1266,42 @@ void TST_VAbstractPiece::PossibleInfiniteClearLoops() const Comparison(res, expect); } +//--------------------------------------------------------------------------------------------------------------------- +void TST_VAbstractPiece::IsAllowanceValid_data() const +{ + QTest::addColumn>("base"); + QTest::addColumn>("allowance"); + QTest::addColumn("valid"); + + auto ASSERT_TEST_CASE = [this](const char *title, const QString &base, const QString &allowance, bool valid) + { + QVector basePoints; + AbstractTest::VectorFromJson(base, basePoints); + + QVector allowancePoints; + AbstractTest::VectorFromJson(allowance, allowancePoints); + + QTest::newRow(title) << basePoints << allowancePoints << valid ; + }; + + // See file src/app/share/collection/valid_allowance/case3.val (private collection) + ASSERT_TEST_CASE("Valid seam allowance. Case 3", + QStringLiteral("://valid_allowance_case3/base.json"), + QStringLiteral("://valid_allowance_case3/allowance.json"), + true); +} + +//--------------------------------------------------------------------------------------------------------------------- +void TST_VAbstractPiece::IsAllowanceValid() const +{ + QFETCH(QVector, base); + QFETCH(QVector, allowance); + QFETCH(bool, valid); + + bool result = VAbstractPiece::IsAllowanceValid(base, allowance); + QVERIFY(result == valid); +} + //--------------------------------------------------------------------------------------------------------------------- void TST_VAbstractPiece::Case3() const { diff --git a/src/test/ValentinaTest/tst_vabstractpiece.h b/src/test/ValentinaTest/tst_vabstractpiece.h index 0fceca326..fff210e94 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.h +++ b/src/test/ValentinaTest/tst_vabstractpiece.h @@ -61,6 +61,8 @@ private slots: void TestCorrectEquidistantPoints() const; void PossibleInfiniteClearLoops_data() const; void PossibleInfiniteClearLoops() const; + void IsAllowanceValid_data() const; + void IsAllowanceValid() const; private: QVector InputPointsCase3() const;