Compare commits

...

6 commits

Author SHA1 Message Date
Roman Telezhynskyi 225cb47f17 Fixed bug in seam allowance with mirror line. 2024-01-19 18:15:30 +02:00
Roman Telezhynskyi 25a8da8259 Add way to disable mirror line. 2024-01-19 17:54:33 +02:00
Roman Telezhynskyi f527c035bf Switching to MSVC. MinGW too slow. 2024-01-19 16:18:02 +02:00
Roman Telezhynskyi 23ccdf667d Polishing scripts. 2024-01-19 16:15:28 +02:00
Roman Telezhynskyi 6471840acf Save cache on error. 2024-01-19 16:14:48 +02:00
Roman Telezhynskyi 0524ae2d7c Call windeployqt only for release build. 2024-01-19 16:14:27 +02:00
7 changed files with 81 additions and 38 deletions

View file

@ -39,8 +39,29 @@ shallow_clone: false # default is "false"
environment:
ACCESS_TOKEN:
secure: RUhnEHqaR8KhalOMWwZZOoO342Ja50QV4KpEWdm9g3pG+jG7i6aJqUmeKF1l5VN6dzksk1u+yN6pOLnU8oGcaVQ6v+1dpKK1oZvF0tyHhNE=
APPVEYOR_SAVE_CACHE_ON_ERROR: "true"
matrix:
- job_name: Windows_Qt_6_5_(MSVC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
COMPILER: msvc
QT: Qt\6.5\msvc2019_64
QT_VERSION: Qt6_5
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
MSVC_PATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\Hostx64\\x64"
VSINSTALLDIR: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\"
ARCH: x64
PYTHON: "C:\\Python311-x64"
PLATFORM: "Windows10+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
- job_name: Windows_Qt_6_5_(GCC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
COMPILER: mingw
@ -59,6 +80,8 @@ environment:
CHOCOLATEY_PACKAGES: true
CHOCOLATEY_MINGW_VERSION: 13.2.0
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "false"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "true"
DEPLOY: true
RUN_TESTS: true
@ -131,6 +154,8 @@ environment:
PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
@ -158,24 +183,6 @@ environment:
PLATFORM: "Windows7+"
DEPLOY: false
- job_name: Windows_Qt_6_5_(MSVC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
COMPILER: msvc
QT: Qt\6.5\msvc2019_64
QT_VERSION: Qt6_5
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
MSVC_PATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\Hostx64\\x64"
VSINSTALLDIR: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\"
ARCH: x64
PYTHON: "C:\\Python311-x64"
PLATFORM: "Windows10+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
DEPLOY: false
RUN_TESTS: true
- job_name: Windows_Qt_5_15_(qbs_GCC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
@ -193,6 +200,8 @@ environment:
PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: false
RUN_TESTS: true
@ -211,6 +220,8 @@ environment:
PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: false
RUN_TESTS: true
@ -418,7 +429,7 @@ for:
build_script:
- conan profile list
- conan install . -s os=Windows --build=missing -pr valentina
- qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true modules.buildconfig.enableCcache:false project.conanProfiles:valentina modules.buildconfig.enablePCH:%ENABLE_PCH% modules.windeployqt.windeployqtProgramBinPath:%WINDEPLOYQT_BIN_PATH%
- qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true modules.buildconfig.enableCcache:false project.conanProfiles:valentina modules.buildconfig.enablePCH:%ENABLE_PCH% modules.windeployqt.windeployqtProgramBinPath:%WINDEPLOYQT_BIN_PATH% modules.windeployqt.compilerRuntime:%WINDEPLOYQT_COMPILER_RUNTIME% modules.windeployqt.noCompilerRuntime:%WINDEPLOYQT_NO_COMPILER_RUNTIME%
test_script:
- path

View file

@ -1,7 +1,7 @@
import qbs.Utilities
VLib {
Depends { name: "windeployqt"; }
Depends { name: "windeployqt"; condition: qbs.targetOS.contains("windows") }
Depends { name: "i18nconfig"; }
buildconfig.staticBuild: false
@ -28,7 +28,7 @@ VLib {
}
Properties {
condition: i18nconfig.limitDeploymentOfQtTranslations
condition: qbs.targetOS.contains("windows") && i18nconfig.limitDeploymentOfQtTranslations
windeployqt.languages: i18nconfig.qtTranslationLocales.join(',')
}

View file

@ -77,7 +77,7 @@ Module {
Rule {
// alwaysRun: true
condition: product.qbs.targetOS.contains("windows")
condition: product.qbs.targetOS.contains("windows") && product.qbs.buildVariant === "release"
inputs: product.type.contains("dynamiclibrary") ? ["dynamiclibrary"] : ["application"]
prepare: {
@ -145,7 +145,8 @@ Module {
if (product.windeployqt.compilerRuntime)
cmdArgs.push("--compiler-runtime")
else if (product.windeployqt.noCompilerRuntime)
if (product.windeployqt.noCompilerRuntime)
cmdArgs.push("--no-compiler-runtime")
if (product.windeployqt.noVirtualkeyboard &&

View file

@ -779,14 +779,16 @@ auto VPiece::SeamAllowancePointsWithRotation(const VContainer *data, vsizetype m
{
{
VSAPoint ekvPoint = VPiecePath::PreparePointEkv(node, data);
if (showMirrorLine && VFuzzyComparePoints(ekvPoint, mirrorLine.p1()))
if (showMirrorLine)
{
ekvPoint.SetSAAfter(0);
}
if (showMirrorLine && VFuzzyComparePoints(ekvPoint, mirrorLine.p2()))
{
ekvPoint.SetSABefore(0);
if (VFuzzyComparePoints(ekvPoint, mirrorLine.p1()))
{
ekvPoint.SetSAAfter(0);
}
else if (VFuzzyComparePoints(ekvPoint, mirrorLine.p2()))
{
ekvPoint.SetSABefore(0);
}
}
pointsEkv.append(ekvPoint);
@ -832,7 +834,7 @@ auto VPiece::SeamAllowancePointsWithRotation(const VContainer *data, vsizetype m
const QSharedPointer<VAbstractCurve> curve = data->GeometricObject<VAbstractCurve>(node.GetId());
pointsEkv += VPiecePath::CurveSeamAllowanceSegment(data, unitedPath, curve, i, node.GetReverse(),
width, GetName());
width, mirrorLine, GetName());
}
}
break;
@ -1081,7 +1083,8 @@ auto VPiece::GetNodeSAPoints(const QVector<VPieceNode> &path, vsizetype index, c
const QSharedPointer<VAbstractCurve> curve = data->GeometricObject<VAbstractCurve>(node.GetId());
const qreal width = ToPixel(GetSAWidth(), *data->GetPatternUnit());
points += VPiecePath::CurveSeamAllowanceSegment(data, path, curve, index, node.GetReverse(), width, GetName());
points += VPiecePath::CurveSeamAllowanceSegment(data, path, curve, index, node.GetReverse(), width, QLineF(),
GetName());
}
return points;
}

View file

@ -552,7 +552,8 @@ auto VPiecePath::SeamAllowancePoints(const VContainer *data, qreal width, bool r
case (Tool::NodeSplinePath):
{
const QSharedPointer<VAbstractCurve> curve = data->GeometricObject<VAbstractCurve>(node.GetId());
pointsEkv += CurveSeamAllowanceSegment(data, d->m_nodes, curve, i, node.GetReverse(), width, GetName());
pointsEkv += CurveSeamAllowanceSegment(data, d->m_nodes, curve, i, node.GetReverse(), width, QLineF(),
GetName());
}
break;
default:
@ -1152,10 +1153,34 @@ auto VPiecePath::PreparePointEkv(const VPieceNode &node, const VContainer *data)
//---------------------------------------------------------------------------------------------------------------------
auto VPiecePath::CurveSeamAllowanceSegment(const VContainer *data, const QVector<VPieceNode> &nodes,
const QSharedPointer<VAbstractCurve> &curve, vsizetype i, bool reverse,
qreal width, const QString &piece) -> QVector<VSAPoint>
qreal width, const QLineF &mirrorLine, const QString &piece)
-> QVector<VSAPoint>
{
const VSAPoint begin = StartSegment(data, nodes, i);
const VSAPoint end = EndSegment(data, nodes, i);
VSAPoint begin = StartSegment(data, nodes, i);
if (!mirrorLine.isNull())
{
if (VFuzzyComparePoints(begin, mirrorLine.p1()))
{
begin.SetSAAfter(0);
}
else if (VFuzzyComparePoints(begin, mirrorLine.p2()))
{
begin.SetSABefore(0);
}
}
VSAPoint end = EndSegment(data, nodes, i);
if (!mirrorLine.isNull())
{
if (VFuzzyComparePoints(end, mirrorLine.p1()))
{
end.SetSAAfter(0);
}
else if (VFuzzyComparePoints(end, mirrorLine.p2()))
{
end.SetSABefore(0);
}
}
const QVector<QPointF> points = curve->GetSegmentPoints(begin, end, reverse, piece);
if (points.size() < 2)

View file

@ -137,7 +137,8 @@ public:
static auto CurveSeamAllowanceSegment(const VContainer *data, const QVector<VPieceNode> &nodes,
const QSharedPointer<VAbstractCurve> &curve, vsizetype i, bool reverse,
qreal width, const QString &piece = QString()) -> QVector<VSAPoint>;
qreal width, const QLineF &mirrorLine, const QString &piece = QString())
-> QVector<VSAPoint>;
static auto NodeName(const QVector<VPieceNode> &nodes, vsizetype nodeIndex, const VContainer *data) -> QString;

View file

@ -36,6 +36,7 @@
#include "../../support/dialogeditlabel.h"
#include "../../support/dialogeditwrongformula.h"
#include "../vgeometry/vplacelabelitem.h"
#include "../vmisc/def.h"
#include "../vmisc/theme/vtheme.h"
#include "../vmisc/typedef.h"
#include "../vmisc/vabstractvalapplication.h"
@ -49,7 +50,6 @@
#include "../vpatterndb/vpiecenode.h"
#include "../vpatterndb/vpiecepath.h"
#include "../vwidgets/fancytabbar/fancytabbar.h"
#include "def.h"
#include "dialogpatternmaterials.h"
#include "dialogpiecepath.h"
#include "dialogplacelabel.h"
@ -4039,6 +4039,8 @@ void DialogSeamAllowance::InitMirrorLinePoint(QComboBox *box)
box->blockSignals(true);
box->clear();
box->addItem(tr("None"), QUuid());
const QVector<VPieceNode> nodes = GetListInternals<VPieceNode>(uiTabPaths->listWidgetMainPath);
for (const auto &node : nodes)