Control length of a passmark for builtin seam allowance with global setting. #124

This case was not covered.
This commit is contained in:
Roman Telezhynskyi 2021-05-20 11:48:47 +03:00
parent 342df09a82
commit a5191ce763

View File

@ -831,12 +831,20 @@ QVector<QLineF> VPassmark::BuiltInSAPassmarkBaseLine(const VPiece &piece) const
} }
else else
{ {
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2' with built in " if (m_data.globalPassmarkLength > accuracyPointOnLine)
"seam allowance. User must manually provide length.") {
.arg(m_data.nodeName, m_data.pieceName); length = m_data.globalPassmarkLength;
VAbstractApplication::VApp()->IsPedantic() ? throw VExceptionInvalidNotch(errorMsg) : }
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg; else
return QVector<QLineF>(); {
const QString errorMsg = QObject::tr("Cannot calculate a notch for point '%1' in piece '%2' with built "
"in seam allowance. User must manually provide length.")
.arg(m_data.nodeName, m_data.pieceName);
VAbstractApplication::VApp()->IsPedantic()
? throw VExceptionInvalidNotch(errorMsg)
: qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
return {};
}
} }
} }